Skip to content
Follow
Ubuntu Linux

How to Disable Logout on Ubuntu Desktop

Richard
Written by
Richard
Jan 31, 2023 Updated Jul 14, 2026 3 min read
How to Install Google Chrome on Ubuntu Linux
How to Install Google Chrome on Ubuntu Linux

Disabling the logout option on Ubuntu Desktop hides the “Log Out” button from your top-right system menu.

This setting prevents accidental session endings and can simplify the desktop, especially on shared computers or if you prefer fewer options visible.

This tweak works for Ubuntu versions using the GNOME desktop, like Ubuntu 22.04 LTS. You might need to refresh your desktop or restart your session for the change to show.

⚡ Quick Answer

Hide the Log Out button by opening Terminal and running `gsettings set org.gnome.desktop.lockdown disable-log-out true`. To show it again, use `gsettings reset org.gnome.desktop.lockdown disable-log-out`. Alternatively, use Dconf Editor to toggle the `disable-log-out` setting.

Prevent users from logging out of Ubuntu

You can prevent users from logging out of Ubuntu by hiding the Log Out button right from the desktop. This is a simple change you can make using the Terminal application. Just open the Terminal and type a specific command to hide the log out option, making it unavailable on the login screen.

Ubuntu Linux activities overview Terminal search
Ubuntu Linux activities overview Terminal search

Once the Terminal window is open, type the command `gsettings set org.gnome.login-screen disable-user-list true` and press Enter to hide the user list button. This action prevents accidental logouts for users who share a computer, ensuring your session remains active.

⚠️Warning
gsettings set org.gnome.desktop.lockdown disable-log-out true

To restore the Log Out button later, execute the command `gsettings set org.gnome.login-screen disable-user-list true` in your terminal. This command resets the user list setting to its default, making the Log Out option visible again on your Ubuntu Desktop.

gsettings reset org.gnome.desktop.lockdown disable-log-out

Disable or enable the Log out command using the Dconf Editor

You can disable or enable the Log Out command in Ubuntu using the Dconf Editor, which works much like the Windows Registry Editor. If you don’t want to use the Terminal, this graphical tool lets you easily switch the log out option on or off. You will need to install the Dconf Editor first before you can use it.

⚠️Warning
Security Disclaimer: Please note that this is only a UI-level restriction. It is not a robust system-level security measure and will not stop someone who knows how to use the command line.

To use the logout disabling tool, you must install the tool first. Open your Terminal application and run the command `sudo apt update && sudo apt install ubuntu-disable-logout` to install the tool. This command updates your package list and then installs the necessary software for the tool.

sudo apt install dconf-editor

This is currently the most reliable way to get the tool. Once installed, open the Dconf Editor from your app list.

ubuntu linux decon editor install
Ubuntu Linux dconf editor install

Navigate to this path inside the app:

org -> gnome -> desktop -> lockdown

The disable-log-out setting controls whether Ubuntu Desktop prevents users from logging out. Click the toggle switch next to disable-log-out to turn this feature on or off, preventing accidental logouts.

Ubuntu Linux disable log out command
Ubuntu Linux disables the logout of the command.

Once you toggle this, the change happens immediately. You can check your system menu at the top right to see if the button is gone.

Ubuntu Linux with log out enabled
Ubuntu Linux without enabled

How to disable automatic logout?

Click yes wait for the GUI server to be up. From M9. 0.22 besides CCM the EM system parameters can also be updated from the ControlM web client let's switch over to ControlM web log in to controlm.

How do I turn off logging in Ubuntu?

Screen where you would ask to enter the username. And password. And that's it simple as that.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Show Weekday on Ubuntu Top Menu Bar
Ubuntu Linux How to Show Weekday on Ubuntu Top Menu Bar
How to Install GNOME Desktop on Ubuntu 24.04
Ubuntu Linux How to Install GNOME Desktop on Ubuntu 24.04
How to Install KDE Desktop on Ubuntu 24.04
Ubuntu Linux How to Install KDE Desktop on Ubuntu 24.04

No comments yet — be the first to share your thoughts!

Leave a Comment

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