summaryrefslogtreecommitdiffstats
path: root/move/tree
diff options
context:
space:
mode:
Diffstat (limited to 'move/tree')
-rwxr-xr-xmove/tree/X_move7
-rwxr-xr-xmove/tree/startkde_move32
2 files changed, 39 insertions, 0 deletions
diff --git a/move/tree/X_move b/move/tree/X_move
new file mode 100755
index 000000000..df085fcd8
--- /dev/null
+++ b/move/tree/X_move
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+ok=0
+while [ "$ok" == 0 ]; do
+ X $@
+ ok=$?
+done
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;
+}