From a2b3575409fe0598ba6a8bcc79f810f7e065d157 Mon Sep 17 00:00:00 2001 From: Mike Fulbright Date: Wed, 15 Jan 2003 02:46:55 +0000 Subject: script to start X in rescue mode with xterm and twm --- command-stubs/rescue-startx-stub | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 command-stubs/rescue-startx-stub 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") -- cgit