![Xubuntu で「ユーザーの切り替え」のキーボード ショートカットを設定するにはどうすればいいですか?](https://rvso.com/image/1114975/Xubuntu%20%E3%81%A7%E3%80%8C%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%81%AE%E5%88%87%E3%82%8A%E6%9B%BF%E3%81%88%E3%80%8D%E3%81%AE%E3%82%AD%E3%83%BC%E3%83%9C%E3%83%BC%E3%83%89%20%E3%82%B7%E3%83%A7%E3%83%BC%E3%83%88%E3%82%AB%E3%83%83%E3%83%88%E3%82%92%E8%A8%AD%E5%AE%9A%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%81%84%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F.png)
Xubuntu (13.04) でキーボード ショートカットを作成しようとしていますが、コマンドに何を入力すればよいかわかりません。ユーザーの切り替えを呼び出すコマンドは何ですか?
答え1
xfce4-panel に組み込まれている「アクション ボタン」プラグインのソース コードを確認したところ、ユーザー切り替えメカニズムでは が使用されgdmflexiserver
、他のほとんどのアクションでは へのパラメータが使用されていますxfce4-session-logout
。
ソースは で取得されましたapt-get source xfce4-panel
。情報は ~/xfce4-panel-4.10.0/plugins/actions/actions.c:
case ACTION_TYPE_SWITCH_USER:
succeed = g_spawn_command_line_async ("gdmflexiserver", &error);
break;
実行可能ファイルは にありますが/usr/lib/lightdm/lightdm/gdmflexiserver
、これは実際には単なるスクリプトです。
#!/bin/sh
#
# Copyright (C) 2011 Canonical Ltd
# Author: Michael Terry <[email protected]>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, version 3 of the License.
#
# See http://www.gnu.org/copyleft/gpl.html for the full text of the license.
if [ -z "$XDG_SEAT_PATH" ]; then
# something went wrong
exit 1
fi
dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToGreeter
には含まれていない$PATH
ため、スクリプト内で使用する場合は絶対パスを指定する必要があります。他のスイッチが必要になるかどうかはわかりませんが、必要であればさらに情報を追加します。
スクリプトの便利なコマンドは のマニュアルページにも記載されていますがxfce4-session-logout
、 と呼ばれる別のユーティリティを使用するため、ユーザー切り替えアクションについてはそこには記載されていませんgdmflexiserver
。