Monday 22 April 2024

Enable XScreensaver On Cinnamon.

XScreensaver works on most Linux desktops but on Cinnamon it is a bit more complicated and you have to do some tweaking to make it work. The reason is that the Cinnamon desktop comes bundled with the Cinnamon screensaver.Which cannot be removed because if you remove it you will uninstall the whole desktop. Many people are not happy with the Cinnamon screensaver which is not a screensaver at all. It is a screen lock the same as the Gnome screensaver is just a screen lock. In early versions of Cinnamon you could run other screensavers in Cinnamon screensaver but Linux Mint removed this in later versions. I don't know what the reason is but here is how you can get XScreensaver back.


While we cannot remove the Cinnamon screensaver we can disable it. The reason we need to do this is because if we don't XScreensaver will not start automatically at boot up. So here is what we need to do.

First go to the system start up folder find the start up file for Cinnamon screensaver and stop it from starting up. To do this go to your file system and go to ect/xdg/autostart.

You need to open the etc folder as root to do this.

Then find the Cinnamon screensaver start up file then delete it or move it to another folder for back up. In case you want to restore it later on.

Install XScreensaver and any of the other screensavers you want. It can be found in synaptic Package Manager.


Then run this command in the terminal:


gsettings set org.cinnamon.desktop.session idle-delay 0 && gsettings set org.cinnamon.desktop.screensaver idle-activation-enabled false && gsettings set org.cinnamon.desktop.screensaver lock-enabled false


Then we have to tell the system to link Cinnamon screensaver to the XScreensaver command so it will use XScreensaver as the screen lock instead of Cinnamon screensaver.


Run this command in the terminal:


sudo ln -sf /usr/bin/xscreensaver-command /usr/bin/cinnamon-screensaver-command


Enter your password when asked.


Restart your computer.


Set XScreensaver to start at login.

To do this you need to create a start up file.

In Control Center go to start up applications settings then add name the start up file Xscreensaver then under command type in xscreensaver -nosplash

The problem is that XScreensaver only recognises Cinnamon as Gnome so we have to change the edit the start up file to say Cinnamon so it will start up at log in.


To do this go to your file manager Nemo and enable "show hidden files."

Then go to Home/config/autostart.


There you will find the start up file for XScreensaver. 


On Linux Mint.

Open the start up file in Gedit or any plain text editor. 

Where it says X-Gnome change this to X-Cinnamon.

The start up file for Cinnamon should read the following:


[Desktop Entry]

Type=Application

Exec=xscreensaver -nosplash

X-Cinnamon-Autostart-enabled=true

NoDisplay=false

Hidden=false

Name[en_GB]=Screensaver

Comment[en_GB]=No description

X-Cinnamon-Autostart-Delay=0


On Debian.

If you are using Debian as I am you will also have the Gnome Flashback desktop. This is because Cinnamon uses Gnome Flashback as it's fallback mode in case Cinnamon crashes.

I found that XScreensaver started up automatically on Gnome Flashback but would not do so on Cinnamon. So I had to create two start up files. One for Cinnamon and the other for Gnome Flashback.

So go to your home/config/autostart folder and create the following file for Gnome flashback by opening Gedit or any plain text editor and paste the following text in.


[Desktop Entry]

Type=Application

Exec=xscreensaver -nosplash

X-GNOME-Autostart-enabled=true

NoDisplay=false

Hidden=false

Name[en_GB]=Xscreensaver

Comment[en_GB]=No description

X-GNOME-Autostart-Delay=0


Then create the other start up file for Cinnamon as above for Linux Mint. You can rename the Cinnamon start up file Screenaver2 or something like that so it does not over write the XScreensaver file. 

XScreensaverwill now start up automatically every time you log into Cinnamon or Gnome Flashback.


Restart your computer.


Now you can run Xscreensaver on Cinnamon and Cinnamon will now use the XScreensaver lockscreen.

You can customise the lockscreen with the may different themes Xscreensaver has as well as enjoy the screensavers.


Many thanks to Smurphos from Linux Mint forums from which I found out how to enable XScreensaver on Cinnamon. Who has written a tutorial about this. The credit goes to him. The full tutorial can be found here: Linux Mint Forums:

https://forums.linuxmint.com/viewtopic.php?t=284037



As you can see XScreensaver is working on Cinnamon.

The XScreensaver lockscreen is also working on Cinnamon.









No comments:

Post a Comment

Note: only a member of this blog may post a comment.