Gnuru.org
Productive Linux


Subscribe

 Subscribe via Feedburner in a reader

Enter your email address:

Delivered by FeedBurner


Login
Login:
Password:



Don't have an account?
Sign up to Gnuru.org
Forgot your password?

Using gdm to allow non-root users to shutdown
2 May 2005 @ 11:34 BST
by Paul

Getting non-technical people to move over to Linux can be difficult. A reason for this is that people are generally comfortable with what they know.

One way to get them to feel better about Linux is to make it easy for them to turn the computer off.

Apple has it's 'shutdown' menu option. In Windows you have a 'Shutdown...' item in the start menu. And Linux? Well, Linux you login as root and type 'shutdown -h now' at the command line.

"You login as what? And type...type...type what where?" you hear the non-geek cry.

There are many threads on the internet about this most of them are do not come up with a satisfactory outcome.

A few points:

  • One solution is to edit your sudoers file so that the newbie can type something like 'halt' or 'powerdown' and it will have the expected result. Clever though this might be, it defeats the primary objective which is not to require any typing.
  • No linux desktop, as far as I am aware, allows shutdown from the desktop. So, for example, there is no menu item in KDE's 'K' menu that allows a shutdown. This would be a welcome addition.
  • Both kdm and gdm allow the computer to be shutdown or rebooted from the login screen. This is not ideal as it requires the newbie to logout of the desktop first and then select a 'shutdown' option. And anyway, in most distros only root is allowed to shutdown.
  • SuSE allows a non-root user to shutdown from KDE. This can be configured through YaST, if I recall correctly, but I don't run SuSE.
  • Gdm offers a solution, but it requires a tiny bit of customisation You can do this through gdmsetup, but it is just as easy to edit /etc/gdm/gdm.conf. To allow a local user to shutdown the computer you need to turn on these two options:
    SystemMenu=true
    SecureSystemMenu=false 
    As stated above this is not ideal because the newbie has to logout first, to get to the gdm screen, but it is better than nothing.



Comments disabled