How to Hide Power Off Menu in Ubuntu 20.04 Login Screen

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.

  1. First open terminal by pressing Ctrl+Alt+T on keyboard. When it opens, run command to get root privilege:

    sudo -i

  2. Then add user gdm to access control list:

    xhost +SI:localuser:gdm

  3. Switch to user gdm in the console:

    su gdm -l -s /bin/bash

  4. And one more command to set $DISPLAY value:

    export DISPLAY=:0

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

About ml

ml is a part time stay-at-home dad who've been using Ubuntu Desktop for a few years. He writes in the free time and wishes to share some useful tips with Ubuntu beginners and lovers.

Leave a Reply

Your email address will not be published. Required fields are marked *