xscreensaver gets deleted from autostart [Solved]

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Post Reply
jacob733
Baby Hen
Posts: 10
Joined: Mon Jul 07, 2014 1:05

xscreensaver gets deleted from autostart [Solved]

Post by jacob733 » Sun Jul 13, 2014 13:47

Hi

I have installed xscreensaver on my system running Cinnamon, and it works fine if I manually start the xscreensaver daemon. If I add this to "Startup Applications" in Cinnamon, this works fine for a single boot, and then it gets removed from "Startup Applications" somehow. I have seen a couple of times now that Sabayon overwrites config files etc. automatically, does it have some kind of ghost process that changes these files behind the users back?

/Jacob
Last edited by jacob733 on Mon Jul 14, 2014 5:14, edited 1 time in total.

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8091
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: xscreensaver gets deleted from autostart

Post by Fitzcarraldo » Sun Jul 13, 2014 17:34

Don't use Cinnamon or systemd myself, but try the following, courtesy of the Arch Linux Wiki:

Creating the file /etc/systemd/system/xscreensaver.service containing:

Code: Select all

[Unit]
Description=Lock X session using xscreensaver
Before=sleep.target

[Service]
User=yourusername
Type=oneshot
Environment=DISPLAY=:0
ExecStart=/usr/bin/xscreensaver-command -lock

[Install]
WantedBy=sleep.target
and enable it with:

Code: Select all

systemctl enable xscreensaver.service
https://wiki.archlinux.org/index.php/Xscreensaver

jacob733
Baby Hen
Posts: 10
Joined: Mon Jul 07, 2014 1:05

Re: xscreensaver gets deleted from autostart

Post by jacob733 » Mon Jul 14, 2014 4:26

It does not look like the service starts. It is probably because I don't have sleep.target enabled. What does sleep.target do? Is it safe to just enable this?

jacob733
Baby Hen
Posts: 10
Joined: Mon Jul 07, 2014 1:05

Re: xscreensaver gets deleted from autostart

Post by jacob733 » Mon Jul 14, 2014 5:00

Having actually read that wiki, I found out that your service was not what I wanted, so I removed it again. What I need is for the xscreensaver to run when I log in.

The wiki link you point to is using .xinitrc, but that does not seem to have any effect on my system. Any suggestions?

jacob733
Baby Hen
Posts: 10
Joined: Mon Jul 07, 2014 1:05

Re: xscreensaver gets deleted from autostart

Post by jacob733 » Mon Jul 14, 2014 5:14

I tried the approach with "Startup Applications" again, and it looks like I have made it stick. I did the following changes though:

I created xscreensaver.desktop by hand under ~/.config/autostart.

I used the full path to /usr/bin/xscreensaver

Post Reply