You are not logged in.
Pages: 1
Topic closed
Hi folks,
I just switched on systemd, everything is working well and as a test, I wanted to add xscreesaver daemon to systemd.
So i created a /usr/lib/systemd/system/xscreensaver.service file :
[Unit]
Description=XScreensaver daemon
[Service]
ExecStart=xscreensaver -nosplash
[Install]
WantedBy=multi-user.target
Then :
# sudo systemctl enable xscreensaver.service
ln -s '/usr/lib/systemd/system/xscreensaver.service' '/etc/systemd/system/multi-user.target.wants/xscreensaver.service'
# sudo systemctl daemon-reload
But something is wrong:
# sudo systemctl status xscreensaver.service
xscreensaver.service - XScreensaver daemon
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
CGroup: name=systemd:/system/xscreensaver.service
Also, trying to start the daemon myself does not work:
# sudo systemctl start screensaver.service
Failed to issue method call: Unit screensaver.service failed to load: No such file or directory. See system logs and 'systemctl status screensaver.service' for details.
And there is nothing about xscreensaver in journalctl.
Has I missed something?
Thx for your help.
Last edited by cr0cK (2013-01-17 23:53:58)
Offline
Why are you running your screensaver as a system daemon/service?
It should be run as your user, after X is started.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
You're right but I thought this job could be handled by systemd. I'm wrong ?
Offline
You might be able to get it to run as a service if you run a systemd instance as your user.
https://wiki.archlinux.org/index.php/Systemd/User
Can't guarantee that it'll work as expected though.
You'd be better off starting it as the wiki recommends.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
You might be able to get it to run as a service if you run a systemd instance as your user.
https://wiki.archlinux.org/index.php/Systemd/User
Can't guarantee that it'll work as expected though.
Well, I can guarantee you that it does, because I do it.
Here is my (really simple) systemd unit:
[Unit]
Description=XScreensaver
[Service]
ExecStart=/usr/bin/xscreensaver -no-splash
[Install]
WantedBy=default.target
Don't forget to follow the link WorMzy gave you, to use systemd user session; it wont work other way.
And btw, when you create personalized services files (ones created by you, instead of being provided by a package), you should not store them on /usr/lib/systemd/system, but on /etc/systemd/system instead. But user service files (like the one for xscreensaver) goes into $HOME/.config/systemd/user. Again read the link.
Last edited by chris_l (2013-01-17 16:14:52)
"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.
Offline
I had a similar problem, although on a different Linux distro, but it works for me too.
Please don't forget to mark this as "solved" so that other users can learn from this.
Brandon Taylor
Offline
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed