diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-08-17 19:08:01 +0100 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-08-17 19:08:01 +0100 |
commit | 9dfc0b6d3a3f0f49e14840fadbaee46fc8b4d236 (patch) | |
tree | 65846616457169cc397d79ee22c24140c0e9e16c | |
parent | 77edab3750595955bf62b8831608ee96ac9a138c (diff) | |
download | draklive-config-9dfc0b6d3a3f0f49e14840fadbaee46fc8b4d236.tar draklive-config-9dfc0b6d3a3f0f49e14840fadbaee46fc8b4d236.tar.gz draklive-config-9dfc0b6d3a3f0f49e14840fadbaee46fc8b4d236.tar.bz2 draklive-config-9dfc0b6d3a3f0f49e14840fadbaee46fc8b4d236.tar.xz draklive-config-9dfc0b6d3a3f0f49e14840fadbaee46fc8b4d236.zip |
Backport draklive-install fix to disable screensaver during install.
-rw-r--r-- | config/live.cfg | 2 | ||||
-rw-r--r-- | files/draklive-install | 20 |
2 files changed, 22 insertions, 0 deletions
diff --git a/config/live.cfg b/config/live.cfg index 15a4344..b0f35eb 100644 --- a/config/live.cfg +++ b/config/live.cfg @@ -110,6 +110,8 @@ my $_l = { (map { [ 'files/draksnapshot.sysconfig', $_ . '/.draksnapshot', { mode => 0644, no_install => 1 } ] } @user_config_dirs), [ 'files/compute-ooo-dicts.pl', '/usr/sbin/compute-ooo-dicts.pl', { mode => 0755 } ], [ 'files/compute-i18n-list.pl', '/usr/sbin/compute-i18n-list.pl', { mode => 0755 } ], + #- disable screensaver when running draklive-install + [ 'files/draklive-install', '/usr/bin/draklive-install', { mode => 0755 } ], ], remove_files => [ (map { "/etc/modprobe.preload.d/$_" } qw(cpufreq pcmcia rfswitch)), diff --git a/files/draklive-install b/files/draklive-install new file mode 100644 index 0000000..018afd4 --- /dev/null +++ b/files/draklive-install @@ -0,0 +1,20 @@ +#!/bin/perl +use Net::DBus; + +if ($>) { + if (system('ps -C xscreensaver') == 0) { + # xscreensaver doesn't implement the freedesktop API, so we just have to kill it. + # We expect the user to reboot after the install completes, so don't bother to + # reenable it. + system('xscreensaver-command -exit'); + } else { + my $bus = Net::DBus->session; + my $service = $bus && $bus->get_service('org.freedesktop.ScreenSaver'); + my $manager = $service && $service->get_object('/ScreenSaver', 'org.freedesktop.ScreenSaver'); + my $cookie = $manager && $manager->Inhibit('draklive-install', 'Install in progress'); + # The screensaver will be automatically uninhibited when this process exits. + } + my $status = system("/usr/bin/pkexec /usr/sbin/draklive-install-lock-storage @ARGV"); + exit($status); +} +exec("/usr/sbin/draklive-install-lock-storage @ARGV"); |