2

I have six boys, and they tend to ask another parent when wanting to use one of the computers, but don't bother asking the logged in user if they're finished. All four machines are running Ubuntu 12.04 with gnome 3.

How can I permanently disable user switching - not just in the user menu, but also on the lock screen?

4
  • You mean allow multiple users on the system BUT disable user switching via the GUI? (logout?)
    – ish
    Jun 21, 2012 at 3:19
  • no, I want them to be able to log out...just not be able to switch to another user while a user is already logged in.
    – Daniel
    Jun 21, 2012 at 3:42
  • Oh, and not just in the user menu, but also the lock screen..I wanna get rid of the "switch user" function altogether.
    – Daniel
    Jun 21, 2012 at 3:51
  • And you're on Gnome
    – ish
    Jun 23, 2012 at 4:16

4 Answers 4

5

This is for Gnome 3 (aka gnome-shell, NOT Unity), and will disable both the "Switch User" option in the user menu as well as on the lock screen:

  • Start the terminal with Ctrl-Alt-T, and then type:

    1. sudo apt-get install dconf-tools
    2. Start dconf-editor
    3. Disable apps->indicator-session->user-show-menu:

    enter image description here

  • Enable org->gnome->desktop->lockdown->disable-user-switching:

    enter image description here

  • Close dconf-editor, logout and log in to see the changes.

1
  • 2
    Another place to check for the setting for the lock screen is org->gnome->desktop->screensaver->user-switch-enabled
    – rakslice
    Aug 2, 2015 at 21:44
1

Another way to do this would be using the 'dconf editor'.
You can install it from software center.
After opening it click on 'apps' -> 'indicator session' and uncheck 'user-show-menu'.
Close the program and log out and back in.

View of the dconf editor

2
  • The key is not this but disable-user-switching.
    – ish
    Jun 22, 2012 at 0:04
  • Are they both doing the same thing? Cause using either key the 'User Menu' disappears from the panel. Or does the 'disable-user-switching' also affect the lock screen and the 'user-show-menu' doesn't?
    – Daniel W.
    Jun 22, 2012 at 9:24
0

How many user do you have? By default its only your acc and Guest acc. To disable Guest acc follow this guide.

Open /etc/lightdm/lightdm.conf file from your terminal using the following command

gksudo gedit /etc/lightdm/lightdm.conf

Add the following line

allow-guest=false

Save and exit the file

Finally you have to restart lightdm using the following command from your terminal

sudo restart lightdm
1
  • just out of curiosity...in gnome3 is this handled by lightdm as well? or is it handled by gdm?
    – Daniel W.
    Jun 21, 2012 at 22:07
0

You can disable user-switching by following command in terminal:

gsettings set org.gnome.desktop.lockdown disable-lock-screen true

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .