initial commit
[profile/ivi/xorg-x11-xinit.git] / xinitrc.cmd
1 /* OS/2 REXX */
2 /* $XFree86: xc/programs/xinit/xinitrc.cmd,v 3.5 1997/01/27 08:26:14 dawes Exp $ */
3 '@echo off'
4 env = 'OS2ENVIRONMENT'
5 x11root = VALUE('X11ROOT',,env)
6 IF x11root = '' THEN DO
7         SAY "The environment variable X11ROOT is not set. X/OS2 won't run without it."
8         EXIT
9 END
10 home = VALUE('HOME',,env)
11 IF home = '' THEN home = x11root
12
13 userresources = home'\.Xresources'
14 usermodmap    = home'\.Xmodmap'
15 sysresources  = x11root'\usr\X11R6\lib\X11\xinit\.Xresources'
16 sysmodmap     = x11root'\usr\X11R6\lib\X11\xinit\.Xmodmap'
17 xbitmapdir    = x11root'\usr\X11R6\include\X11\bitmaps'
18 manpath       = VALUE('MANPATH',,env)
19
20 /* merge in defaults */
21 IF exists(sysresources) THEN
22         'xrdb -merge 'sysresources
23
24 IF exists(sysmodmap) THEN
25         'xmodmap 'sysmodmap
26
27 IF exists(userresources) THEN
28         'xrdb -merge 'userresources
29
30 IF exists(usermodmap) THEN
31         'xmodmap 'usermodmap
32
33 /* start some nice :-) test programs */
34 'xsetroot -bitmap 'xbitmapdir'\xos2'
35 /* also try out the following ones: 
36  * 'xsetroot -bitmap 'xbitmapdir'\xfree1'
37  * 'xsetroot -bitmap 'xbitmapdir'\xfree2'
38  */
39
40 /****** WARNING! *********
41  * Below some programs are started minimized, some are started detached.
42  * In general, those that spawn other shells are minimized, others may be
43  * detached. You might be tempted to run the xterm's as well as detached.
44  * This works, but leaves you with an independent xterm/cmd pair, when the 
45  * server shuts down, which you can only see in watchcat, not the process list.
46  * If you start and stop x11 multiple times, this will let you run out of
47  * PTYs, and will lead to a large number of background sessions.
48  */
49 'detach xclock -update 1 -geometry 100x100-1+1'
50 'start/min/n "Login Xterm" xterm -sb -geometry 80x25+0+0 -name login'
51 IF manpath \= '' THEN
52         'detach xman -geometry 100x100-105+1'
53 /* 'startx/min/n "Xterm 1" xterm -sb -geometry 80x50+494+51' */
54 /* 'startx/min/n "Xterm 2" xterm -sb -geometry 80x20+494-0' */
55 'twm'
56
57 EXIT
58
59 exists:
60 'DIR "'arg(1)'" >nul 2>&1'
61 if rc = 0 THEN RETURN 1
62 RETURN 0