2018-04-04 14:40:10 +00:00
|
|
|
Index: xinit-1.4.0/startx.cpp
|
2012-04-14 09:34:16 +00:00
|
|
|
===================================================================
|
2018-07-11 11:35:39 +00:00
|
|
|
--- xinit-1.4.0.orig/startx.cpp 2018-03-10 02:46:03.000000000 +0100
|
|
|
|
+++ xinit-1.4.0/startx.cpp 2018-07-11 13:16:21.864694488 +0200
|
2022-12-04 22:20:35 +00:00
|
|
|
@@ -50,11 +50,103 @@
|
|
|
|
[ -f "${XINITRC}" ] && userclientrc="${XINITRC}"
|
2012-04-14 09:34:16 +00:00
|
|
|
sysclientrc=XINITDIR/xinitrc
|
|
|
|
|
|
|
|
+XCOMM
|
|
|
|
+XCOMM check for installed servers
|
|
|
|
+XCOMM
|
|
|
|
+
|
|
|
|
+#ifdef linux
|
|
|
|
+
|
|
|
|
+INSTALLED_SERVERS=`ls -1 /usr/bin/Xorg /usr/X11R6/bin/XFree86 /usr/X11R6/bin/Xorg* 2>/dev/null`
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+if [ -z "$INSTALLED_SERVERS" ]; then
|
|
|
|
+
|
|
|
|
+ echo ""
|
|
|
|
+ echo "You did not install any X-Server \(e.g. Xorg\)!"
|
|
|
|
+ echo "Please install at least one server to start X."
|
|
|
|
+ echo "I'm aborting now."
|
|
|
|
+ exit 1
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+XCOMM
|
|
|
|
+XCOMM perhaps a windowmanager is specified?
|
|
|
|
+XCOMM
|
|
|
|
+XCOMM
|
|
|
|
+XCOMM find wmlist utility, else take twm as default (always there :-))
|
|
|
|
+XCOMM
|
2015-05-10 08:55:39 +00:00
|
|
|
+type wmlist >/dev/null 2>&1 && WMLIST="`for i in $(wmlist); do echo $i; done | sort`"
|
2012-04-14 09:34:16 +00:00
|
|
|
+test -z "$WMLIST" && WMLIST="twm"
|
|
|
|
+
|
|
|
|
+test "$1" = "--" || { test -n "$1" && WANTEDWM=`basename "$1"` ; }
|
|
|
|
+
|
|
|
|
+XCOMM
|
|
|
|
+XCOMM User could have set a list of window manager in WINDOWMANAGERLIST.
|
2015-01-21 09:42:12 +00:00
|
|
|
+XCOMM go through wms and check if user specified a reachable one.
|
2012-04-14 09:34:16 +00:00
|
|
|
+XCOMM
|
|
|
|
+
|
|
|
|
+for WM in $WMLIST $WINDOWMANAGERLIST
|
2018-04-04 14:40:10 +00:00
|
|
|
+do
|
2012-04-14 09:34:16 +00:00
|
|
|
+ test "$WM" = "$WANTEDWM" && {
|
|
|
|
+XCOMM
|
|
|
|
+XCOMM is it reachable via $PATH?
|
|
|
|
+XCOMM
|
2015-05-10 08:55:39 +00:00
|
|
|
+ type $WM >/dev/null 2>&1 || {
|
2012-04-14 09:34:16 +00:00
|
|
|
+
|
|
|
|
+ echo "`basename $0`: error: the requested window manager '$1' could not be found!"
|
2018-04-04 14:40:10 +00:00
|
|
|
+ echo "Window manager must be one of (currently installed window amangers):"
|
2012-04-14 09:34:16 +00:00
|
|
|
+ for i in $WMLIST; do echo $i; done
|
|
|
|
+ exit 1
|
|
|
|
+ }
|
|
|
|
+XCOMM
|
|
|
|
+XCOMM OK, we got it, this will be the override for WINDOWMANAGER
|
|
|
|
+XCOMM
|
|
|
|
+ export WINDOWMANAGER=$WM
|
|
|
|
+ shift 1
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+done
|
|
|
|
+
|
|
|
|
+unset WINDOWMANAGERLIST WMLIST WANTEDWM WM
|
|
|
|
+
|
|
|
|
+XCOMM
|
2018-07-11 11:35:39 +00:00
|
|
|
+XCOMM check symlink
|
2012-04-14 09:34:16 +00:00
|
|
|
+XCOMM
|
|
|
|
+
|
2018-07-11 11:35:39 +00:00
|
|
|
+if [ ! -L /usr/bin/X ]; then
|
2012-04-14 09:34:16 +00:00
|
|
|
+
|
|
|
|
+ echo ""
|
2018-07-11 11:35:39 +00:00
|
|
|
+ echo "There is no link /usr/bin/X to X server (/usr/bin/Xorg)!"
|
2012-04-14 09:34:16 +00:00
|
|
|
+ echo "Please link the files as mentioned above or install the X-Server again."
|
|
|
|
+ echo "I'm aborting now."
|
|
|
|
+ exit 1
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+XCOMM
|
2015-01-21 09:42:12 +00:00
|
|
|
+XCOMM check if the Xorg file is an executable or an accidentally copied script or similar things
|
2012-04-14 09:34:16 +00:00
|
|
|
+XCOMM
|
|
|
|
+
|
2018-07-11 11:35:39 +00:00
|
|
|
+if [ ! -x /usr/bin/X ]; then
|
2012-04-14 09:34:16 +00:00
|
|
|
+
|
|
|
|
+ echo ""
|
|
|
|
+ echo "The file Xorg (binary of X-Server) doesn't seem to be a binary file."
|
|
|
|
+ echo "Please check it or / and install a new X-Server-binary."
|
|
|
|
+ echo "I'm aborting now."
|
|
|
|
+ exit 1
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+#endif /* linux */
|
|
|
|
+
|
|
|
|
+XCOMM set $DISPLAYMANAGER_XSERVER $DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN
|
|
|
|
+. /etc/sysconfig/displaymanager
|
|
|
|
+
|
|
|
|
userserverrc=$HOME/.xserverrc
|
2022-12-04 22:20:35 +00:00
|
|
|
[ -f "${XSERVERRC}" ] && userclientrc="${XSERVERRC}"
|
2012-04-14 09:34:16 +00:00
|
|
|
sysserverrc=XINITDIR/xserverrc
|
|
|
|
defaultclient=XTERM
|
|
|
|
+XCOMM set X Server accordingly (Xorg/Xgl)
|
|
|
|
defaultserver=XSERVER
|
|
|
|
+test -n "$DISPLAYMANAGER_XSERVER" && defaultserver=/usr/bin/$DISPLAYMANAGER_XSERVER
|
|
|
|
defaultclientargs=""
|
|
|
|
defaultserverargs=""
|
2018-04-04 14:40:10 +00:00
|
|
|
defaultdisplay=""
|
2018-07-11 11:35:39 +00:00
|
|
|
@@ -312,6 +404,9 @@
|
2015-01-21 09:42:12 +00:00
|
|
|
fi
|
|
|
|
done
|
2012-04-14 09:34:16 +00:00
|
|
|
fi
|
|
|
|
+XCOMM handle TCP port 6000
|
|
|
|
+test "$DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN" != "yes" && \
|
|
|
|
+ serverargs="$serverargs -nolisten tcp"
|
|
|
|
|
|
|
|
#if defined(__APPLE__) || defined(__CYGWIN__)
|
|
|
|
eval XINIT \"$client\" $clientargs -- \"$server\" $display $serverargs
|
2018-07-11 11:35:39 +00:00
|
|
|
@@ -320,6 +415,12 @@
|
2012-04-14 09:34:16 +00:00
|
|
|
#endif
|
|
|
|
retval=$?
|
|
|
|
|
|
|
|
+if [ "$retval" != 0 -a ! -u "/usr/bin/Xorg" ]; then
|
|
|
|
+ echo "-------------------------------------------------------------------------------------------"
|
|
|
|
+ echo "xinit failed. /usr/bin/Xorg is not setuid, maybe that's the reason?"
|
2014-09-09 07:55:13 +00:00
|
|
|
+ echo "If so either use a display manager (strongly recommended) or adjust /etc/permissions.local and run \"chkstat --system --set\" afterwards"
|
2012-04-14 09:34:16 +00:00
|
|
|
+fi
|
|
|
|
+
|
|
|
|
if [ x"$enable_xauth" = x1 ] ; then
|
|
|
|
if [ x"$removelist" != x ]; then
|
|
|
|
XAUTH remove $removelist
|
2018-04-04 14:40:10 +00:00
|
|
|
Index: xinit-1.4.0/xinitrc.cpp
|
2012-04-14 09:34:16 +00:00
|
|
|
===================================================================
|
2018-07-11 11:35:39 +00:00
|
|
|
--- xinit-1.4.0.orig/xinitrc.cpp 2018-03-10 02:46:03.000000000 +0100
|
|
|
|
+++ xinit-1.4.0/xinitrc.cpp 2018-07-11 13:13:23.808686361 +0200
|
|
|
|
@@ -48,8 +48,10 @@
|
2012-04-14 09:34:16 +00:00
|
|
|
unset f
|
|
|
|
fi
|
|
|
|
|
|
|
|
-TWM &
|
|
|
|
+if [ -x /usr/X11R6/bin/fvwm -o -x /usr/bin/fvwm]; then
|
|
|
|
+ exec fvwm
|
|
|
|
+fi
|
|
|
|
XCLOCK -geometry 50x50-1+1 &
|
|
|
|
XTERM -geometry 80x50+494+51 &
|
|
|
|
XTERM -geometry 80x20+494-0 &
|
|
|
|
-exec XTERM -geometry 80x66+0+0 -name login
|
|
|
|
+exec TWM
|