「XDG デスクトップ ポータル」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(英語版より新規作成)
 
(→‎設定: 追加)
 
(2人の利用者による、間の7版が非表示)
1行目: 1行目:
 
{{Template:Related articles start}}
 
{{Template:Related articles start}}
 
{{Template:Related|Flatpak}}
 
{{Template:Related|Flatpak}}
{{Template:Related|PipeWire#WebRTC screen sharing}}
+
{{Template:Related|PipeWire#WebRTC 画面共有}}
 
{{Template:Related articles end}}
 
{{Template:Related articles end}}
 
[[Category:Freedesktop.org]]
 
[[Category:Freedesktop.org]]
 
[[en:XDG Desktop Portal]]
 
[[en:XDG Desktop Portal]]
   
From the [https://docs.flatpak.org/en/latest/desktop-integration.html#portals Flatpak documentation]:
+
[https://docs.flatpak.org/en/latest/desktop-integration.html#portals Flatpak のドキュメンテーション]から:
   
  +
: Portals は、アプリケーションのサンドボックスの外部から安全にリソースにアクセスするためのフレームワークです。それらは、ネットワークのステータスを決定する、ファイルチューザーでファイルを開く、URIを開く、スクリーンショットやスクリーンキャストを取るなど、アプリケーションに一連の共通機能を提供します [...]
:Portals are the framework for securely accessing resources from outside an application sandbox. They provide a range of common features to applications, including: Determining network status, opening a file with a file chooser, opening URIs, taking screenshots and screencasts [...]
 
   
  +
Portals は [[Flatpak]] を通じてサンドボックス化されたアプリケーションで使用するために設計されましたが、任意のアプリケーションは Portals を使用して、デスクトップやツールキットに関係なく特徴に均一なアクセスを提供できます。これは一般的に、例えば、 [[PipeWire]] 経由で [[Wayland]] にスクリーン共有を許可するためや、現在の [[デスクトップ環境]] と同じツールキットを使用する [[Firefox]] 上でファイルの開くと保存のダイアログを使用するために使用されます。
Portals were designed for use with applications sandboxed through [[Flatpak]], but any application can use portals to provide uniform access to features independent of desktops and toolkits. This is commonly used, for example, to [[PipeWire#WebRTC screen sharing|allow screen sharing]] on [[Wayland]] via [[PipeWire]], or to [[Firefox#KDE integration|use file open and save dialogs]] on [[Firefox]] that use the same toolkit as your current [[desktop environment]].
 
   
== Installation ==
+
== インストール ==
   
  +
{{Pkg|xdg-desktop-portal}} と一つ以上の[[#バックエンド|バックエンド]]を[[インストール]]します。パッケージには、[[D-Bus]] を通じて自動的に起動される [[systemd/ユーザー]] サービスが含まれています。
[[Install]] {{Pkg|xdg-desktop-portal}} and one or more [[#Backends|backends]]. The package includes a [[systemd/User]] service that will be automatically started via [[D-Bus]].
 
   
== Backends ==
+
== バックエンド ==
   
  +
アプリケーションがポータルを通じてリクエストを行うと、それは {{ic|xdg-desktop-portal}} によって処理され、それからバックエンドの実装に転送されます。これにより、さまざまなデスクトップ環境にフィットする適切なユーザーインターフェースを提供し、通知の表示や画面の録画などのリクエストに対して環境固有の API へアクセスするクリーンな方法を可能にします。
When an application makes a request through a portal, it is handled by {{ic|xdg-desktop-portal}}, which then forwards it to a backend implementation. This allows a clean way to provide suitable user interfaces that fit into different desktop environments, and access environment-specific APIs for requests like showing notifications or recording the screen.
 
   
  +
複数のバックエンドをインストールでき、それらは {{ic|/usr/share/xdg-desktop-portal/portals/*.portal}} に配置しています。それぞれのポータルバックエンドファイルには、それが扱うことができるインターフェースのリストと、それが使用できるデスクトップ環境が含まれています。リクエストが行われると、{{ic|xdg-desktop-portal}} は {{ic|XDG_CURRENT_DESKTOP}} [[環境変数]] を使用して、そのリクエストにどのバックエンドを使用するかを決定します。現在のデスクトップに対して使用できるバックエンドが複数ある場合、アルファベット順で最初のものが選択されます。現在のデスクトップに対してインターフェースを扱うバックエンドがない、現在のデスクトップに対して利用可能なバックエンドがない、または {{ic|xdg-desktop-portal}} が現在のデスクトップを決定できない場合、それは要求されたインターフェースをサポートする全てのインストールされたポータルの中からアルファベット順で最初のポータルを選択します。
Multiple backends can be installed, and they are located in {{ic|/usr/share/xdg-desktop-portal/portals/*.portal}}. Each portal backend file contains a list of interfaces that it can handle, and the desktop environments that it can be used in. When a request is made, {{ic|xdg-desktop-portal}} will use the {{ic|XDG_CURRENT_DESKTOP}} [[environment variable]] to determine which backend it will use for the request. If more than one backend can be used for the current desktop, the first one in alphabetical order is chosen. If no backend for the current desktop can handle the interface, no backend is available for the current desktop, or {{ic|xdg-desktop-portal}} can't determine the current desktop, then it will choose the first portal in alphabetical order between all of the installed portals that support the requested interface.
 
   
  +
例えば、[[Sway]] ユーザーはスクリーンシェアリングサポートのために {{Pkg|xdg-desktop-portal-wlr}} を使用し、''xdg-desktop-portal-wlr'' が実装していない他のすべてのインターフェースに対してフォールバックとして {{Pkg|xdg-desktop-portal-gtk}} を使用するかもしれません。
For example, a [[Sway]] user may use {{Pkg|xdg-desktop-portal-wlr}} for screen sharing support and {{Pkg|xdg-desktop-portal-gtk}} as a fallback for all other interfaces that ''xdg-desktop-portal-wlr'' does not implement.
 
   
  +
=== バックエンドとインターフェースのリスト ===
=== List of backends and interfaces ===
 
   
  +
以下の表では、利用可能な全てのバックエンドと、特定の一般的なインターフェースに対するサポートを一覧表示しています。
The following table lists all backends available and their support for certain common interfaces.
 
   
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
  +
! バックエンド !! ファイル選択ダイアログ !! スクリーンショットとスクリーンキャスト
! Backend !! File chooser !! Screenshot and screen cast
 
 
|-
 
|-
| {{Pkg|xdg-desktop-portal-gnome}} || {{G|Yes}} || {{G|Yes, on [[GNOME]]}}
+
| {{Pkg|xdg-desktop-portal-dde}} || {{G|あり}} || {{G|[[Deepin Desktop Environment]] において可}}
 
|-
 
|-
| {{Pkg|xdg-desktop-portal-gtk}} || {{Yes}} || {{No}}
+
| {{Pkg|xdg-desktop-portal-gnome}} || {{G|あり}} || {{G|[[GNOME]] において可}}
 
|-
 
|-
| {{Pkg|xdg-desktop-portal-kde}} || {{Yes}} || {{G|Yes, on [[KDE]]}}
+
| {{Pkg|xdg-desktop-portal-gtk}} || {{G|あり}} || {{R|不可}}
 
|-
 
|-
| {{Pkg|xdg-desktop-portal-hyprland}}<sup>1</sup> || {{No}} || {{G|Yes, on {{Pkg|wlroots}}}}
+
| {{Pkg|xdg-desktop-portal-kde}} || {{G|あり}} || {{G|[[KDE]] において可}}
 
|-
 
|-
| {{Pkg|xdg-desktop-portal-lxqt}} || {{Yes}} || {{No}}
+
| {{Pkg|xdg-desktop-portal-hyprland}}<sup>1</sup> || {{R|なし}} || {{G|{{Pkg|wlroots}} において可}}
 
|-
 
|-
| {{Pkg|xdg-desktop-portal-wlr}} || {{No}} || {{G|Yes, on {{Pkg|wlroots}}}}
+
| {{Pkg|xdg-desktop-portal-lxqt}} || {{G|あり}} || {{R|不可}}
 
|-
 
|-
| {{AUR|xdg-desktop-portal-liri-git}} || {{Yes}} || {{G|Yes, on [[Liri]]}}
+
| {{Pkg|xdg-desktop-portal-wlr}} || {{R|なし}} || {{G|{{Pkg|wlroots}} において可}}
 
|-
 
|-
| {{AUR|xdg-desktop-portal-shana}} || {{Yes}}<sup>2</sup> || {{No}}
+
| {{Pkg|xdg-desktop-portal-xapp}} || {{R|なし}} || {{G|[[Cinnamon]] において可}}
 
|-
 
|-
| {{AUR|xdg-desktop-portal-td}} || {{Yes}} || {{No}}
+
| {{AUR|xdg-desktop-portal-liri-git}} || {{G|あり}} || {{G|[[Liri]] において可}}
 
|-
 
|-
| {{AUR|xdg-desktop-portal-termfilechooser-git}} || {{Yes}}<sup>3</sup> || {{No}}
+
| {{AUR|xdg-desktop-portal-shana}} || {{G|あり}}<sup>2</sup> || {{R|不可}}
  +
|-
  +
| {{AUR|xdg-desktop-portal-td}} || {{G|あり}} || {{R|不可}}
  +
|-
  +
| {{AUR|xdg-desktop-portal-termfilechooser-git}} || {{G|あり}}<sup>3</sup> || {{R|不可}}
 
|-
 
|-
 
|}
 
|}
   
  +
# すべての wlroots ベースのコンポジタで動作しますが、[[Hyprland]] と併用すると、個々のウィンドウの共有などの追加機能が提供されます。
#works with all wlroots-based compositors, but provides extra functionality when used with [[Hyprland]] such as sharing individual windows.
 
  +
# リクエストを GNOME/GTK/KDE/LXQt それぞれのバックエンドにリダイレクトします。
#redirects requests to GNOME/GTK/KDE/LXQt backends
 
  +
# [[アプリケーション一覧/ユーティリティ#コンソール|ターミナルファイルマネージャー]]をファイル選択ダイアログとして使用できるようにします。
#allows using a [[List of applications/Utilities#Console|terminal file manager]] as a file chooser
 
  +
  +
== 設定 ==
  +
  +
リクエストの発行時、{{ic|xdg-desktop-portal}} は設定ファイル {{ic|/usr/share/xdg-desktop-portal/''DE''-portals.conf}} を使用します (''DE'' の部分には {{ic|XDG_CURRENT_DESKTOP}} [[環境変数]]の値が使用されます)。この設定ファイルはデスクトップ環境自体によって提供され、特定のデスクトップ環境が実行中である場合にどのバックエンドを使用するべきかを決定します。
  +
  +
デスクトップ環境によるデフォルト値を上書きしたい場合や、デスクトップ環境がデフォルトの設定を提供していない場合、ポータルの設定ファイル {{ic|$XDG_CONFIG_HOME/xdg-desktop-portal/portals.conf}} を作成することで、全て、または個々のインターフェイスに対してどのバックエンドを使用するかを指定することができます。複数のデスクトップ環境を使用している場合、{{ic|$XDG_CONFIG_HOME/xdg-desktop-portal/''DE''-portals.conf}} を作成することで、それぞれのデスクトップ環境に対して設定を上書きすることができます。
  +
  +
例えば、デスクトップ環境がポータルバックエンドを提供しておらず、{{Pkg|xdg-desktop-portal-gtk}} を汎用のフォールバックとして使用し、{{Pkg|xdg-desktop-portal-lxqt}} で LXQt のファイル選択ダイアログを使用したい場合、設定は以下のようになります:
  +
  +
{{hc|1=~/.config/xdg-desktop-portal/portals.conf|2=
  +
[preferred]
  +
default=gtk
  +
org.freedesktop.impl.portal.FileChooser=lxqt
  +
}}
  +
  +
詳細は {{man|5|portals.conf}} を参照してください。
  +
  +
{{Tip|1=GTK ポータルをフォールバックとして使用するには、設定ファイル {{ic|''DE''-portals.conf}} または {{ic|portals.conf}} を作成する必要がある場合があります。[https://bbs.archlinux.org/viewtopic.php?id=289405 このフォーラムにおける議論]を参照してください。}}
  +
  +
=== デスクトップ環境を強制する ===
  +
  +
場合によっては (スタンドアローンな[[ウィンドウマネージャ]]を使用している場合など)、特定のデスクトップ環境が実行中であると {{ic|xdg-desktop-portal}} に思わせる必要があるでしょう。これは、[[ドロップインスニペット]]を使って {{ic|xdg-desktop-portal.service}} [[ユーザーユニット]]に対して [[XDG_CURRENT_DESKTOP]] 環境変数を設定することで可能です。例えば、KDE に付属しているバックエンドを使うには:
  +
  +
{{hc|~/.config/systemd/user/xdg-desktop-portal.service.d/override.conf|2=
  +
[Service]
  +
Environment="XDG_CURRENT_DESKTOP=KDE"
  +
}}
  +
  +
[[Systemd#ユニットファイルを置換する|systemctl]] を使わずに手動でドロップインファイルを作成した場合は、[[daemon-reload]] を実行してください。
   
  +
== トラブルシューティング ==
== Troubleshooting ==
 
   
=== xdg-desktop-portal-wlr does not start automatically on sway ===
+
=== xdg-desktop-portal-wlr sway で自動的に開始しない ===
   
For {{ic|xdg-desktop-portal-wlr}} to work, the {{ic|XDG_CURRENT_DESKTOP}} and {{ic|WAYLAND_DISPLAY}} environment variables have to be set in the [[Systemd/User#Environment variables|systemd user session]]. {{ic|XDG_CURRENT_DESKTOP}} has to be set to the name of your compositor, e.g. {{ic|1=XDG_CURRENT_DESKTOP=sway}}. {{ic|WAYLAND_DISPLAY}} is set automatically by the compositor.
+
{{ic|xdg-desktop-portal-wlr}} を動作させるには、{{ic|XDG_CURRENT_DESKTOP}} {{ic|WAYLAND_DISPLAY}} 環境変数が [[Systemd/ユーザー#環境変数|systemd ユーザーセッション]] 内に設定されている必要があります。{{ic|XDG_CURRENT_DESKTOP}} は、あなたのコンポジタの名前に設定する必要があります(例えば、{{ic|1=XDG_CURRENT_DESKTOP=sway}})。{{ic|WAYLAND_DISPLAY}} はコンポジタによって自動的に設定されます。
   
  +
これらの変数が設定されているかどうかは {{ic|systemctl --user show-environment}} で確認します。設定されていない場合、次のコマンドをコンポジタの起動後に実行して、これらの環境変数を systemd ユーザーセッションと dbus にインポートします(例えば、コンポジタの設定ファイルに含めます)。
Check whether these variables are set with {{ic|systemctl --user show-environment}}. If they are not set, import these environment variables into the systemd user session and dbus by running the following commands after launching the compositor (e.g., include them in the compositor's configuration file).
 
   
 
$ systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
 
$ systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
 
$ dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=''compositor_name''
 
$ dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=''compositor_name''
   
{{Tip|[[Sway]] provides a drop-in file which does this automatically, see [[Sway#Configuration]].}}
+
{{Tip|[[Sway]] はこれを自動的に行う drop-in ファイルを提供しています。詳細は [[Sway#設定]] を参照してください。}}
   
See [https://github.com/emersion/xdg-desktop-portal-wlr#running] and [https://github.com/emersion/xdg-desktop-portal-wlr/wiki] for more details.
+
詳細は [https://github.com/emersion/xdg-desktop-portal-wlr#running] [https://github.com/emersion/xdg-desktop-portal-wlr/wiki] を参照してください。
   
=== Using multiple monitors with xdg-desktop-portal-wlr ===
+
=== xdg-desktop-portal-wlr を使って複数のモニターを使用する ===
   
  +
{{ic|xdg-desktop-portal-wlr}} は共有するモニターを選択するために外部のチューザーが必要です。デフォルトでは、{{Pkg|slurp}}、{{Pkg|wofi}}、そして {{Pkg|bemenu}} をこの順に探します。''slurp'' を使用している場合、画面共有のリクエスト後に十字カーソルが表示され、共有したい画面をクリックする必要があります。''wofi'' や ''bemenu'' を使用している場合、共有可能なディスプレイのメニューが表示されます。チューザーが利用できない場合、{{ic|xdg-desktop-portal-wlr}} は最初に見つけたモニターにフォールバックします。詳細は {{man|5|xdg-desktop-portal-wlr|SCREENCAST OPTIONS}} を参照してください。
{{ic|xdg-desktop-portal-wlr}} requires an external chooser to select the shared monitor. By default, it looks for {{Pkg|slurp}}, {{Pkg|wofi}} and {{Pkg|bemenu}} in this order. When using ''slurp'', after a request for screen sharing you will be presented with a crosshair cursor and you will need to click the screen you want to share. When using ''wofi'' or ''bemenu'', you will be presented with a menu of available displays to share. If no choosers are available, {{ic|xdg-desktop-portal-wlr}} will fallback to the first monitor found. For more information, see {{man|5|xdg-desktop-portal-wlr|SCREENCAST OPTIONS}}.
 
   
== See also ==
+
== 参照 ==
   
* [https://flatpak.github.io/xdg-desktop-portal/ Portal Documentation]: Lists all APIs applications and backends can implement.
+
* [https://flatpak.github.io/xdg-desktop-portal/ Portal Documentation]: すべての API を一覧表にしたもので、アプリケーションやバックエンドが実装できます。

2023年11月13日 (月) 16:25時点における最新版

関連記事

Flatpak のドキュメンテーションから:

Portals は、アプリケーションのサンドボックスの外部から安全にリソースにアクセスするためのフレームワークです。それらは、ネットワークのステータスを決定する、ファイルチューザーでファイルを開く、URIを開く、スクリーンショットやスクリーンキャストを取るなど、アプリケーションに一連の共通機能を提供します [...]

Portals は Flatpak を通じてサンドボックス化されたアプリケーションで使用するために設計されましたが、任意のアプリケーションは Portals を使用して、デスクトップやツールキットに関係なく特徴に均一なアクセスを提供できます。これは一般的に、例えば、 PipeWire 経由で Wayland にスクリーン共有を許可するためや、現在の デスクトップ環境 と同じツールキットを使用する Firefox 上でファイルの開くと保存のダイアログを使用するために使用されます。

インストール

xdg-desktop-portal と一つ以上のバックエンドインストールします。パッケージには、D-Bus を通じて自動的に起動される systemd/ユーザー サービスが含まれています。

バックエンド

アプリケーションがポータルを通じてリクエストを行うと、それは xdg-desktop-portal によって処理され、それからバックエンドの実装に転送されます。これにより、さまざまなデスクトップ環境にフィットする適切なユーザーインターフェースを提供し、通知の表示や画面の録画などのリクエストに対して環境固有の API へアクセスするクリーンな方法を可能にします。

複数のバックエンドをインストールでき、それらは /usr/share/xdg-desktop-portal/portals/*.portal に配置しています。それぞれのポータルバックエンドファイルには、それが扱うことができるインターフェースのリストと、それが使用できるデスクトップ環境が含まれています。リクエストが行われると、xdg-desktop-portalXDG_CURRENT_DESKTOP 環境変数 を使用して、そのリクエストにどのバックエンドを使用するかを決定します。現在のデスクトップに対して使用できるバックエンドが複数ある場合、アルファベット順で最初のものが選択されます。現在のデスクトップに対してインターフェースを扱うバックエンドがない、現在のデスクトップに対して利用可能なバックエンドがない、または xdg-desktop-portal が現在のデスクトップを決定できない場合、それは要求されたインターフェースをサポートする全てのインストールされたポータルの中からアルファベット順で最初のポータルを選択します。

例えば、Sway ユーザーはスクリーンシェアリングサポートのために xdg-desktop-portal-wlr を使用し、xdg-desktop-portal-wlr が実装していない他のすべてのインターフェースに対してフォールバックとして xdg-desktop-portal-gtk を使用するかもしれません。

バックエンドとインターフェースのリスト

以下の表では、利用可能な全てのバックエンドと、特定の一般的なインターフェースに対するサポートを一覧表示しています。

バックエンド ファイル選択ダイアログ スクリーンショットとスクリーンキャスト
xdg-desktop-portal-dde あり Deepin Desktop Environment において可
xdg-desktop-portal-gnome あり GNOME において可
xdg-desktop-portal-gtk あり 不可
xdg-desktop-portal-kde あり KDE において可
xdg-desktop-portal-hyprland1 なし wlroots において可
xdg-desktop-portal-lxqt あり 不可
xdg-desktop-portal-wlr なし wlroots において可
xdg-desktop-portal-xapp なし Cinnamon において可
xdg-desktop-portal-liri-gitAUR あり Liri において可
xdg-desktop-portal-shanaAUR あり2 不可
xdg-desktop-portal-tdAUR あり 不可
xdg-desktop-portal-termfilechooser-gitAUR あり3 不可
  1. すべての wlroots ベースのコンポジタで動作しますが、Hyprland と併用すると、個々のウィンドウの共有などの追加機能が提供されます。
  2. リクエストを GNOME/GTK/KDE/LXQt それぞれのバックエンドにリダイレクトします。
  3. ターミナルファイルマネージャーをファイル選択ダイアログとして使用できるようにします。

設定

リクエストの発行時、xdg-desktop-portal は設定ファイル /usr/share/xdg-desktop-portal/DE-portals.conf を使用します (DE の部分には XDG_CURRENT_DESKTOP 環境変数の値が使用されます)。この設定ファイルはデスクトップ環境自体によって提供され、特定のデスクトップ環境が実行中である場合にどのバックエンドを使用するべきかを決定します。

デスクトップ環境によるデフォルト値を上書きしたい場合や、デスクトップ環境がデフォルトの設定を提供していない場合、ポータルの設定ファイル $XDG_CONFIG_HOME/xdg-desktop-portal/portals.conf を作成することで、全て、または個々のインターフェイスに対してどのバックエンドを使用するかを指定することができます。複数のデスクトップ環境を使用している場合、$XDG_CONFIG_HOME/xdg-desktop-portal/DE-portals.conf を作成することで、それぞれのデスクトップ環境に対して設定を上書きすることができます。

例えば、デスクトップ環境がポータルバックエンドを提供しておらず、xdg-desktop-portal-gtk を汎用のフォールバックとして使用し、xdg-desktop-portal-lxqt で LXQt のファイル選択ダイアログを使用したい場合、設定は以下のようになります:

~/.config/xdg-desktop-portal/portals.conf
[preferred]
default=gtk
org.freedesktop.impl.portal.FileChooser=lxqt

詳細は portals.conf(5) を参照してください。

ヒント: GTK ポータルをフォールバックとして使用するには、設定ファイル DE-portals.conf または portals.conf を作成する必要がある場合があります。このフォーラムにおける議論を参照してください。

デスクトップ環境を強制する

場合によっては (スタンドアローンなウィンドウマネージャを使用している場合など)、特定のデスクトップ環境が実行中であると xdg-desktop-portal に思わせる必要があるでしょう。これは、ドロップインスニペットを使って xdg-desktop-portal.service ユーザーユニットに対して XDG_CURRENT_DESKTOP 環境変数を設定することで可能です。例えば、KDE に付属しているバックエンドを使うには:

~/.config/systemd/user/xdg-desktop-portal.service.d/override.conf
[Service]
Environment="XDG_CURRENT_DESKTOP=KDE"

systemctl を使わずに手動でドロップインファイルを作成した場合は、daemon-reload を実行してください。

トラブルシューティング

xdg-desktop-portal-wlr が sway で自動的に開始しない

xdg-desktop-portal-wlr を動作させるには、XDG_CURRENT_DESKTOPWAYLAND_DISPLAY 環境変数が systemd ユーザーセッション 内に設定されている必要があります。XDG_CURRENT_DESKTOP は、あなたのコンポジタの名前に設定する必要があります(例えば、XDG_CURRENT_DESKTOP=sway)。WAYLAND_DISPLAY はコンポジタによって自動的に設定されます。

これらの変数が設定されているかどうかは systemctl --user show-environment で確認します。設定されていない場合、次のコマンドをコンポジタの起動後に実行して、これらの環境変数を systemd ユーザーセッションと dbus にインポートします(例えば、コンポジタの設定ファイルに含めます)。

$ systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
$ dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=compositor_name
ヒント: Sway はこれを自動的に行う drop-in ファイルを提供しています。詳細は Sway#設定 を参照してください。

詳細は [1][2] を参照してください。

xdg-desktop-portal-wlr を使って複数のモニターを使用する

xdg-desktop-portal-wlr は共有するモニターを選択するために外部のチューザーが必要です。デフォルトでは、slurpwofi、そして bemenu をこの順に探します。slurp を使用している場合、画面共有のリクエスト後に十字カーソルが表示され、共有したい画面をクリックする必要があります。wofibemenu を使用している場合、共有可能なディスプレイのメニューが表示されます。チューザーが利用できない場合、xdg-desktop-portal-wlr は最初に見つけたモニターにフォールバックします。詳細は xdg-desktop-portal-wlr(5) § SCREENCAST OPTIONS を参照してください。

参照

  • Portal Documentation: すべての API を一覧表にしたもので、アプリケーションやバックエンドが実装できます。