如何在Xubuntu中设置“切换用户”的键盘快捷键？ 由 eipsum发布于 2013-04-30 06:33:08 xubuntuxfceswitch-user 收藏 我正在尝试在Xubuntu（13.04）中创建一个键盘快捷键，但是我不知道该命令应该输入什么。调用切换用户的命令是什么？ 请 登录后发表观点 zhic 2013-04-30 07:09:34 回复 I checked with the source code of the 'actions button' plugin built in to the xfce4-panel and the switch user mechanism uses gdmflexiserver, while most of the other actions use parameters to xfce4-session-logout. The source was fetched with apt-get source xfce4-panel; the information was in ~/xfce4-panel-4.10.0/plugins/actions/actions.c: case ACTION_TYPE_SWITCH_USER: succeed = g_spawn_command_line_async ("gdmflexiserver", &error); break; You will find the executable at /usr/lib/lightdm/lightdm/gdmflexiserver, which is actually just a script: #!/bin/sh # # Copyright (C) 2011 Canonical Ltd # Author: Michael Terry <firstname.lastname@example.org> # # 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 It isn't in $PATH, so if you use it in a script, you will need to specify the absolute path. I am not sure whether it takes any other switches, but will add some further information if so. Useful commands for scripts can also be found in the manpage for xfce4-session-logout, although the switch user action is not mentioned there, as it uses a different utility called gdmflexiserver.