This quick tip shows how to disable the power off menu option in the default GDM login screen of Ubuntu 20.04 LTS.
Gnome 3 does offer an option to toggle the menu option in login screen. However, you need to do following 4 steps before changing the setting.
- First open terminal by pressing Ctrl+Alt+T on keyboard. When it opens, run command to get root privilege:
- Then add user gdm to access control list:
- Switch to user gdm in the console:
su gdm -l -s /bin/bash
- And one more command to set $DISPLAY value:
You can finally disable the power off menu option in login-screen via GSettings configuration tool by running command:
gsettings set org.gnome.login-screen disable-restart-buttons true
Finally restart your machine and enjoy!
To restore the changes, do the previous 4 steps in terminal and finally run command:
gsettings reset org.gnome.login-screen disable-restart-buttons