「Universal Wayland Session Manager」の版間の差分
(英語版から転載) |
(和訳の修正(参照実装->リファレンス実装)) |
||
| (2人の利用者による、間の2版が非表示) | |||
| 1行目: | 1行目: | ||
[[Category:グラフィカルユーザーインターフェイス]] |
[[Category:グラフィカルユーザーインターフェイス]] |
||
[[en:Universal Wayland Session Manager]] |
[[en:Universal Wayland Session Manager]] |
||
| − | + | [https://github.com/Vladimir-csp/uwsm Universal Wayland Session Manager]('''uwsm''')は、スタンドアロンの[[Wayland#コンポジタ|Wayland コンポジタ]] をオンザフライで [[systemd]] ユニットのセットにラップします。これにより、環境設定、[[XDG Autostart]] のサポート、ログインセッションとの双方向バインディング、クリーンシャットダウンを含む堅牢なセッション管理が提供されます。 |
|
| + | {{Note|[[D-Bus#dbus-broker|dbus-broker]] を D-Bus デーモンの実装として使用することが強く推奨されます。その他の利点として、systemdのアクティベーション環境を再利用し、別の環境を持つことがないため、環境管理が簡素化され、適切なクリーンアップが可能になります。[[D-Bus#Reference_implementation|リファレンス実装]] もサポートされていますが、変数の解除ができないため、代わりに空の文字列を設定して最善の努力でクリーンアップが行われます。D-Bus デーモンの別々の環境を適切にクリーンアップする唯一の方法は、{{ic|loginctl terminate-user ""}}を実行することです。}} |
||
| − | {{Note|It is highly recommended to use [[Dbus-broker|dbus-broker]] as the D-Bus daemon implementation. Among other benefits, it reuses the systemd activation environment instead of having a separate one. This simplifies environment management and allows proper cleanup. The [[D-Bus#Reference_implementation|reference implementation]] |
||
| − | is also supported, but it does not allow unsetting vars, so a best effort cleanup is performed by setting them to an empty string instead. The only way to properly clean up the separate environment of the reference D-Bus daemon is to run {{ic|loginctl terminate-user ""}}.}} |
||
| − | == |
+ | == インストール == |
| + | {{Pkg|uwsm}} パッケージを[[インストール]]します。 |
||
| − | [[Install]] the {{Pkg|uwsm}} package. |
||
| − | == |
+ | == 設定 == |
| + | === コンポジタによって設定されたサービスの起動通知と変数 === |
||
| − | === Service startup notification and vars set by compositor === |
||
| − | {{Note| |
+ | {{Note|管理されているコンポジタがすでに {{ic|WAYLAND_DISPLAY}}(およびその他の有用な環境変数)を systemd アクティベーション環境に設定している場合、このセクションをスキップでき、{{ic|uwsm finalize}} を使用する必要はありません。}} |
| + | 現在のコンポジタを見つけるために、Wayland アプリケーションは {{ic|WAYLAND_DISPLAY}}(または、[[Wayland#Xwayland|Xwayland]] を通じて実行する場合は {{ic|DISPLAY}})変数が必要です。そのため、これらの環境変数およびその他の有用な環境変数は、コンポジタがその値を設定した後、systemd/dbus アクティベーション環境に設定する必要があります。 |
||
| − | In order to find the current compositor wayland applications need the {{ic|WAYLAND_DISPLAY}} (or {{ic|DISPLAY}} variable, if they are intended to run through [[Wayland#Xwayland|Xwayland]]). Therefore this and other useful environment variables should be put into the systemd/dbus activation environment once the compositor has set their value. |
||
| − | + | コマンド {{ic|uwsm finalize}} は、{{ic|WAYLAND_DISPLAY}}、{{ic|DISPLAY}} および {{ic|UWSM_FINALIZE_VARNAMES}} リストで空白区切りで指定されたその他の環境変数をアクティベーション環境に設定します。したがって、このコマンドはコンポジタが準備完了した後に実行する必要があります。 |
|
| + | コンポジタによって設定された他の変数がアクティベーション環境に必要な場合、それらも引数として渡すことができます: |
||
| − | If other variables set by the compositors are needed in your activation environment, then you can also pass them as arguments: |
||
exec uwsm finalize ''VAR1'' ''VAR2'' ''...'' |
exec uwsm finalize ''VAR1'' ''VAR2'' ''...'' |
||
| − | === |
+ | === 環境変数 === |
| + | {{ic|${XDG_CONFIG_HOME}/uwsm/env}} ファイルに設定されたすべての環境変数は、''uwsm'' によってソースされ、管理されているコンポジタおよびそのセッション内で実行されるグラフィカルアプリケーションで利用可能になります。 |
||
| − | All environment variables set in {{ic|${XDG_CONFIG_HOME}/uwsm/env}} file are sourced by ''uwsm'' and available to all managed compositors and graphical applications run inside such a session. |
||
| + | 特定の''コンポジタ''(およびそのグラフィカルセッション内のグラフィカルアプリケーション)のみのために環境変数を設定する必要がある場合は、代わりに {{ic|${XDG_CONFIG_HOME}/uwsm/env-''compositor''}} に入れてください。 |
||
| − | If you need certain environment variables to be set only for a specific ''compositor'' (and graphical applications in that graphical session), then put them in {{ic|${XDG_CONFIG_HOME}/uwsm/env-''compositor''}} instead. |
||
| + | これらのファイルでは、以下の形式で環境変数を設定する必要があります: |
||
| − | All these files should set environment variables with the following format: |
||
| − | {{bc|export ''KEY1'' |
+ | {{bc|1=export ''KEY1''=''VAR1'' |
| − | export ''KEY2'' |
+ | export ''KEY2''=''VAR2'' |
| − | export ''KEY3'' |
+ | export ''KEY3''=''VAR3'' |
''...''}} |
''...''}} |
||
| + | コメントを含めるべきではありません。 |
||
| − | and should not contain comments. |
||
| − | == |
+ | == 使い方 == |
| − | === |
+ | === 起動する === |
| + | ''UWSM'' は、TTY と[[ディスプレイマネージャ]]によって開始できます。 |
||
| − | ''uwsm'' can be started both by TTY and by a [[display manager]]. |
||
==== TTY ==== |
==== TTY ==== |
||
| − | + | {{ic|~/.profile}} ファイルに追加してください: |
|
{{bc|if uwsm check may-start && uwsm select; then |
{{bc|if uwsm check may-start && uwsm select; then |
||
| 53行目: | 52行目: | ||
fi}} |
fi}} |
||
| + | 同じ ''コンポジタ'' を常に起動したい場合は、代わりに {{ic|~/.profile}} ファイルに次のように記述できます: |
||
| − | If you want to always start the same ''compositor'', then you can use instead in your {{ic|~/.profile}} file: |
||
{{bc|if uwsm check may-start; then |
{{bc|if uwsm check may-start; then |
||
| 59行目: | 58行目: | ||
fi}} |
fi}} |
||
| − | ==== |
+ | ==== ディスプレイマネージャ ==== |
| + | ''UWSM'' を介してコンポジタを開始するカスタムしたセッションデスクトップエントリを作成できます: |
||
| − | You can create a custom session desktop entry which starts your compositor through ''uwsm'': |
||
| − | {{hc|/usr/share/wayland-sessions/my-compositor-uwsm.desktop|[Desktop Entry] |
+ | {{hc|/usr/share/wayland-sessions/my-compositor-uwsm.desktop|[Desktop Entry]|2= |
| − | Name |
+ | Name=My compositor (with UWSM) |
| − | Comment |
+ | Comment=My cool compositor, UWSM session |
# either full command line with metadata and executable |
# either full command line with metadata and executable |
||
| − | Exec |
+ | Exec=uwsm start -N "My compositor" -D mycompositor:mylib -C "My cool compositor" -- my-compositor |
# or a reference to another entry |
# or a reference to another entry |
||
| − | Exec |
+ | Exec=uwsm start -- my-compositor.desktop |
| − | DesktopNames |
+ | DesktopNames=mycompositor;mylib |
| − | Type |
+ | Type=Application}} |
| − | === |
+ | === セッション終了 === |
| + | 現在の uwsm セッションを終了したい場合、次のいずれかを使用する必要があります:{{ic|loginctl terminate-user ""}}(ユーザーセッション全体を終了)または {{ic|uwsm stop}}({{ic|uwsm start}} 後にコードを実行するか、[[ログインシェル]]を置き換えた場合はユーザーセッションを終了) |
||
| − | If you want to terminate the current uwsm session, then you should use either {{ic|loginctl terminate-user ""}} (terminates the entire user session) or {{ic|uwsm stop}} (executes code after {{ic|uwsm start}} or terminates user session, if it replaced the [[login shell]]). |
||
| + | {{Warning|コンポジタのネイティブな終了メカニズムを使用したり、そのプロセスを直接終了させたりしないでください。これにより、コンポジタがすべてのクライアントから突然切り離され、順序付けられたユニットの非アクティブ化シーケンスに干渉することになります。}} |
||
| − | {{Warning|Do not use a compositor's native exit mechanism or kill its process directly. This will yank the compositor from under all the clients and interfere with ordered unit deactivation sequence.}} |
||
2025年6月13日 (金) 19:19時点における最新版
Universal Wayland Session Manager(uwsm)は、スタンドアロンのWayland コンポジタ をオンザフライで systemd ユニットのセットにラップします。これにより、環境設定、XDG Autostart のサポート、ログインセッションとの双方向バインディング、クリーンシャットダウンを含む堅牢なセッション管理が提供されます。
目次
インストール
設定
コンポジタによって設定されたサービスの起動通知と変数
現在のコンポジタを見つけるために、Wayland アプリケーションは WAYLAND_DISPLAY(または、Xwayland を通じて実行する場合は DISPLAY)変数が必要です。そのため、これらの環境変数およびその他の有用な環境変数は、コンポジタがその値を設定した後、systemd/dbus アクティベーション環境に設定する必要があります。
コマンド uwsm finalize は、WAYLAND_DISPLAY、DISPLAY および UWSM_FINALIZE_VARNAMES リストで空白区切りで指定されたその他の環境変数をアクティベーション環境に設定します。したがって、このコマンドはコンポジタが準備完了した後に実行する必要があります。
コンポジタによって設定された他の変数がアクティベーション環境に必要な場合、それらも引数として渡すことができます:
exec uwsm finalize VAR1 VAR2 ...
環境変数
${XDG_CONFIG_HOME}/uwsm/env ファイルに設定されたすべての環境変数は、uwsm によってソースされ、管理されているコンポジタおよびそのセッション内で実行されるグラフィカルアプリケーションで利用可能になります。
特定のコンポジタ(およびそのグラフィカルセッション内のグラフィカルアプリケーション)のみのために環境変数を設定する必要がある場合は、代わりに ${XDG_CONFIG_HOME}/uwsm/env-compositor に入れてください。
これらのファイルでは、以下の形式で環境変数を設定する必要があります:
export KEY1=VAR1 export KEY2=VAR2 export KEY3=VAR3 ...
コメントを含めるべきではありません。
使い方
起動する
UWSM は、TTY とディスプレイマネージャによって開始できます。
TTY
~/.profile ファイルに追加してください:
if uwsm check may-start && uwsm select; then exec uwsm start default fi
同じ コンポジタ を常に起動したい場合は、代わりに ~/.profile ファイルに次のように記述できます:
if uwsm check may-start; then exec uwsm start compositor.desktop fi
ディスプレイマネージャ
UWSM を介してコンポジタを開始するカスタムしたセッションデスクトップエントリを作成できます:
/usr/share/wayland-sessions/my-compositor-uwsm.desktop
Name=My compositor (with UWSM) Comment=My cool compositor, UWSM session # either full command line with metadata and executable Exec=uwsm start -N "My compositor" -D mycompositor:mylib -C "My cool compositor" -- my-compositor # or a reference to another entry Exec=uwsm start -- my-compositor.desktop DesktopNames=mycompositor;mylib Type=Application
セッション終了
現在の uwsm セッションを終了したい場合、次のいずれかを使用する必要があります:loginctl terminate-user ""(ユーザーセッション全体を終了)または uwsm stop(uwsm start 後にコードを実行するか、ログインシェルを置き換えた場合はユーザーセッションを終了)