summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-10-23 17:37:35 +0000
committerOlivier Blin <oblin@mandriva.com>2007-10-23 17:37:35 +0000
commit6c714597ea6ba89cd9b78162aa1554705d335e64 (patch)
tree162f73c5f7c5094d923bc19c0195012505064415
parentce983934eee38ee727ae3ad403dbefd86572a681 (diff)
downloaddrakx-6c714597ea6ba89cd9b78162aa1554705d335e64.tar
drakx-6c714597ea6ba89cd9b78162aa1554705d335e64.tar.gz
drakx-6c714597ea6ba89cd9b78162aa1554705d335e64.tar.bz2
drakx-6c714597ea6ba89cd9b78162aa1554705d335e64.tar.xz
drakx-6c714597ea6ba89cd9b78162aa1554705d335e64.zip
drakclock/finish-install: disable DPMS and screensaver when setting time not to blank monitor (#17031, backport from trunk)
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/any.pm11
-rwxr-xr-xperl-install/standalone/drakclock2
-rw-r--r--perl-install/timezone.pm2
4 files changed, 17 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 96680b6fd..c1072a976 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -3,6 +3,8 @@
- draksec:
o fix switching from "no_password" to "_password" (#34490)
- fix buttons order under KDE when using compiz (by detecting kde-window-decorator)
+- drakclock/finish-install: disable DPMS and screensaver when setting time,
+ not to blank monitor (#17031)
Version 10.4.239 - 5 October 2007, by Thierry Vignaud
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 241cb0a0e..efdc1b615 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -1363,4 +1363,15 @@ sub configure_timezone {
1;
}
+sub disable_x_screensaver() {
+ run_program::run("xset", "s", "off");
+ run_program::run("xset", "-dpms");
+}
+
+sub enable_x_screensaver() {
+ run_program::run("xset", "+dpms");
+ run_program::run("xset", "s", "on");
+ run_program::run("xset", "s", "reset");
+}
+
1;
diff --git a/perl-install/standalone/drakclock b/perl-install/standalone/drakclock
index e34980807..d9d046a66 100755
--- a/perl-install/standalone/drakclock
+++ b/perl-install/standalone/drakclock
@@ -103,6 +103,7 @@ $my_win->{window}->add(gtknew('VBox', border_width => $::isEmbedded ? 0 : 5, chi
cancel_clicked => sub { ugtk2->exit(0) },
ok_clicked => sub {
my $need_date = 1;
+ any::disable_x_screensaver();
if ($check_ntp->get_active) {
my $choosed_serv = $combo_ntpserver->entry->get_text;
$choosed_serv =~ s/^[^:]+: (.+)/$1/;
@@ -141,6 +142,7 @@ $my_win->{window}->add(gtknew('VBox', border_width => $::isEmbedded ? 0 : 5, chi
join('', map { print_it0($_) } ($month, $day, $hour, $min, $year)) . '.' . print_it0($sec));
}
-e '/sbin/hwclock' and system('/sbin/hwclock --systohc');
+ any::enable_x_screensaver();
system("dcop kicker Panel restart") if $ENV{DESKTOP} eq 'kde';
ugtk2->exit(0);
},
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index 4fbc36862..e5750fd6e 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -64,7 +64,9 @@ sub write {
sub reload_sys_clock {
my ($t) = @_;
require run_program;
+ any::disable_x_screensaver();
run_program::run('hwclock', '--hctosys', ($t->{UTC} ? '--utc' : '--localtime'));
+ any::enable_x_screensaver();
}
#- best guesses for a given country