Your message dated Sat, 10 Sep 2016 01:19:47 +0200
with message-id <[email protected]>
and subject line Re: Bug#837194: systemd --user: service action not triggered
has caused the Debian Bug report #837194,
regarding systemd --user: service action not triggered
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
837194: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837194
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: systemd
Version: 231-4
Severity: normal
Dear Maintainer,
I have a business laptop for which I do not have root access. The system
is configured to suspend when I press the power key. Now I am trying to
configure systemd on a user level to lock my screen before the system
suspends.
I have a working service file in ~/.config/systemd/user/i3lock.service,
like so:
[Unit]
Description=i3lock
Before=sleep.target
[Service]
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/i3lock -c 000000
[Install]
WantedBy=sleep.target
I can enable the service via the --user option:
brainslug@flexo:~$ systemctl --user enable i3lock
Created symlink
/home/brainslug/.config/systemd/user/sleep.target.wants/i3lock.service →
/home/brainslug/.config/systemd/user/i3lock.service.
I can start the service via
brainslug@flexo:~$ systemctl --user start i3lock
which immediately locks my screen, so I would think the service file
itself is correct and working.
However, when suspending the laptop this does not seem to trigger my
service file and my screen remains unlocked on resume.
When I check on the service status, this is what I get:
brainslug@flexo:~$ systemctl --user status i3lock
● i3lock.service - i3lock
Loaded: loaded (/home/brainslug/.config/systemd/user/i3lock.service;
enabled; vendor preset: enabled)
Active: inactive (dead)
FWIW, I am using lightdm and window maker.
Thanks!
-- Package-specific info:
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (800, 'testing'), (690, 'unstable'), (680, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.6.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages systemd depends on:
ii adduser 3.115
ii libacl1 2.2.52-3
ii libapparmor1 2.10.95-4
ii libaudit1 1:2.6.6-1
ii libblkid1 2.28.1-1
ii libc6 2.23-5
ii libcap2 1:2.25-1
ii libcap2-bin 1:2.25-1
ii libcryptsetup4 2:1.7.0-2
ii libgcrypt20 1.7.3-1
ii libgpg-error0 1.24-1
ii libidn11 1.33-1
ii libkmod2 22-1.1
ii liblzma5 5.1.1alpha+20120614-2.1
ii libmount1 2.28.1-1
ii libpam0g 1.1.8-3.3
ii libseccomp2 2.3.1-2
ii libselinux1 2.5-3
ii libsystemd0 231-4
ii mount 2.28.1-1
ii util-linux 2.28.1-1
Versions of packages systemd recommends:
ii dbus 1.10.10-1
ii libpam-systemd 231-4
Versions of packages systemd suggests:
ii policykit-1 0.105-16
pn systemd-container <none>
pn systemd-ui <none>
Versions of packages systemd is related to:
ii udev 231-4
-- Configuration Files:
/etc/systemd/logind.conf changed:
[Login]
HandlePowerKey=suspend
HandleSuspendKey=hibernate
HandleHibernateKey=hibernate
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
-- no debconf information
--- End Message ---
--- Begin Message ---
Am 10.09.2016 um 01:00 schrieb Brainslug:
> Package: systemd
> Version: 231-4
> Severity: normal
>
> Dear Maintainer,
>
> I have a business laptop for which I do not have root access. The system
> is configured to suspend when I press the power key. Now I am trying to
> configure systemd on a user level to lock my screen before the system
> suspends.
>
> I have a working service file in ~/.config/systemd/user/i3lock.service,
> like so:
>
> [Unit]
> Description=i3lock
> Before=sleep.target
That's a system target. You can't reference those from user units. It
simply doesn't work this way.
That said, the right interface you want for your use-case is
systemd-inhibit [1]. Use that in combination with xss-lock [2], which is
supposed to have systemd-inhibit support.
[1] https://www.freedesktop.org/wiki/Software/systemd/inhibit/
https://www.freedesktop.org/software/systemd/man/systemd-inhibit.html
[2] https://bbs.archlinux.org/viewtopic.php?id=176001
https://packages.qa.debian.org/x/xss-lock.html
https://www.mankier.com/1/xss-lock
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature
--- End Message ---