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

xscreensaver gets deleted from autostart [Solved]

Postby 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.
jacob733
Baby Hen
 
Posts: 10
Joined: Mon Jul 07, 2014 1:05

Re: xscreensaver gets deleted from autostart

Postby 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
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: xscreensaver gets deleted from autostart

Postby 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

Postby 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

Postby 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
jacob733
Baby Hen
 
Posts: 10
Joined: Mon Jul 07, 2014 1:05


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 1 guest