summaryrefslogtreecommitdiff
path: root/startx.cpp
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@herrb.eu>2022-12-04 12:04:18 +0100
committerMatthieu Herrb <matthieu@herrb.eu>2022-12-04 12:04:18 +0100
commit6b3955f66df30c4d7f3ec954629a868e92ff7e67 (patch)
tree5e35d21d05e846f9891916f177c2a1d0ae8d0c9f /startx.cpp
parentd0ecfef28c08483e918c7f758a5f132071442ee0 (diff)
parentf9786fb5a7e526035699f3d4d6661468ab20e689 (diff)
Merge remote-tracking branch 'origin/master' into obsd
Diffstat (limited to 'startx.cpp')
-rw-r--r--startx.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/startx.cpp b/startx.cpp
index 6c41294..ff56efd 100644
--- a/startx.cpp
+++ b/startx.cpp
@@ -2,16 +2,16 @@ 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
-unset DBUS_SESSION_BUS_ADDRESS
unset SESSION_MANAGER
#ifdef __APPLE__
@@ -48,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