A Screensaver is an application which turns on after a period of user inactivity. It happens to most of us that while working on a machine we get busy doing some other task. Or, we may be away for our working desk. Certainly, it is not feasible to turn off our system every time we leave our desk or get busy with something else. And, if we keep our machine ON then it poses a security risk. Unauthorized users may easily have access to the machine.
So, to prevent that happening we may choose to install a Screensaver application. It helps us lock our screen after a period of inactivity. And then, only authorized users are allowed to access the machine. We can define the interval after which the Screensaver is turned on as per our convenience.
Though, if you have installed a Desktop Environment then, you already have a Screensaver application installed. If its not there for some reason then, we can install XScreenSaver. There are other Screensaver applications available through standard Ubuntu repository which we don't cover in this article.
Note: Following operations require you to have superuser privileges. In case you don't have one then, we advise you to contact your System Administrator for assistance.
Install XScreenSaver in Ubuntu 22.04
The package is available through standard Ubuntu repository. Therefore, we need to update the repository first. At the time of writing v5.45 is available. Now, open a terminal and issue the following -
sudo apt update
Next, to install XScreenSaver -
sudo apt install xscreensaver
From systems' main menu we can launch ScreenSaver Preferences. Under the Display Modes tab, we can check the Lock Screen After option and enter the time (in minutes) after which the our screen gets locked. Do check other features like Mode, Power Management etc. as well.
In conclusion, we have covered how to install XScreenSaver in Ubuntu 22.04 release here.