Kiến Thức Linux

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

Đăng ký liền tay Nhận Ngay Bài Mới

Subscribe ngay

Cám ơn bạn đã đăng ký !

Lỗi đăng ký !

Add Comment

Click here to post a comment

Đăng ký liền tay
Nhận Ngay Bài Mới

Subscribe ngay

Cám ơn bạn đã đăng ký !

Lỗi đăng ký !