
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
。