summaryrefslogtreecommitdiff
path: root/scripts/xscreensaver-dbus
blob: 23bc6cf6e5dff8097c694a3968f2d5b6c3b6294a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/perl 
use strict;
use warnings;
use v5.20;
use Log::Any::Adapter Stdout => ( log_level => 'debug' );
use App::XScreenSaver::DBus;
# VERSION 
# PODNAME: xscreensaver-dbus 
# ABSTRACT: tie xscreensaver into dbus 
 
$|++;
App::XScreenSaver::DBus->new->run;
 
=head1 SYNOPSIS
 
    xscreensaver &
    xscreensaver-dbus > ~/xscreensaver-dbus.log &
 
=head1 DESCRIPTION
 
This program will ensure that xscreensaver locks the screen before
your laptop goes to sleep, and will prevent the screen saver from
running while video is playing.
 
It does so by implementing L<the "idle inhibition" DBus
service|https://people.freedesktop.org/~hadess/idle-inhibition-spec/index.html>
and using L<the "inhibitor locks" feature of
logind|https://www.freedesktop.org/wiki/Software/systemd/inhibit/>.
 
=head1 WHY?
 
If you use xscreensaver, you may have noticed that it doesn't
integrate very well with all the new & fancy desktop features.
 
jwz has resisted adding this kind of integration to the base program,
saying (sensibly) that they would bloat the code and introduce
potential security holes.
 
From version 5.43, xscreensaver includes F<xscreensaver-systemd>, a
stripped-down version of L<a program initially developed by Martin
Lucina|https://github.com/mato/xscreensaver-systemd>, which handles
the logind interaction. Both of those versions link to F<libsystemd>,
which you may not have if you use elogind instead of the full systemd.
 
So I wrote this.
 
=head1 REFERENCES
 
=for :list
* L<< Martin Lucina F<xscreensaver-systemd>|https://github.com/mato/xscreensaver-systemd >>
* L<the Debian bug where the above program is first mentioned|https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=781961>
* L<"Is there a decent way to inhibit screensavers in linux?" on StackOverflow|https://stackoverflow.com/questions/460140/is-there-a-decent-way-to-inhibit-screensavers-in-linux>
* L<the systemd "Inhibitor Locks" documentation|https://www.freedesktop.org/wiki/Software/systemd/inhibit/>
* L<the "idle inhibition" spec|https://people.freedesktop.org/~hadess/idle-inhibition-spec/index.html>