Inscrivez-vous maintenant pour un meilleur devis personnalisé!

How to enable guest sessions on an Ubuntu desktop

27 fév. 2023 Hi-network.com
Carlina Teteris/Getty Images

Your privacy is important and nearly every Linux distribution is filled with features, tricks, and underpinnings that take the security of your information very seriously. Take, for instance, the idea of the guest session.

The concept is a special login for your operating system that allows others to use the machine, without having access to any of your data. At the same time, no information would be saved between guest sessions. In other words, anyone could use your computer, and -- once they logged out of the guest session -- any and all data collected during the session would be automatically trashed.

Also: Ubuntu 22.04.2 is as predictable as an operating system can be... and that's a good thing 

That's why the guest session should be considered important to anyone who sometimes (or regularly) has to share a computer with other users. This could even be employed by small businesses that need kiosk-like computers for customers to use.

Although Ubuntu doesn't ship with its Guest Session feature enabled by default, it's pretty easy to add. Let me show you how to do just that.

How to enable Guest Session

Requirements

The only things you'll need for this are a running instance of Ubuntu desktop (from 16.04 to the latest release) and a user with sudo privileges. That's all you need. Let's make it happen.

1. Install LightDM

The first thing we must do is install the LightDM login manager. Log in to Ubuntu and open a terminal window. At the prompt, paste the following command:

sudo apt-get install lightdm -y

2. Select LightDM as the default login manager

During the installation of LightDM, you'll be prompted to select the default login manager. 

Also: Ubuntu Linux tries for the office desktop

Using the arrow keys on your keyboard, select "lightdm," tab down to OK, and hit Enter on your keyboard.

You must select "lightdm" as your default login manager to enable Guest Session.

Screenshot by Jack Wallen/

3. Configure LightDM

Once LightDM is installed, you must configure it to enable the Guest Session feature. For that, issue the command:

sudo nano /etc/lightdm/lightdm.conf.d/40-enable-guest.conf

In that file, paste the following contents:

[Seat:*]allow-guest=true

Save the file with the CTRL+X keyboard combination.

4. Reboot and enjoy

With the LightDM software installed and configured, reboot the machine. Once the login manager appears, you'll see Guest Session listed. To use the new feature, click Guest Session, and then click Log In. There is no password for the Guest Session. 

Also: How to install Ubuntu Linux (It's easy!)

Once the desktop is presented, the user will be presented with a warning that all data created during the session will be deleted upon log out and that, should they need to save any data, it should be saved to an external device (such as a USB flash drive).

Click Guest Session and you'll then be prompted to click Login.

Screenshot by Jack Wallen/

The Guest Session will look and feel like a regular session and even has a home directory. One thing to keep in mind, however, is that every single time you enter the Guest Session, you'll see the Temporary Guest Session warning and will have to walk through the welcome wizard.

If that becomes problematic, you can remove the initial setup tool with the command:

sudo apt remove --autoremove gnome-initial-setup

Of course, the above command must be run as a regular user with sudo privileges. However, once the command completes, log out, and log back in to the Guest Session account. You'll still see the Temporary Guest Session warning, but not the initial setup wizard.

Every guest user will see this warning.

Screenshot by Jack Wallen/

And that, my Linux-using friends, is how you can enable the Guest Session account and retain your privacy, no matter how many people need to use your computer.

Open Source

GitHub vs GitLab: Which program is right for you?The best Linux distros for beginnersFeren OS is a Linux distribution that's as lovely as it is easy to useHow to add new users to your Linux machine
  • GitHub vs GitLab: Which program is right for you?
  • The best Linux distros for beginners
  • Feren OS is a Linux distribution that's as lovely as it is easy to use
  • How to add new users to your Linux machine

tag-icon Tags chauds: Services et logiciels Logiciel libre

Copyright © 2014-2024 Hi-Network.com | HAILIAN TECHNOLOGY CO., LIMITED | All Rights Reserved.