Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using xubuntu 11.10. I'd like to be able to switch users, and I'd like to be able to do this within the xfce user interface. I read somewhere that there might be an applet I can install, but I cannot seem to find it. Can someone help?

share|improve this question

enter image description here

In a terminal:

sudo apt-get install xfswitch-plugin

During installation it will ask you to switch window manager - do not choose GDM, but stick with lightdm. N.B. since its a text screen press TAB to navigate to "OK" and press ENTER

Right-click and add a new panel item - User Switching

share|improve this answer
Great! Now if only there was a way to add that to the Logout/Suspend/Hibernate menu instead of having it a separate entry... – weronika May 17 '12 at 22:37
CAREFUL WITH THAT AXE, EUGENE! This will bring in the entire heavyweight Gnome... That's a bad choice if you run XFCE. – woohoo Sep 7 '13 at 16:45

If you don't want to bring in the whole of gdm and dependencies, you can just create a launcher that achieves the same thing. Put this

zenity --question --text "Switch user?" --title "New login" &&
gdmflexiserver --new

into a file called fast-user-switch, then do

chmod +x fast-user-switch
sudo mv fast-user-switch /usr/local/bin/

Then add a Launcher plugin to your panel, edit the menu and click the button with a white paper with a plus on it, there you can just type in fast-user-switch (it should auto-complete while you type if you did the past steps correctly), and select a nice icon (search for switch for a fitting one …)

Note: The next version of XFCE, 4.10, will include a Switch User button in the Actions plugin, and deprecate the session menu.

Note to the note: if you have kdm instead of gdm/lightdm (kdm+xfce may be an odd combination, but it happens), the 4.10 Switch User button doesn't work. However, the following bash script works, and additionally lets you either log in as a currently logged in user, or start a new login:


set -f              # no globbing, so we can safely use *

# other_local[joe]=:0, other_local[bob]=:1 etc. for all active local
# users other than us:
unset other_local; declare -A other_local; 
while read -rd $'\t'; do
    IFS=$',\n' r=($REPLY)
    [[ "${#r[@]}" -ge 4 && "${r[4]}" != '*' && "${r[2]}" != '' && "${r[0]}" != '' ]] && other_local[${r[2]}]=${r[0]}
done < <(kdmctl list alllocal)
IFS=$',\n' r=($REPLY)
[[ "${#r[@]}" -ge 4 && "${r[4]}" != '*' && "${r[2]}" != '' && "${r[0]}" != '' ]] && other_local[${r[2]}]=${r[0]}

user_choice=$( printf "%s\n" "${!other_local[@]}" "New login" |\
    zenity --list --column User --text 'Switch to an active user, or start a new login:' --title 'Switch user?' ) || exit 1

case $user_choice in
    "New login" ) kdmctl reserve ;;
    * ) kdmctl activate "${other_local[$user_choice]}" ;;
share|improve this answer
Very nice! No need to install gdm this way... – Martijn Mar 11 '12 at 18:13
Awesome. The 2-line script worked like a charm on default installation of Ubuntu 12.04 LTS. – Alois Mahdal Nov 20 '12 at 14:40

You can click your user name in the top panel and then select "Lock Screen." From the locked screen select "New Login" and it will take you back to the LightDM screen where you can click a different user name and enter the password. The first user is still logged in and you can switch back and forth this way.

share|improve this answer
Switching back to my own session does require typing my password twice, though... (LightDM requires a password to get into my session, and xscreensaver does too). – Martijn Mar 11 '12 at 18:15

Lock screen, and when prompted to login, click "New login".

(Works on 12.04, but it probably works on 11.10 too)

share|improve this answer

gdmflexiserver did not work for me coz it was not there on my system.

I used dm-tool instead:

share|improve this answer
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – A.B. Jun 18 '15 at 16:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.