How to Enable or Disable Log out on Ubuntu Linux

|

|

The article outlines steps to enable or disable the logout functionality on the Ubuntu desktop. Users can typically log out via the system menu on the top bar. However, to restrict this, users can disable the log out command through the Terminal app or the Dconf Editor tool. This manipulation is reversible and can be…

This article describes the steps to enable or disable logging out of the Ubuntu desktop.

There are many ways one can log out of the Ubuntu desktop. For example, users can log out using the command terminal, the desktop system menu, and possibly other commands.

For most users using Ubuntu desktop, the way to log out of one’s session is to use the system menu on the top bar. To do that, click the System menu, select the Power button, and click the logout command.

If you want to prevent users from logging out of their session using the system menu, the steps below show you how.

Prevent users from logging out of Ubuntu.

As described above, you can prevent users from logging out of the Ubuntu desktop by disabling the Log Out command on the system menu.

Here’s how to do that.

First, open the Terminal app in Ubuntu Linux.

You can do that by pressing the Super key (or Windows key) to show the Overview screen. Then, use the search box to search for ‘Terminal. ‘

Select the Terminal app to launch.

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

Alternatively, press the keyboard shortcut (CTRL + ALT + T) on your keyboard to launch the Terminal app.

When the Terminal app opens, type the commands below to disable the logout button on the system menu.

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

Run the commands below to reverse and enable the logout command on the system menu.

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

Disable or enable the Log out command using the Dconf Editor

You can also use Dconf Editor to make typical system changes if you can’t use the command Terminal app.

If you are familiar with Windows, you know about Windows Registry Editor.

Ubuntu Linux doesn’t have a registry database to configure hidden system settings. Howerver, Ubuntu Linux uses the Dconf Editor tool to change low-level system configurations and settings.

You can call it a Ubuntu Linux Registry Editor because it provides similar functionality without a massive Windows system database.

To use Dconf Editor, you must first install it since it doesn’t come with Ubuntu Linux.

Read the post below to learn how to install software on Ubuntu Linux.

How to add or remove software on Ubuntu Linux

In the Ubuntu Software app, search for Dconf Editor to install.

ubuntu linux decon editor install
Ubuntu Linux dconf editor install

After installing and launching the Dconf Editor app, navigate to the path below:

org -> gnome -> desktop -> lockdown

On the disable-log-out Dconf settings on the list, toggle the button to the On position to enable.

To disable it, toggle the button back to the Off position.

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

Once enabled, you should not see the logout command on the system menu. If disabled, you should see the logout command on the system menu.

That should do it!

Conclusion:

This post showed you how to show or hide the Logout command on the system menu on Ubuntu Linux. Please use the comment form below if you find any errors above or have something to add.

Like this:



Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.