diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-11-26 13:01:01 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-11-26 13:01:01 +0000 |
commit | 11192b58aa0053df80faebe224e3cf7f83d822cb (patch) | |
tree | a4a1aadd3141692ec331f2f02dee8b7b2ab37948 /move/tree/startkde_move | |
parent | a97b85927a0405108abb72479240d76a8c3f5097 (diff) | |
download | drakx-backup-do-not-use-11192b58aa0053df80faebe224e3cf7f83d822cb.tar drakx-backup-do-not-use-11192b58aa0053df80faebe224e3cf7f83d822cb.tar.gz drakx-backup-do-not-use-11192b58aa0053df80faebe224e3cf7f83d822cb.tar.bz2 drakx-backup-do-not-use-11192b58aa0053df80faebe224e3cf7f83d822cb.tar.xz drakx-backup-do-not-use-11192b58aa0053df80faebe224e3cf7f83d822cb.zip |
allow X to restart after dying through X_move script, startkde also through startkde_move script
Diffstat (limited to 'move/tree/startkde_move')
-rwxr-xr-x | move/tree/startkde_move | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/move/tree/startkde_move b/move/tree/startkde_move new file mode 100755 index 000000000..a9d1d53ce --- /dev/null +++ b/move/tree/startkde_move @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +use MDK::Common; +use lib qw(/usr/lib/libDrakX); +use c; + +sub wait4x() { + my $nb = 0; + foreach (1..30) { + sleep 1; + print("no X server :("), exit 1 if !fuzzy_pidofs(qr/\bX_move\b/); + $nb++ if c::Xtest(':0'); + if ($nb > 2) { #- one succeeded test is not enough :-( + return; + } + } + exit 1; +} + +my ($kde_ok, $xwait); + +while (1) { + wait4x(); + if (!($xwait = fork())) { + exec 'xwait', '-permanent'; #- so that server doesn't blink when startkde finishes + } + my ($xdim) = `xdpyinfo` =~ /dimensions:\s*(\d+)/; + system("qiv --root /image/move/BOOT-$xdim-MOVE.jpg"); + system('startkde'); + system('sudo killall X'); + waitpid $xwait, 0; +} |