When I'm lock the screen it's possible to turn off computer or restart it. How to disable this possibility? This possibility on lock screen makes all lock screen idea no sense.
Asked
Active
Viewed 2,039 times
1 Answers
0
There are two related work around that may give you the desired result.
1: Create a file /etc/polkit-1/localauthority/50-local.d/whatever_name.pkla Copy the below given text in the file and reboot.
[Disable lightdm PowerMgmt]
Identity=unix-user:*
Action=org.freedesktop.login1.reboot;org.freedesktop.login1.reboot-multiple-sessions;org.freedesktop.login1.power-off;org.freedesktop.login1.power-off-multiple-sessions;org.freedesktop.login1.suspend;org.freedesktop.login1.suspend-multiple-sessions;org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions
ResultAny=no
ResultInactive=no
ResultActive=no
Source: How to disable shutdown/reboot from lightdm in 14.04?
Also look for the mentioned uncomfortable comment in the link.
2: Change your lightdm display manager to GDM display manager.
Installation and switching is explained explicitly:
http://www.n00bsonubuntu.net/content/install-gdm-ubuntu-14-04/
After acitivating GDM follow the steps mentioned in the following link:
http://embraceubuntu.com/2006/03/20/disable-shutdown-for-normal-users/
-
This not work. I want to disable possibility to power off/restart computer when screen is locked, not to disable confirmation. – QkiZ Oct 07 '14 at 14:43
-
Sorry I mistaken your question. Do you want to use shutdown option while you logged in? or want your system to remain on. – hunch Oct 07 '14 at 16:52
-
Yes, I want use shutdown option while I'm logged in. Only thing that I want is hide poweroff/reboot option on Ubuntu lockscreen. This is what I want to hide http://imageshack.com/f/iphEEXJIp – QkiZ Oct 08 '14 at 07:39
-
I am not putting commands reated to 2nd method because I myself hasn't checked their working (As this is very old post but i will do in near future after setting up my VM . If you try and get success, please post here). – hunch Oct 08 '14 at 18:46
-
Yes, this resolves one problem (with power management on lockscreen) but generates another problem: on login screen option shutdown/reboot is also disabled. – QkiZ Oct 09 '14 at 07:26
-
Replace Identity=unix-user:* with Identity=unix-user:lightdm This should solve your problem. – hunch Oct 10 '14 at 09:03
-
It doesn't work. Now I cant power down on login screen but can on lockscreen. – QkiZ Oct 13 '14 at 18:09