Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I don't want anyone to be able to shut down my computer from the login screen. Can I remove the shutdown button at the top right corner of the login screen in Ubuntu 12.04?

share|improve this question
add comment

2 Answers 2

Even if you cannot hide the buttons, you can configure your system so that the lightdm user does not have permissions to shutdown or restart the system. Since the greeter runs as the lightdm user, this should solve your issue. Create two new files in /var/lib/polkit-1/localauthority/50-local.d, call them disable-lightdm-shutdown.pkla and disable-lightdm-restart.pkla and apply the contents as below. Note: You can also stick these into one file.

Shutdown:

[Disable Shutdown]
Identity=unix-user:lightdm
Action=org.freedesktop.consolekit.system.stop
ResultAny=no
ResultInactive=no
ResultActive=no

Restart:

[Disable Restart]
Identity=unix-user:lightdm
Action=org.freedesktop.consolekit.system.restart
ResultAny=no
ResultInactive=no
ResultActive=no
share|improve this answer
    
So, it seems to work for me in my VM. It still goes through all the menus and then nothing happens. Give it a try. –  mfisch Jun 18 '12 at 4:33
add comment

There aren't any configuration tools for LightDM that I know of, and if there are, there certainly wouldn't be any way to remove that button.

Unless you want to rewrite LightDM yourself.

share|improve this answer
    
You'd actually be rewriting unity-greeter. Lightdm is the backend and is a separate package. –  mfisch Jul 10 '12 at 18:49
add comment

Your Answer

 
discard

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.