Bug#854691: xscreensaver user unit

2023-09-28 Thread John Lines
On bookworm, with xscreensaver   6.06+dfsg1-3 I had an error trying to
do

systemctl --user enable xscreensaver
Failed to enable unit: Cannot alias xscreensaver.service as
org.jwz.xscreensaver.

so did:
cp  /usr/lib/systemd/user/xscreensaver.service  ~/.config/systemd/user/

(note that the man page says to use
/usr/share/xscreensaver/xscreensaver.service which does not exist as
the source)

Then edited the user copy to edit out 
 Alias=org.jwz.xscreensaver

and now
 $ systemctl --user enable xscreensaver

seems to work

John



Bug#854691: xscreensaver user unit

2021-04-22 Thread Antoine Beaupré
On 2017-12-03 18:40:03, Daniel Kahn Gillmor wrote:
> On Mon 2017-12-04 00:14:05 +0100, Tormod Volden wrote:
>> I am not so into systemd "units", but possibly relevant to your
>> question is that it is fully possible that the xscreensaver package is
>> installed on a system, but that individual users don't want to have it
>> running. Whether it should start by default for a user depends on the
>> desktop environment.
>
> I think if xscreensaver is installed, it should be enabled by default.
> desktop environments that don't want it enabled can explicitly disable
> it for users which launch them, as can users who for whatever reason
> want it disabled.

I think it was explicitely disabled because of this bug:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977804

> Most systems won't have xscreensaver installed at all unless the user
> has requested it, right?

I think that's not the point - in the above, the systemd activation
conflicted with the xsession one.

Also: it didn't work, for me. In Debian buster, xscreensaver tried to
start before Xorg was available, and failed to contact the DISPLAY
(server).

In bullseye, however, this unit works:

[Unit]
Description=XScreenSaver
Documentation=man:xscreensaver(1)
Documentation=man:xscreensaver-command(1)
Documentation=man:xscreensaver-demo(1)
PartOf=graphical-session.target

[Service]
ExecStart=/usr/bin/xscreensaver
Restart=on-failure

[Install]
WantedBy=default.target


I suspect that this is the part that doesn't work in buster:

PartOf=graphical-session.target

Also notice this trick:

Restart=on-failure

Which should prevent some security issues from unlocking the screen by
crashing it. It's not quite complete: it should also *lock* the screen
on crash, but it's a start.

-- 
It is not enough to fight for the land; it is even more important to
enjoy it. While you can. While it’s still here.
- Edward Abbey



Bug#854691: xscreensaver user unit

2017-12-03 Thread Daniel Kahn Gillmor
On Mon 2017-12-04 00:14:05 +0100, Tormod Volden wrote:
> I am not so into systemd "units", but possibly relevant to your
> question is that it is fully possible that the xscreensaver package is
> installed on a system, but that individual users don't want to have it
> running. Whether it should start by default for a user depends on the
> desktop environment.

I think if xscreensaver is installed, it should be enabled by default.
desktop environments that don't want it enabled can explicitly disable
it for users which launch them, as can users who for whatever reason
want it disabled.

Most systems won't have xscreensaver installed at all unless the user
has requested it, right?

--dkg



Bug#854691: xscreensaver user unit

2017-12-03 Thread Tormod Volden
On Fri, Oct 27, 2017 at 4:23 AM, Daniel Kahn Gillmor wrote:
> On Thu 2017-08-31 12:07:10 +1000, Jeremy Visser wrote:
>> I've attached a patch which fixes the issue.

Thanks for the patch, and for forwarding it here (don't know where it was sent).

>
> Jeremy's patch (below) looks reasonable to me.  Even better would be to
> have it include other useful metadata in the [Unit] section, like:
>
> Documentation=man:xscreensaver(1)
> Documentation=man:xscreensaver-command(1)
> Documentation=man:xscreensaver-demo(1)
> PartOf=graphical-session.target
>

Thanks.

> xscreensaver(1) currently has a suggestion for this file.  It should
> probably also be adjusted to remove the example, and explain
> specifically that all the user needs to do is:
>
>systemctl --user enable xscreensaver
>
> Arguably, this user unit should be enabled by default.  Is there any
> reason to ship it disabled?

I am not so into systemd "units", but possibly relevant to your
question is that it is fully possible that the xscreensaver package is
installed on a system, but that individual users don't want to have it
running. Whether it should start by default for a user depends on the
desktop environment.

Regards,
Tormod


>
> --dkg
>
>> From 76072fa4cba00e6a6009324d6b9e0cf1d3fdc82f Mon Sep 17 00:00:00 2001
>> From: Jeremy Visser 
>> Date: Thu, 31 Aug 2017 11:53:00 +1000
>> Subject: [PATCH] Fix broken systemd unit
>>
>> The ExecStart= line must be an absolute path as per systemd.service(5),
>> but is currently a relative path. This change points it to
>> /usr/bin/xscreensaver.
>> ---



Bug#854691: xscreensaver user unit

2017-10-26 Thread Daniel Kahn Gillmor
On Thu 2017-08-31 12:07:10 +1000, Jeremy Visser wrote:
> I've attached a patch which fixes the issue.

Jeremy's patch (below) looks reasonable to me.  Even better would be to
have it include other useful metadata in the [Unit] section, like:

Documentation=man:xscreensaver(1)
Documentation=man:xscreensaver-command(1)
Documentation=man:xscreensaver-demo(1)
PartOf=graphical-session.target

xscreensaver(1) currently has a suggestion for this file.  It should
probably also be adjusted to remove the example, and explain
specifically that all the user needs to do is:

   systemctl --user enable xscreensaver

Arguably, this user unit should be enabled by default.  Is there any
reason to ship it disabled?

--dkg

> From 76072fa4cba00e6a6009324d6b9e0cf1d3fdc82f Mon Sep 17 00:00:00 2001
> From: Jeremy Visser 
> Date: Thu, 31 Aug 2017 11:53:00 +1000
> Subject: [PATCH] Fix broken systemd unit
>
> The ExecStart= line must be an absolute path as per systemd.service(5),
> but is currently a relative path. This change points it to
> /usr/bin/xscreensaver.
> ---
>  debian/xscreensaver.service | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/debian/xscreensaver.service b/debian/xscreensaver.service
> index 5e8f13d..c5298f2 100644
> --- a/debian/xscreensaver.service
> +++ b/debian/xscreensaver.service
> @@ -2,7 +2,7 @@
>  Description=XScreenSaver
>  
>  [Service]
> -ExecStart=xscreensaver
> +ExecStart=/usr/bin/xscreensaver
>  
>  [Install]
>  WantedBy=default.target
> -- 
> 2.14.1.581.gf28d330327-goog


signature.asc
Description: PGP signature