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?

ish
  • 139,926
Daniel
  • 21
  • You mean allow multiple users on the system BUT disable user switching via the GUI? (logout?) – ish Jun 21 '12 at 03: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 '12 at 03: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 '12 at 03:51
  • And you're on Gnome – ish Jun 23 '12 at 04:16

4 Answers4

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.

ish
  • 139,926
  • 2
    Another place to check for the setting for the lock screen is org->gnome->desktop->screensaver->user-switch-enabled – rakslice Aug 02 '15 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

Daniel W.
  • 3,436
  • The key is not this but disable-user-switching. – ish Jun 22 '12 at 00: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 '12 at 09: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
penreturns
  • 5,950
0

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

gsettings set org.gnome.desktop.lockdown disable-lock-screen true
Pandya
  • 35,771
  • 44
  • 128
  • 188