Ubuntu Linux

How to Disable Logout on Ubuntu Desktop

Richard
Written by
Richard
Jan 31, 2023 Updated Apr 17, 2026 2 min read

This guide explains how to hide or show the Log Out button on your Ubuntu desktop. You might want to do this to stop accidental clicks or to simplify your desktop interface.

Why do this? Some users want a cleaner menu or want to prevent guests from easily exiting a session.

What happens when done? The Log Out option will disappear from your top-right system menu. Note that this method applies specifically to GNOME-based Ubuntu sessions. You may need to restart your desktop or refresh your session for the changes to show up.

Prevent users from logging out of Ubuntu

You can hide the Log Out command by using the Terminal. This is the fastest way to change this setting.

First, open the Terminal app. Press the Super key (the Windows key), type “Terminal,” and press Enter. You can also press CTRL + ALT + T.

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

Once the Terminal window is open, type the following command and press Enter to hide the button:

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

If you want to bring the Log Out button back later, type this command instead:

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

Disable or enable the Log out command using the Dconf Editor

If you prefer a visual menu instead of typing commands, you can use the Dconf Editor. If you are a Windows user, you can think of this like the Windows Registry Editor.

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 this tool, you must install it first. Open your Terminal and run the following command:

sudo apt install dconf-editor

This is the most reliable way to get the tool in 2026. 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

Find the setting called disable-log-out. Click the toggle switch to turn it on or off.

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

Was this guide 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.

Leave a Reply

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

Exit mobile version