「Weston」の版間の差分
(Waylandから分割) |
Kusanaginoturugi (トーク | 投稿記録) (カテゴリを修正) |
||
| (5人の利用者による、間の19版が非表示) | |||
| 1行目: | 1行目: | ||
| + | [[カテゴリ:Wayland コンポジタ]] |
||
| − | == Weston == |
||
| + | [[en:Weston]] |
||
| − | Weston は Wayland コンポジタのリファレンス実装です。 |
||
| + | Westonは、正しさ、信頼性、予測可能性、パフォーマンスのために設計された [[Wayland]] コンポジターです。 |
||
| − | + | == インストール == |
|
| − | {{pkg|weston}} パッケージをインストールしてください。 |
+ | {{pkg|weston}} パッケージを[[インストール]]してください。 |
| − | + | == 使用方法 == |
|
| − | Weston をインストールしたのなら Wayland をテストする環境が整っているはずです。 |
||
| − | 起動中の X セッションの中で |
+ | Weston を起動するには次のようにします。起動中の X セッションの中からでも、TTY 中から (ネイティブ) でも実行できます: |
$ weston |
$ weston |
||
| + | 詳細と設定フラグについては {{man|1|weston}} を参照してください。 |
||
| − | もしくは、Weston をネイティブで起動するには、端末を切り替えて次を実行して見て下さい: |
||
| + | |||
| − | $ weston-launch |
||
| + | === デモアプリケーション === |
||
Weston の TTY からデモを実行できます。ターミナルエミュレータを起動するには: |
Weston の TTY からデモを実行できます。ターミナルエミュレータを起動するには: |
||
| 23行目: | 24行目: | ||
$ weston-image image1.jpg image2.jpg... |
$ weston-image image1.jpg image2.jpg... |
||
| − | === |
+ | === ショートカット === |
| + | |||
| + | {{tip|Super (windows キー) は変更可能です。こちらを参照 [[#Configuration|weston.ini]]}} |
||
| + | |||
| + | {| class="wikitable" |
||
| + | |+ '''キーボードショートカット''' |
||
| + | !コマンド |
||
| + | !アクション |
||
| + | |- |
||
| + | |{{ic|Ctrl+Alt+Backspace}} |
||
| + | |Weston を閉じる |
||
| + | |- |
||
| + | |{{ic|Super+Scroll}} (or {{ic|PageUp}}/{{ic|PageDown}}) |
||
| + | |デスクトップのズームイン/アウト |
||
| + | |- |
||
| + | |{{ic|Super+Tab}} |
||
| + | |ウィンドウスイッチ |
||
| + | |- |
||
| + | |{{ic|Super+LMB}} |
||
| + | |ウィンドウの移動 |
||
| + | |- |
||
| + | |{{ic|Super+MMB}} |
||
| + | |ウィンドウを回転させる |
||
| + | |- |
||
| + | |{{ic|Super+RMB}} |
||
| + | |ウィンドウのサイズ変更 |
||
| + | |- |
||
| + | |{{ic|Super+Alt+Scroll}} |
||
| + | |ウィンドウの不透明度を変更する |
||
| + | |- |
||
| + | |{{ic|Super+k}} |
||
| + | |アクティブウィンドウを強制終了する |
||
| + | |- |
||
| + | |{{ic|Super+Up/Down}} |
||
| + | |ワークスペースの前/次を切り替える |
||
| + | |- |
||
| + | |{{ic|Super+Shift+Up/Down}} |
||
| + | |カレントウィンドウの取得とワークスペースの切り替え |
||
| + | |- |
||
| + | |{{ic|Super+F''n''}} |
||
| + | |ワークスペースの切り替え ''n'' (例 F2) |
||
| + | |- |
||
| + | |{{ic|Super+s}} |
||
| + | |スクリーンショットを撮る |
||
| + | |- |
||
| + | |{{ic|Super+r}} |
||
| + | |スクリーンキャストを録画する |
||
| + | |} |
||
| + | |||
| + | == 設定 == |
||
| − | キーボードレイアウト・モジュール・UI の設定ファイルの例です。詳しくは {{man|5|weston.ini}} を見て下さい。Weston の出力設定は {{ic|xorg.conf}} |
+ | キーボードレイアウト・モジュール・UI の設定ファイルの例です。詳しくは {{man|5|weston.ini}} を見て下さい。Weston の出力設定は {{ic|xorg.conf}} におけるモニターと多少異なります: |
$ ls /sys/class/drm |
$ ls /sys/class/drm |
||
| 43行目: | 93行目: | ||
[libinput] |
[libinput] |
||
| − | + | enable-tap=true |
|
[shell] |
[shell] |
||
| − | background-image=/usr/share/backgrounds/gnome/Aqua.jpg |
+ | #background-image=/usr/share/backgrounds/gnome/Aqua.jpg |
| − | background- |
+ | background-type=scale-crop |
| − | + | background-color=0xff000000 |
|
| + | #background-color=0xff002244 |
||
| − | locking=true |
||
| + | #panel-color=0x90ff0000 |
||
| − | animation=zoom |
||
| + | panel-color=0x00ffffff |
||
| − | close-animation=fade |
||
| + | panel-position=bottom |
||
| + | #clock-format=none |
||
| + | #animation=zoom |
||
| + | #startup-animation=none |
||
| + | close-animation=none |
||
focus-animation=dim-layer |
focus-animation=dim-layer |
||
#binding-modifier=ctrl |
#binding-modifier=ctrl |
||
| − | + | num-workspaces=6 |
|
| + | locking=false |
||
| − | ### for cursor themes install xcursor-themes pkg from Extra. ### |
||
| − | + | cursor-theme=Adwaita |
|
| − | + | cursor-size=24 |
|
| − | + | # tablet options |
|
#lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png |
#lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png |
||
#lockscreen=/usr/share/backgrounds/gnome/Garden.jpg |
#lockscreen=/usr/share/backgrounds/gnome/Garden.jpg |
||
| 65行目: | 120行目: | ||
#animation=fade |
#animation=fade |
||
| − | + | # for Laptop displays |
|
| − | + | [output] |
|
| − | + | name=LVDS1 |
|
| + | mode=preferred |
||
#mode=1680x1050 |
#mode=1680x1050 |
||
#transform=90 |
#transform=90 |
||
| 82行目: | 138行目: | ||
#transform=flipped-270 |
#transform=flipped-270 |
||
| − | + | # on screen keyboard input method |
|
| + | #[input-method] |
||
#path=/usr/lib/weston/weston-keyboard |
#path=/usr/lib/weston/weston-keyboard |
||
[keyboard] |
[keyboard] |
||
keymap_rules=evdev |
keymap_rules=evdev |
||
| − | #keymap_layout= |
+ | #keymap_layout=us,de |
| + | #keymap_variant=colemak, |
||
| + | #keymap_options=grp:shifts_toggle |
||
#keymap_options=caps:ctrl_modifier,shift:both_capslock_cancel |
#keymap_options=caps:ctrl_modifier,shift:both_capslock_cancel |
||
| + | repeat-rate=30 |
||
| − | ### keymap_options from /usr/share/X11/xkb/rules/base.lst ### |
||
| + | repeat-delay=300 |
||
| − | numlock-on=true |
||
| + | |||
| + | # keymap_options from /usr/share/X11/xkb/rules/base.lst |
||
| + | #numlock-on=true |
||
[terminal] |
[terminal] |
||
| − | + | font=monospace |
|
| − | + | font-size=18 |
|
[launcher] |
[launcher] |
||
| − | icon=/usr/share/ |
+ | icon=/usr/share/weston/icon_flower.png |
| − | path=/usr/bin/weston- |
+ | path=/usr/bin/weston-flower |
[launcher] |
[launcher] |
||
| − | icon=/usr/share/icons/gnome/ |
+ | icon=/usr/share/icons/gnome/32x32/apps/utilities-terminal.png |
| − | path=/usr/bin/ |
+ | path=/usr/bin/weston-terminal --shell=/usr/bin/bash |
| − | [launcher] |
+ | #[launcher] |
| − | icon=/usr/share/icons/ |
+ | #icon=/usr/share/icons/gnome/32x32/apps/utilities-terminal.png |
| − | path=/usr/bin/ |
+ | #path=/usr/bin/gnome-terminal |
[launcher] |
[launcher] |
||
| − | icon=/usr/share/ |
+ | icon=/usr/share/icons/hicolor/32x32/apps/firefox.png |
| − | path=/usr/bin/ |
+ | path=MOZ_ENABLE_WAYLAND=1 /usr/bin/firefox |
| + | #[launcher] |
||
| − | [screensaver] |
||
| + | #icon=/usr/share/icons/Adwaita/32x32/apps/multimedia-volume-control.png |
||
| − | # Uncomment path to disable screensaver |
||
| − | path=/usr/ |
+ | #path=/usr/bin/st alsamixer -c0 |
| − | duration=600 |
||
</nowiki>}} |
</nowiki>}} |
||
| 139行目: | 200行目: | ||
path=/usr/bin/firefox |
path=/usr/bin/firefox |
||
</nowiki>}} |
</nowiki>}} |
||
| + | |||
| + | ==== モニター ==== |
||
| + | |||
| + | Weston の出力は {{ic|xorg.conf}} の出力と若干異なります。 |
||
| + | |||
| + | {{hc|$ ls /sys/class/drm| |
||
| + | card0 |
||
| + | card0-VGA-1 |
||
| + | card1 |
||
| + | card1-DVI-I-1 |
||
| + | card1-HDMI-A-1 |
||
| + | card1-VGA-2 |
||
| + | }} |
||
| + | |||
| + | {{ic|card0}} は未使用の内蔵ビデオアダプタです。アドオンアダプタ {{ic|card1}} は、HDMI とDVI モニタを1台ずつケーブルで接続しているので、出力名は {{ic|HDMI-A-1}} と {{ic|DVI-I-1}} となっています。 |
||
==== XWayland ==== |
==== XWayland ==== |
||
| − | + | 詳細と利用可能なパッケージの概要については、[[Wayland#Xwayland]] を参照してください。 |
|
| + | XWayland の使用を有効にするには、以下の config キーを設定します。 |
||
| − | Weston の中で X アプリケーションを動かすには、Xwayland を使ってリクエストを処理させます。以下の設定ファイルを作成してください: |
||
{{hc|~/.config/weston.ini| |
{{hc|~/.config/weston.ini| |
||
<nowiki>[core] |
<nowiki>[core] |
||
| 150行目: | 226行目: | ||
}} |
}} |
||
| − | {{Note|X を設定していない場合、キーマップの設定が必要です: [[Xorg でのキーボード設定]] |
+ | {{Note|X を設定していない場合、キーマップの設定が必要です: [[Xorg でのキーボード設定]]}} |
| + | |||
| + | === HiDPI ディスプレイ === |
||
| + | Retina または [[HiDPI]] のディスプレイでは以下を使用してください: |
||
| + | {{hc|~/.config/weston.ini|<nowiki> |
||
| + | [output] |
||
| + | name=... |
||
| + | scale=2 |
||
| + | </nowiki>}} |
||
| + | |||
| + | === シェルのフォント === |
||
| + | |||
| + | Weston はウィンドウのタイトルバーや時計などにデフォルトの sans-serif フォントを使用します。フォントを変更する方法は[[フォント設定#フォントの置き換え]]を見て下さい。 |
||
| + | |||
| + | == ヒントとテクニック == |
||
| − | + | === スクリーンキャスト録画 === |
|
Weston にはスクリーンキャスト機能が備わっており、{{ic|Super+r}} キーを押すことで録画を開始・停止することができます。スクリーンキャストは Weston のカレントディレクトリ内の {{ic|capture.wcap}} ファイルに保存されます。 |
Weston にはスクリーンキャスト機能が備わっており、{{ic|Super+r}} キーを押すことで録画を開始・停止することができます。スクリーンキャストは Weston のカレントディレクトリ内の {{ic|capture.wcap}} ファイルに保存されます。 |
||
| 161行目: | 251行目: | ||
作成された YUV ファイルは [[FFmpeg]] を使うことで他のフォーマットに変換できます。 |
作成された YUV ファイルは [[FFmpeg]] を使うことで他のフォーマットに変換できます。 |
||
| − | + | === ウィンドウの切り替え === |
|
| − | Retina または [[HiDPI]] のディスプレイでは以下を使用してください: |
||
| − | {{hc|~/.config/weston.ini|<nowiki> |
||
| − | [output] |
||
| − | name=... |
||
| − | scale=2 |
||
| − | </nowiki>}} |
||
| + | {{ic|Super+Space}} でウィンドウを切り替えるには、 {{ic|desktop-shell/shell.c}} 内の {{ic|KEY_TAB}} を {{ic|KEY_SPACE}} に変更して {{Pkg|weston}} を再コンパイルしてください。 |
||
| − | ==== シェルのフォント ==== |
||
| + | == 参照 == |
||
| − | Weston はウィンドウのタイトルバーや時計などにデフォルトの sans-serif フォントを使用します。フォントを変更する方法は[[フォント設定#フォントの置き換え]]を見て下さい。 |
||
| + | |||
| + | * [https://gitlab.freedesktop.org/wayland/weston Official Weston Gitlab Repo] |
||
| + | |||
| + | {{TranslationStatus|Weston|2023-07-28|782600}} |
||
2025年7月30日 (水) 19:44時点における最新版
Westonは、正しさ、信頼性、予測可能性、パフォーマンスのために設計された Wayland コンポジターです。
目次
インストール
使用方法
Weston を起動するには次のようにします。起動中の X セッションの中からでも、TTY 中から (ネイティブ) でも実行できます:
$ weston
詳細と設定フラグについては weston(1) を参照してください。
デモアプリケーション
Weston の TTY からデモを実行できます。ターミナルエミュレータを起動するには:
$ weston-terminal
画面に花を散らすには:
$ weston-flower
画像を表示するには:
$ weston-image image1.jpg image2.jpg...
ショートカット
| コマンド | アクション |
|---|---|
Ctrl+Alt+Backspace
|
Weston を閉じる |
Super+Scroll (or PageUp/PageDown)
|
デスクトップのズームイン/アウト |
Super+Tab
|
ウィンドウスイッチ |
Super+LMB
|
ウィンドウの移動 |
Super+MMB
|
ウィンドウを回転させる |
Super+RMB
|
ウィンドウのサイズ変更 |
Super+Alt+Scroll
|
ウィンドウの不透明度を変更する |
Super+k
|
アクティブウィンドウを強制終了する |
Super+Up/Down
|
ワークスペースの前/次を切り替える |
Super+Shift+Up/Down
|
カレントウィンドウの取得とワークスペースの切り替え |
Super+Fn
|
ワークスペースの切り替え n (例 F2) |
Super+s
|
スクリーンショットを撮る |
Super+r
|
スクリーンキャストを録画する |
設定
キーボードレイアウト・モジュール・UI の設定ファイルの例です。詳しくは weston.ini(5) を見て下さい。Weston の出力設定は xorg.conf におけるモニターと多少異なります:
$ ls /sys/class/drm card0 card0-VGA-1 card1 card1-DVI-I-1 card1-HDMI-A-1 card1-VGA-2
card0 は使われていない内蔵ビデオアダプタです。追加アダプタ card1 は HDMI と DVI モニターに接続されており、出力名が HDMI-A-1 と DVI-I-1 です。
~/.config/weston.ini
[core] # xwayland support xwayland=true [libinput] enable-tap=true [shell] #background-image=/usr/share/backgrounds/gnome/Aqua.jpg background-type=scale-crop background-color=0xff000000 #background-color=0xff002244 #panel-color=0x90ff0000 panel-color=0x00ffffff panel-position=bottom #clock-format=none #animation=zoom #startup-animation=none close-animation=none focus-animation=dim-layer #binding-modifier=ctrl num-workspaces=6 locking=false cursor-theme=Adwaita cursor-size=24 # tablet options #lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png #lockscreen=/usr/share/backgrounds/gnome/Garden.jpg #homescreen=/usr/share/backgrounds/gnome/Blinds.jpg #animation=fade # for Laptop displays [output] name=LVDS1 mode=preferred #mode=1680x1050 #transform=90 #[output] #name=VGA1 # The following sets the mode with a modeline, you can get modelines for your preffered resolutions using the cvt utility #mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync #transform=flipped #[output] #name=X1 #mode=1024x768 #transform=flipped-270 # on screen keyboard input method #[input-method] #path=/usr/lib/weston/weston-keyboard [keyboard] keymap_rules=evdev #keymap_layout=us,de #keymap_variant=colemak, #keymap_options=grp:shifts_toggle #keymap_options=caps:ctrl_modifier,shift:both_capslock_cancel repeat-rate=30 repeat-delay=300 # keymap_options from /usr/share/X11/xkb/rules/base.lst #numlock-on=true [terminal] font=monospace font-size=18 [launcher] icon=/usr/share/weston/icon_flower.png path=/usr/bin/weston-flower [launcher] icon=/usr/share/icons/gnome/32x32/apps/utilities-terminal.png path=/usr/bin/weston-terminal --shell=/usr/bin/bash #[launcher] #icon=/usr/share/icons/gnome/32x32/apps/utilities-terminal.png #path=/usr/bin/gnome-terminal [launcher] icon=/usr/share/icons/hicolor/32x32/apps/firefox.png path=MOZ_ENABLE_WAYLAND=1 /usr/bin/firefox #[launcher] #icon=/usr/share/icons/Adwaita/32x32/apps/multimedia-volume-control.png #path=/usr/bin/st alsamixer -c0
最小の weston.ini:
~/.config/weston.ini
[core] xwayland=true [keyboard] keymap_layout=gb [output] name=LVDS1 mode=1680x1050 transform=90 [launcher] icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png path=/usr/bin/weston-terminal [launcher] icon=/usr/share/icons/hicolor/24x24/apps/firefox.png path=/usr/bin/firefox
モニター
Weston の出力は xorg.conf の出力と若干異なります。
$ ls /sys/class/drm
card0 card0-VGA-1 card1 card1-DVI-I-1 card1-HDMI-A-1 card1-VGA-2
card0 は未使用の内蔵ビデオアダプタです。アドオンアダプタ card1 は、HDMI とDVI モニタを1台ずつケーブルで接続しているので、出力名は HDMI-A-1 と DVI-I-1 となっています。
XWayland
詳細と利用可能なパッケージの概要については、Wayland#Xwayland を参照してください。
XWayland の使用を有効にするには、以下の config キーを設定します。
~/.config/weston.ini
[core] xwayland=true
HiDPI ディスプレイ
Retina または HiDPI のディスプレイでは以下を使用してください:
~/.config/weston.ini
[output] name=... scale=2
シェルのフォント
Weston はウィンドウのタイトルバーや時計などにデフォルトの sans-serif フォントを使用します。フォントを変更する方法はフォント設定#フォントの置き換えを見て下さい。
ヒントとテクニック
スクリーンキャスト録画
Weston にはスクリーンキャスト機能が備わっており、Super+r キーを押すことで録画を開始・停止することができます。スクリーンキャストは Weston のカレントディレクトリ内の capture.wcap ファイルに保存されます。
WCAP ファイルは Weston 専用のロスレス動画フォーマットで、フレーム間の差異だけを記録しています。記録されたスクリーンキャストを再生するには、WCAP ファイルをメディアプレイヤーが再生できるフォーマットに変換する必要があります。まず、録画した動画を YUV ピクセル形式に変換してください:
$ wcap-decode capture.wcap --yuv4mpeg2 > capture.y4m
作成された YUV ファイルは FFmpeg を使うことで他のフォーマットに変換できます。
ウィンドウの切り替え
Super+Space でウィンドウを切り替えるには、 desktop-shell/shell.c 内の KEY_TAB を KEY_SPACE に変更して weston を再コンパイルしてください。