summaryrefslogtreecommitdiff
path: root/startx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'startx.cpp')
-rw-r--r--startx.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/startx.cpp b/startx.cpp
index 7ed38db..dfbebe1 100644
--- a/startx.cpp
+++ b/startx.cpp
@@ -2,11 +2,12 @@ XCOMM!SHELL_CMD
XCOMM
XCOMM This is just a sample implementation of a slightly less primitive
-XCOMM interface than xinit. It looks for user .xinitrc and .xserverrc
-XCOMM files, then system xinitrc and xserverrc files, else lets xinit choose
-XCOMM its default. The system xinitrc should probably do things like check
-XCOMM for .Xresources files and merge them in, start up a window manager,
-XCOMM and pop a clock and several xterms.
+XCOMM interface than xinit. It looks for XINITRC and XSERVERRC environment
+XCOMM variables, then user .xinitrc and .xserverrc files, and then system
+XCOMM xinitrc and xserverrc files, else lets xinit choose its default.
+XCOMM The system xinitrc should probably do things like check for
+XCOMM .Xresources files and merge them in, start up a window manager, and
+XCOMM pop a clock and several xterms.
XCOMM
XCOMM Site administrators are STRONGLY urged to write nicer versions.
XCOMM
@@ -47,9 +48,11 @@ export PATH
#endif
userclientrc=$HOME/.xinitrc
+[ -f "${XINITRC}" ] && userclientrc="${XINITRC}"
sysclientrc=XINITDIR/xinitrc
userserverrc=$HOME/.xserverrc
+[ -f "${XSERVERRC}" ] && userclientrc="${XSERVERRC}"
sysserverrc=XINITDIR/xserverrc
defaultclient=XTERM
defaultserver=XSERVER