* Reindent startx after !6 * Remove Xdmx from suggested Xserver list * Mark global variables as static since there's only one source file * Clear -Wunused-parameter warnings from clang * Use ptrdiff_t to store results of pointer subtraction * Use asprintf() if available * Don't exit with failure on SIGTERM regardless. * darwin: Remove bashism from 10-tmpdirs script * Modernized shell scripts * startx: Assign XSERVERRC to correct userserverrc * add closing quote to /dev/random mcookie hex - adjusted xinit-suse.patch - refreshed xinit-client-session.patch - refreshed xinit-tolerant-hostname-changes.patch OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xinit?expand=0&rev=71
150 lines
4.2 KiB
Diff
150 lines
4.2 KiB
Diff
Index: xinit-1.4.3/startx.cpp
|
|
===================================================================
|
|
--- xinit-1.4.3.orig/startx.cpp
|
|
+++ xinit-1.4.3/startx.cpp
|
|
@@ -59,11 +59,103 @@ userclientrc=$HOME/.xinitrc
|
|
[ -f "${XINITRC}" ] && userclientrc="${XINITRC}"
|
|
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
|
|
+type wmlist >/dev/null 2>&1 && WMLIST="`for i in $(wmlist); do echo $i; done | sort`"
|
|
+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.
|
|
+XCOMM go through wms and check if user specified a reachable one.
|
|
+XCOMM
|
|
+
|
|
+for WM in $WMLIST $WINDOWMANAGERLIST
|
|
+do
|
|
+ test "$WM" = "$WANTEDWM" && {
|
|
+XCOMM
|
|
+XCOMM is it reachable via $PATH?
|
|
+XCOMM
|
|
+ type $WM >/dev/null 2>&1 || {
|
|
+
|
|
+ echo "`basename $0`: error: the requested window manager '$1' could not be found!"
|
|
+ echo "Window manager must be one of (currently installed window amangers):"
|
|
+ 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
|
|
+XCOMM check symlink
|
|
+XCOMM
|
|
+
|
|
+if [ ! -L /usr/bin/X ]; then
|
|
+
|
|
+ echo ""
|
|
+ echo "There is no link /usr/bin/X to X server (/usr/bin/Xorg)!"
|
|
+ echo "Please link the files as mentioned above or install the X-Server again."
|
|
+ echo "I'm aborting now."
|
|
+ exit 1
|
|
+fi
|
|
+
|
|
+XCOMM
|
|
+XCOMM check if the Xorg file is an executable or an accidentally copied script or similar things
|
|
+XCOMM
|
|
+
|
|
+if [ ! -x /usr/bin/X ]; then
|
|
+
|
|
+ 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
|
|
[ -f "${XSERVERRC}" ] && userserverrc="${XSERVERRC}"
|
|
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=""
|
|
defaultdisplay=""
|
|
@@ -317,6 +409,10 @@ EOF
|
|
done
|
|
fi
|
|
|
|
+XCOMM handle TCP port 6000
|
|
+test "$DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN" != "yes" && \
|
|
+ serverargs="$serverargs -nolisten tcp"
|
|
+
|
|
case "$(uname -s)" in
|
|
CYGWIN_NT*|Darwin)
|
|
eval $xinit \"$client\" $clientargs -- \"$server\" $display $serverargs
|
|
@@ -327,6 +423,12 @@ CYGWIN_NT*|Darwin)
|
|
esac
|
|
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?"
|
|
+ echo "If so either use a display manager (strongly recommended) or adjust /etc/permissions.local and run \"chkstat --system --set\" afterwards"
|
|
+fi
|
|
+
|
|
if [ "$enable_xauth" = 1 ] ; then
|
|
if [ "$removelist" != "" ]; then
|
|
$xauth remove $removelist
|
|
Index: xinit-1.4.3/xinitrc.cpp
|
|
===================================================================
|
|
--- xinit-1.4.3.orig/xinitrc.cpp
|
|
+++ xinit-1.4.3/xinitrc.cpp
|
|
@@ -47,8 +47,10 @@ if [ -d $xinitdir/xinitrc.d ] ; then
|
|
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
|