「Guake」の版間の差分
Kusakata.bot (トーク | 投稿記録) 細 (文字列「http://linux.die.net/」を「https://linux.die.net/」に置換) |
|||
| (他の1人の利用者による、間の3版が非表示) | |||
| 6行目: | 6行目: | ||
{{Related|GNOME}} |
{{Related|GNOME}} |
||
{{Related articles end}} |
{{Related articles end}} |
||
| − | [http://guake.org Guake] は [[GNOME]] のトップダウン型ターミナルです ([[KDE]] の [[Yakuake]] や [[Tilda]]、Quake で使われているターミナルと同じスタイル)。 |
+ | [http://guake-project.org/ Guake] は [[GNOME]] のトップダウン型ターミナルです ([[KDE]] の [[Yakuake]] や [[Tilda]]、Quake で使われているターミナルと同じスタイル)。 |
== インストール == |
== インストール == |
||
| 18行目: | 18行目: | ||
$ guake |
$ guake |
||
| + | guake を起動したらインターフェイスを右クリックして ''Preferences'' を選択することでターミナルを自動的にドロップするホットキーを変更できます。デフォルトでは {{ic|F12}} に設定されています。 |
||
| − | After guake has started you can right click on the interface and select ''Preferences'' to change the hotkey to drop the terminal automatically, by default it is set to {{ic|F12}}. |
||
| + | また、''apps > guake'' の ''gconf-editor'' ツールで Guake の様々な設定を変更できます。''guake'' の実行ファイル ({{ic|/usr/bin/guake}}) を {{ic|/usr/local/bin/guake}} にコピーしてテキストエディタで編集することもできます。中身は [[Python]] スクリプトです。ファイルをコピーしたら実行可能属性を付与してください。 |
||
| − | Also, you can adjust many of the Guake preferences with ''gconf-editor'' tool under ''apps > guake''. If it's not enough for you, you are always free to copy the ''guake'' executable ({{ic|/usr/bin/guake}}) to {{ic|/usr/local/bin/guake}} and edit it in text editor, since it's just a [[Python]] script. Remember to make the file executable. |
||
== 自動起動 == |
== 自動起動 == |
||
| 31行目: | 31行目: | ||
== Guake スクリプト == |
== Guake スクリプト == |
||
| + | [[Yakuake]] と同じように、Guake でも [[D-Bus]] のメッセージを送信することで制御ができます。Guake をユーザー定義セッションで起動することが可能です。ターミナルからコマンドを実行したりカスタムスクリプトを作成することで、タブを作成して名前を割り当てたり、開かれたタブで特定のコマンドを実行したり、Guake のウィンドウの表示・非表示を切り替えたりすることができます。 |
||
| − | Like [[Yakuake]], Guake allows to control itself at runtime by sending the [[D-Bus]] messages. Thus it can be used to start Guake in a user defined session. You can create tabs, assign names for them and also ask to run any specific command in any opened tab or just to show/hide Guake window, manually in a terminal or by creating a custom script for it. |
||
| + | このセクションの下の方にサンプルスクリプトを記載しています。 |
||
| − | Example of such a script is given below this section. |
||
| + | ''guake'' の実行ファイルを使って D-Bus メッセージを送ることもできます。以下は利用可能なオプションの一覧です: |
||
| − | You can use ''guake'' executable itself to send D-Bus messages. Here is the list of available options you may be interested in: |
||
| + | * {{ic|-t}}, {{ic|--toggle-visibility}} — ターミナルウィンドウの表示を切り替えます。{{ic|guake}} とだけ入力することで、起動中のインスタンスの表示・非表示が切り替わります。 |
||
| − | * {{ic|-t}}, {{ic|--toggle-visibility}} — toggle the visibility of the terminal window. Actually, you can just type {{ic|guake}}, and it will toggle the visibility of already running instance. |
||
| − | * {{ic|-f}}, {{ic|--fullscreen}} — |
+ | * {{ic|-f}}, {{ic|--fullscreen}} — Guake をフルスクリーンモードにする。 |
| − | * {{ic|--show}} — |
+ | * {{ic|--show}} — Guake のメインウィンドウを表示。 |
| − | * {{ic|--hide}} — |
+ | * {{ic|--hide}} — Guake のメインウィンドウを非表示にする。 |
| − | * {{ic|-n ''CUR_DIR''}}, {{ic|1=--new-tab=''CUR_DIR''}} — |
+ | * {{ic|-n ''CUR_DIR''}}, {{ic|1=--new-tab=''CUR_DIR''}} — 新しいタブを作成して選択。{{ic|CUR_DIR}} でタブのカレントディレクトリを指定できます。 |
| − | * {{ic|-s ''INDEX''}}, {{ic|1=--select-tab=''INDEX''}} — |
+ | * {{ic|-s ''INDEX''}}, {{ic|1=--select-tab=''INDEX''}} — {{ic|INDEX}} 番目のタブを選択。タブの順番は 0 から始まります。 |
| − | * {{ic|-g}}, {{ic|--selected-tab}} — |
+ | * {{ic|-g}}, {{ic|--selected-tab}} — 現在選択されているタブの順番を表示。 |
| − | * {{ic|-e ''CMD''}}, {{ic|1=--execute-command=''CMD''}} — |
+ | * {{ic|-e ''CMD''}}, {{ic|1=--execute-command=''CMD''}} — 選択したタブで任意のコマンド {{ic|CMD}} を実行。 |
| − | * {{ic|-i ''INDEX''}}, {{ic|1=--tab-index=''INDEX''}} — |
+ | * {{ic|-i ''INDEX''}}, {{ic|1=--tab-index=''INDEX''}} — {{ic|--rename-tab}} でタイトルを変更するタブのインデックス {{ic|INDEX}} を指定します。デフォルトの値は 0 です。 |
| − | * {{ic|1=--rename-tab=''TITLE''}} — |
+ | * {{ic|1=--rename-tab=''TITLE''}} — タブの名前を {{ic|TITLE}} に設定。シングルダッシュ ({{ic|"-"}}) を指定した場合はデフォルトの値にタイトルがリセットされます。{{ic|-i}} オプションでタイトルを変更するタブを指定します。 |
| − | * {{ic|1=--bgcolor=''RGB''}} — |
+ | * {{ic|1=--bgcolor=''RGB''}} — 選択されたタブの背景色を16進数の色コード ({{ic|#rrggbb}}) で設定します。 |
| − | * {{ic|1=--fgcolor=''RGB''}} — |
+ | * {{ic|1=--fgcolor=''RGB''}} — 選択されたタブの前景色を16進数の色コード ({{ic|#rrggbb}}) で設定します。 |
| − | * {{ic|-r ''TITLE''}}, {{ic|1=--rename-current-tab=''TITLE''}} — |
+ | * {{ic|-r ''TITLE''}}, {{ic|1=--rename-current-tab=''TITLE''}} — {{ic|--rename-tab}} と同じように現在選択中のタブの名前を変更します。 |
| − | * {{ic|-q}}, {{ic|--quit}} — |
+ | * {{ic|-q}}, {{ic|--quit}} — 実行中の Guake インスタンスを終了。 |
| + | 複数のオプションを組み合わせて使用することもできます。guake のインスタンスが動作していない場合、指定されたオプションは全て新しく作成されたインスタンスに適用されます。 |
||
| − | Multiple options may be combined in a single call. If there's no guake instance running, all of the options specified will be applied to the newly created instance. |
||
| + | 利用可能な全てのオプションを確認するには {{ic|guake --help}} と入力してください。 |
||
| − | To display list of all available options, type {{ic|guake --help}}. |
||
| + | |||
| + | guake の起動時にスクリプトを適用する方法は2つあります: |
||
| + | * 下のようなスクリプトを {{ic|guake-init.sh}} という名前で保存してから実行可能属性を付与して guake の代わりにファイルを実行する。 |
||
| + | * {{ic|Guake Terminal > Preferences > General}} から "Path to script executed on Guake start:" セクションに {{ic|guake-init.sh}} スクリプトを追加する (スクリプト内の {{ic|/usr/bin/guake &}} はコメントアウトしてください)。 |
||
| + | |||
| + | guake の起動方法によらずスクリプトを実行したい場合は後者の方法を推奨します。スクリプトを実行したくない場合は {{ic|guake --no-startup-script}} で guake を起動できます。 |
||
例: |
例: |
||
| 69行目: | 75行目: | ||
guake --new-tab --execute="/usr/bin/bash" |
guake --new-tab --execute="/usr/bin/bash" |
||
# and then execute htop, renaming the tab to "htop" |
# and then execute htop, renaming the tab to "htop" |
||
| − | guake --execute="/usr/bin/htop" --rename-tab="htop" |
+ | guake --execute="/usr/bin/htop" --rename-current-tab="htop" |
# ... |
# ... |
||
guake --new-tab --execute="/usr/bin/bash" |
guake --new-tab --execute="/usr/bin/bash" |
||
| − | guake --execute="/usr/bin/atop" --rename-tab="atop" |
+ | guake --execute="/usr/bin/atop" --rename-current-tab="atop" |
guake --new-tab --execute="/usr/bin/bash" |
guake --new-tab --execute="/usr/bin/bash" |
||
| − | guake --execute="~/.iptables.sh" --rename-tab="iptables -nvL" |
+ | guake --execute="~/.iptables.sh" --rename-current-tab="iptables -nvL" |
guake --new-tab --execute="/usr/bin/bash" |
guake --new-tab --execute="/usr/bin/bash" |
||
| − | guake --execute="/usr/bin/journalctl --follow --full" --rename-tab="journalctl" |
+ | guake --execute="/usr/bin/journalctl --follow --full" --rename-current-tab="journalctl" |
guake --new-tab --execute="/usr/bin/bash" |
guake --new-tab --execute="/usr/bin/bash" |
||
| − | guake --execute="/usr/bin/irssi" --rename-tab="irssi" |
+ | guake --execute="/usr/bin/irssi" --rename-current-tab="irssi" |
guake --new-tab --execute="/usr/bin/bash" |
guake --new-tab --execute="/usr/bin/bash" |
||
| − | guake --execute="/usr/bin/sudo -i" --rename-tab="rootshell0" |
+ | guake --execute="/usr/bin/sudo -i" --rename-current-tab="rootshell0" |
guake --new-tab --execute="/usr/bin/bash" |
guake --new-tab --execute="/usr/bin/bash" |
||
| − | guake --execute="/usr/bin/sudo -i" --rename-tab="rootshell1" |
+ | guake --execute="/usr/bin/sudo -i" --rename-current-tab="rootshell1" |
guake --new-tab --execute="/usr/bin/bash" |
guake --new-tab --execute="/usr/bin/bash" |
||
| − | guake --rename-tab="shell0" |
+ | guake --rename-current-tab="shell0" |
guake --new-tab --execute="/usr/bin/bash" |
guake --new-tab --execute="/usr/bin/bash" |
||
| − | guake --rename-tab="shell1" |
+ | guake --rename-current-tab="shell1" |
| + | 実行中のインスタンスが競合状態にならないように ''sleep'' を実行していることに注意してください。 |
||
| − | Notice than we should wait some time calling ''sleep'' to avoid race conditions between running instances. |
||
| + | |||
| + | {{Warning|{{ic|--execute}} オプションを使用すると {{ic|fdisk}} や |
||
| + | {{ic|innotop}} などのテキストインターフェイスプログラムを起動しているタブに問題を発生させることがあります。注意して使ってください。詳しくは github のバグレポートを参照: [https://github.com/Guake/guake/issues/921 guake#921]。}} |
||
== マルチモニタで Guake を使う == |
== マルチモニタで Guake を使う == |
||
| + | Guake ウィンドウが表示される画面を変更できる GConf のオプションが2つ存在します: |
||
| − | There are two GConf options allowing you to change the screen on which Guake window will appear: |
||
| + | * {{ic|/apps/guake/general/display_n}} — 表示するディスプレイを指定。設定された値が不正な場合、自動的にプライマリスクリーンに設定されます。 |
||
| − | * {{ic|/apps/guake/general/display_n}} — display to appear on if the {{ic|mouse_display}} option is not set. If this is set to an invalid value (as in the case of removing a screen from a system), the invalid value is automatically updated to the current primary screen. |
||
| − | * {{ic|/apps/guake/general/mouse_display}} — |
+ | * {{ic|/apps/guake/general/mouse_display}} — マウスがあるディスプレイに表示。{{ic|display_n}} の設定を上書きします。 |
| − | + | ''gconf-editor'' などのツールを使って GConf オプションを編集してください。 |
|
== トラブルシューティング == |
== トラブルシューティング == |
||
| 112行目: | 121行目: | ||
=== 'Ctrl' キーバインドの問題 === |
=== 'Ctrl' キーバインドの問題 === |
||
| + | {{Pkg|guake}} 0.4.2-7 現在、Guake のウィンドウの表示切り替えで {{ic|Ctrl}} キーを使っているユーザーに影響があるバグが存在します ({{ic|Ctrl+Shift+z}} で guake コンソールを開くように設定しても {{ic|Shift+z}} を押すだけで開いてしまいます。{{ic|Ctrl}} キーが押されているかどうかが反映されません)。 |
||
| − | As of {{Pkg|guake}} 0.4.2-7 there has been a noted bug affecting multiple users concerning the use of the {{ic|Ctrl}} key to toggle Guake window visibility (i.e. users that setup {{ic|Ctrl+Shift+z}} to open the guake console are able to open it by just pressing {{ic|Shift+z}}, independent on whether {{ic|Ctrl}} key has been pressed). |
||
| + | |||
| + | 問題を解決するには手動で GConf キー {{ic|/apps/guake/keybindings/global/show_hide}} の値を編集してください。''gconf-editor'' を開いて ''apps > guake > keybindings > global > show_hide'' から {{ic|<Primary>}} を {{ic|<Control>}} に置き換えてください。 |
||
| + | |||
| + | === フロート型ウィンドウマネージャの問題 === |
||
| + | |||
| + | Tilda とフロート型ウィンドウマネージャを使用している場合、クラス文字列 "Tilda" を使ってウィンドウをフロートするように設定できると思うかもしれませんが、Guake の WM_CLASS(STRING) の出力は "Main.py" であるため、設定するときは "Main.py" を使う必要があります。例えば i3wm の場合、{{ic|~/.i3/config}} に以下を追加: |
||
| + | for_window [class="Main.py"] floating enable |
||
| − | To solve the problem you should manually fix the value of the GConf key {{ic|/apps/guake/keybindings/global/show_hide}}. Open a ''gconf-editor'', navigate to ''apps > guake > keybindings > global > show_hide'' and replace {{ic|<Primary>}} with {{ic|<Control>}}. |
||
== 参照 == |
== 参照 == |
||
| − | * [ |
+ | * [https://linux.die.net/man/1/guake man guake(1)] on die.net |
2018年2月6日 (火) 23:43時点における最新版
関連記事
Guake は GNOME のトップダウン型ターミナルです (KDE の Yakuake や Tilda、Quake で使われているターミナルと同じスタイル)。
目次
インストール
使用方法
インストールしたら、ターミナルから次のコマンドを実行することで Guake を起動できます:
$ guake
guake を起動したらインターフェイスを右クリックして Preferences を選択することでターミナルを自動的にドロップするホットキーを変更できます。デフォルトでは F12 に設定されています。
また、apps > guake の gconf-editor ツールで Guake の様々な設定を変更できます。guake の実行ファイル (/usr/bin/guake) を /usr/local/bin/guake にコピーしてテキストエディタで編集することもできます。中身は Python スクリプトです。ファイルをコピーしたら実行可能属性を付与してください。
自動起動
デスクトップ環境が起動するときに Guake がロードされるようにしたい場合、次を実行してください:
# cp /usr/share/applications/guake.desktop /etc/xdg/autostart/
詳しくは自動起動を参照。
Guake スクリプト
Yakuake と同じように、Guake でも D-Bus のメッセージを送信することで制御ができます。Guake をユーザー定義セッションで起動することが可能です。ターミナルからコマンドを実行したりカスタムスクリプトを作成することで、タブを作成して名前を割り当てたり、開かれたタブで特定のコマンドを実行したり、Guake のウィンドウの表示・非表示を切り替えたりすることができます。
このセクションの下の方にサンプルスクリプトを記載しています。
guake の実行ファイルを使って D-Bus メッセージを送ることもできます。以下は利用可能なオプションの一覧です:
-t,--toggle-visibility— ターミナルウィンドウの表示を切り替えます。guakeとだけ入力することで、起動中のインスタンスの表示・非表示が切り替わります。-f,--fullscreen— Guake をフルスクリーンモードにする。--show— Guake のメインウィンドウを表示。--hide— Guake のメインウィンドウを非表示にする。-n CUR_DIR,--new-tab=CUR_DIR— 新しいタブを作成して選択。CUR_DIRでタブのカレントディレクトリを指定できます。-s INDEX,--select-tab=INDEX—INDEX番目のタブを選択。タブの順番は 0 から始まります。-g,--selected-tab— 現在選択されているタブの順番を表示。-e CMD,--execute-command=CMD— 選択したタブで任意のコマンドCMDを実行。-i INDEX,--tab-index=INDEX—--rename-tabでタイトルを変更するタブのインデックスINDEXを指定します。デフォルトの値は 0 です。--rename-tab=TITLE— タブの名前をTITLEに設定。シングルダッシュ ("-") を指定した場合はデフォルトの値にタイトルがリセットされます。-iオプションでタイトルを変更するタブを指定します。--bgcolor=RGB— 選択されたタブの背景色を16進数の色コード (#rrggbb) で設定します。--fgcolor=RGB— 選択されたタブの前景色を16進数の色コード (#rrggbb) で設定します。-r TITLE,--rename-current-tab=TITLE—--rename-tabと同じように現在選択中のタブの名前を変更します。-q,--quit— 実行中の Guake インスタンスを終了。
複数のオプションを組み合わせて使用することもできます。guake のインスタンスが動作していない場合、指定されたオプションは全て新しく作成されたインスタンスに適用されます。
利用可能な全てのオプションを確認するには guake --help と入力してください。
guake の起動時にスクリプトを適用する方法は2つあります:
- 下のようなスクリプトを
guake-init.shという名前で保存してから実行可能属性を付与して guake の代わりにファイルを実行する。 Guake Terminal > Preferences > Generalから "Path to script executed on Guake start:" セクションにguake-init.shスクリプトを追加する (スクリプト内の/usr/bin/guake &はコメントアウトしてください)。
guake の起動方法によらずスクリプトを実行したい場合は後者の方法を推奨します。スクリプトを実行したくない場合は guake --no-startup-script で guake を起動できます。
例:
#!/bin/bash /usr/bin/guake & sleep 5 # let main guake process start and initialize D-Bus session # adjust tab which was opened by default guake --rename-tab="iotop" --execute="/usr/bin/iotop" # create new tab, start bash session in it guake --new-tab --execute="/usr/bin/bash" # and then execute htop, renaming the tab to "htop" guake --execute="/usr/bin/htop" --rename-current-tab="htop" # ... guake --new-tab --execute="/usr/bin/bash" guake --execute="/usr/bin/atop" --rename-current-tab="atop" guake --new-tab --execute="/usr/bin/bash" guake --execute="~/.iptables.sh" --rename-current-tab="iptables -nvL" guake --new-tab --execute="/usr/bin/bash" guake --execute="/usr/bin/journalctl --follow --full" --rename-current-tab="journalctl" guake --new-tab --execute="/usr/bin/bash" guake --execute="/usr/bin/irssi" --rename-current-tab="irssi" guake --new-tab --execute="/usr/bin/bash" guake --execute="/usr/bin/sudo -i" --rename-current-tab="rootshell0" guake --new-tab --execute="/usr/bin/bash" guake --execute="/usr/bin/sudo -i" --rename-current-tab="rootshell1" guake --new-tab --execute="/usr/bin/bash" guake --rename-current-tab="shell0" guake --new-tab --execute="/usr/bin/bash" guake --rename-current-tab="shell1"
実行中のインスタンスが競合状態にならないように sleep を実行していることに注意してください。
マルチモニタで Guake を使う
Guake ウィンドウが表示される画面を変更できる GConf のオプションが2つ存在します:
/apps/guake/general/display_n— 表示するディスプレイを指定。設定された値が不正な場合、自動的にプライマリスクリーンに設定されます。
/apps/guake/general/mouse_display— マウスがあるディスプレイに表示。display_nの設定を上書きします。
gconf-editor などのツールを使って GConf オプションを編集してください。
トラブルシューティング
'Ctrl' キーバインドの問題
guake 0.4.2-7 現在、Guake のウィンドウの表示切り替えで Ctrl キーを使っているユーザーに影響があるバグが存在します (Ctrl+Shift+z で guake コンソールを開くように設定しても Shift+z を押すだけで開いてしまいます。Ctrl キーが押されているかどうかが反映されません)。
問題を解決するには手動で GConf キー /apps/guake/keybindings/global/show_hide の値を編集してください。gconf-editor を開いて apps > guake > keybindings > global > show_hide から <Primary> を <Control> に置き換えてください。
フロート型ウィンドウマネージャの問題
Tilda とフロート型ウィンドウマネージャを使用している場合、クラス文字列 "Tilda" を使ってウィンドウをフロートするように設定できると思うかもしれませんが、Guake の WM_CLASS(STRING) の出力は "Main.py" であるため、設定するときは "Main.py" を使う必要があります。例えば i3wm の場合、~/.i3/config に以下を追加:
for_window [class="Main.py"] floating enable
参照
- man guake(1) on die.net