diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:49:22 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:49:22 +0000 |
commit | b7d9a0b434bb0d32857fc47611926cb59ac7f3c5 (patch) | |
tree | 3563c8acb89a1bdd51b61e5124b9c7e03daed9e0 /startx.cmd | |
parent | f18e25ab379836d0885660ad9c42ed588b1152b8 (diff) |
Initial revisionXORG-STABLE
Diffstat (limited to 'startx.cmd')
-rw-r--r-- | startx.cmd | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/startx.cmd b/startx.cmd new file mode 100644 index 0000000..8e40750 --- /dev/null +++ b/startx.cmd @@ -0,0 +1,81 @@ +/* OS/2 REXX */ +/* $XFree86: xc/programs/xinit/startx.cmd,v 3.3 1996/10/17 15:23:47 dawes Exp $ + * + * This is just a sample implementation of a slightly less primitive + * interface than xinit. It looks for user xinitrc.cmd and xservrc.cmd + * files, then system xinitrc.cmd and xservrc.cmd files, else lets xinit choose + * its default. The system xinitrc should probably do things like check + * for Xresources files and merge them in, startup up a window manager, + * and pop a clock and serveral xterms. + * + * Site administrators are STRONGLY urged to write nicer versions. + */ +'@echo off' +ADDRESS CMD +env = 'OS2ENVIRONMENT' +x11root = VALUE('X11ROOT',,env) +IF x11root = '' THEN DO + SAY "The environment variable X11ROOT is not set. XFree86/OS2 won't run without it." + EXIT +END + +home = VALUE('HOME',,env) +IF home = '' THEN home = x11root +os_shell = VALUE('X11SHELL',,env) +IF os_shell = '' THEN os_shell = VALUE('SHELL',,env) +IF os_shell = '' THEN os_shell = VALUE('OS2_SHELL',,env) +IF os_shell = '' THEN DO + SAY "There is no command interpreter in OS2_SHELL ???" + EXIT +END + +userclientrc = home'\xinitrc.cmd' +userserverrc = home'\xservrc.cmd' +sysclientrc = x11root'\XFree86\lib\X11\xinit\xinitrc.cmd' +sysserverrc = x11root'\XFree86\lib\X11\xinit\xservrc.cmd' +clientargs = '' +serverargs = '' + +IF exists(userclientrc) THEN + clientargs = userclientrc +ELSE +IF exists(sysclientrc) THEN + clientargs = sysclientrc + +IF exists(userserverrc) THEN + serverargs = userserverrc +ELSE +IF exists(sysserverrc) THEN + serverargs = sysserverrc + +whoseargs = "client" +PARSE ARG all + +DO i=1 TO WORDS(all) + cur = WORD(all,i) + IF \(FILESPEC('DRIVE',cur) = '') THEN DO + IF whoseargs = "client" THEN + clientargs = cur + ELSE + serverargs = cur + END + ELSE + IF cur = "--" THEN + whoseargs = "server" + ELSE + IF whoseargs = "client" THEN + clientargs = clientargs' 'cur + ELSE + serverargs = serverargs' 'cur +END + +xinit = x11root'\XFree86\bin\xinit' +xinit os_shell' /c 'clientargs' -- 'serverargs + +RETURN + +exists: + IF STREAM(arg(1), 'C', 'QUERY EXISTS') = '' THEN + RETURN 0 + ELSE + RETURN 1 |