「Bubblejail」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
39行目: 39行目:
 
$ bubblejail create --profile firefox ''instance_name''
 
$ bubblejail create --profile firefox ''instance_name''
   
=== Running instance ===
+
=== 実行中のインスタンス ===
   
==== Using desktop entry ====
+
==== デスクトップエントリの使用 ====
   
  +
インスタンスを作成すると、{{ic|--no-desktop-entry}} オプションが使用されていない限り [[デスクトップエントリ]] が生成されます。
When creating an instance a [[desktop entry]] will be generated unless {{ic|--no-desktop-entry}} option was used.
 
   
  +
デスクトップエントリーは ''インスタンス名 bubble'' の名前を持ち、デスクトップ環境から起動することができます。
Desktop entry would have the ''instance_name bubble'' name and can be launched from the desktop environment.
 
   
==== Using command line ====
+
==== コマンドラインの使用 ====
   
  +
作成されたインスタンスは {{ic|run}} サブコマンドで実行できます:
Once created the instance can be run with {{ic|run}} subcommand:
 
   
 
$ bubblejail run ''instance_name'' ''args''
 
$ bubblejail run ''instance_name'' ''args''
   
  +
引数が渡されない場合、使用されるプロファイルに基づいてデフォルトの引数が使用されます。
If no arguments are passed when the default arguments will be used based on the profile used.
 
   
  +
''args'' が渡された場合、その引数はサンドボックス内で実行されます。最初の引数はバイナリ名で、次の引数はこのバイナリに渡されます。
If ''args'' are passed when those arguments will be executed inside the sandbox. First argument should be the binary name and following arguments will be passed to this binary.
 
   
 
== Configuration ==
 
== Configuration ==

2023年2月22日 (水) 22:01時点における版

関連記事

Bubblejail は、Bubblewrap ベースのサンドボックスユーティリティです。

Bubblejail はリソース指向のパーミッションモデルを持っています。例えば、x11 はサンドボックスに追加することができるリソースです。これにより、サンドボックスは X11 ディスプレイサーバにアクセスできるようになります。

Bubblejail はまた、セキュリティと許可モデルを強化するために seccomp と D-Bus フィルタリングを使用しています。

Bubblejailは、サンドボックスの作成と設定を可能にするグラフィカルなインターフェイスも備えています。

インストール

bubblejailAUR または bubblejail-gitAUR をインストールして下さい。

使い方

Bubblejail のサンドボックスは、インスタンスに分離されています。各インスタンスは、独立したホームディレクトリとパーミッションの設定です。

各インスタンスは通常1つのアプリケーションをサンドボックス化します。

インスタンスの作成

新しいインスタンスは、通常、利用可能なプロファイルから作成されます。プロファイルは、使用するデスクトップエントリとパーミッションの初期セットです。特定のアプリケーションにプロファイルがない場合、generic プロファイルまたは空のプロファイルを使用し、作成後に微調整することが可能です。

ノート: 使用するプロファイルは、初期のパーミッションのセットを決定します。パーミッションは作成後、自由に変更することができます。

グラフィカルインターフェイスの使用

Bubblejail Configuration アプリケーションを実行します。最初の画面の下の方に、Create Instance というボタンがあります。

コマンドラインの使用

たとえば、Firefox インスタンスを作成するには:

$ bubblejail create --profile firefox instance_name

実行中のインスタンス

デスクトップエントリの使用

インスタンスを作成すると、--no-desktop-entry オプションが使用されていない限り デスクトップエントリ が生成されます。

デスクトップエントリーは インスタンス名 bubble の名前を持ち、デスクトップ環境から起動することができます。

コマンドラインの使用

作成されたインスタンスは run サブコマンドで実行できます:

$ bubblejail run instance_name args

引数が渡されない場合、使用されるプロファイルに基づいてデフォルトの引数が使用されます。

args が渡された場合、その引数はサンドボックス内で実行されます。最初の引数はバイナリ名で、次の引数はこのバイナリに渡されます。

Configuration

Once the instance has been created its permissions and resources can be modified. For modified permissions to take effect the sandbox needs to be restarted.

The profile used when creating sandbox only affect the initial set of permissions. However, removing certain permissions might prevent targeted application from working correctly.

Using graphical interface

Run the Bubblejail Configuration application. On the first screen click on the name of the sandbox you want to modify. This will bring up the list of all available permissions and a Save button.

Using command line

Bubblejail provides edit command that will open the configuration file in the editor defined EDITOR Environment variables.

$ bubblejail edit instance_name

Bubblejail uses TOML for its configuration. The defined dictionaries gives permission for a specific resource and key value pairs inside dictionaries will set a specific resource settings.

For example:

[x11]

[home_share]
home_paths = [ "Downloads",]

This config defines two resources available to sandbox: the x11 windowing system and shares the Downloads directory in the home folder.

The available services and options are documented in bubblejail.services man page.

Tips and tricks

Running terminal inside sandbox

Using run command a terminal can be launched inside already running sandbox. The terminal can be used to debug the sandbox.

It is recommended to use the terminal application that requires minimal amount of permissions such as Alacritty which only requires access to windowing system. (either x11 or wayland)

$ bubblejail run instance_name alacritty

Re-using profile for similar applications

If an application is missing a profile but there is a related software with existing profile that profile can be used.

For example, chromium profile can be used on any chromium derived browser such as qutebrowser.

First, generate the instance using chromium profile but disable the desktop entry creation.

$ bubblejail create --no-desktop-entry --profile chromium qutebrowser

Now a desktop entry can be created from the qutebrowser's desktop entry.

bubblejail generate-desktop-entry --desktop-entry /usr/share/applications/org.qutebrowser.qutebrowser.desktop qutebrowser

Now the sandboxed qutebrowser can be launched with qutebrowser bubble desktop entry.

See also