summaryrefslogtreecommitdiffstats
path: root/command-stubs
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-01-15 02:46:55 +0000
committerMike Fulbright <msf@redhat.com>2003-01-15 02:46:55 +0000
commita2b3575409fe0598ba6a8bcc79f810f7e065d157 (patch)
treecf6481adec0d18baaa83217799f5a26f679aa6d6 /command-stubs
parent959ae328643f7ed1240d641f1c20b399f2b951a8 (diff)
downloadanaconda-a2b3575409fe0598ba6a8bcc79f810f7e065d157.tar.gz
anaconda-a2b3575409fe0598ba6a8bcc79f810f7e065d157.tar.xz
anaconda-a2b3575409fe0598ba6a8bcc79f810f7e065d157.zip
script to start X in rescue mode with xterm and twm
Diffstat (limited to 'command-stubs')
-rwxr-xr-xcommand-stubs/rescue-startx-stub23
1 files changed, 23 insertions, 0 deletions
diff --git a/command-stubs/rescue-startx-stub b/command-stubs/rescue-startx-stub
new file mode 100755
index 000000000..479be99f2
--- /dev/null
+++ b/command-stubs/rescue-startx-stub
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+#
+#
+# Stub to start X in rescue mode with twm and an xterm
+#
+
+import os, sys
+import rhpl.xserver as xserver
+import rhpl.keyboard as keyboard
+
+# see if its even possible
+if not os.access("/mnt/sysimage/usr/X11R6/bin/xterm", os.X_OK) or not os.access("/mnt/sysimage/usr/X11R6/bin/twm", os.X_OK):
+ print "Must have mounted an existing installation in rescue mode to work."
+ sys.exit(0)
+
+if len(sys.argv) > 1:
+ mode = sys.argv[1]
+else:
+ mode = '800x600'
+
+xserver.probeHWandStartXServer(mode)
+os.system("twm&")
+os.system("xterm")