startx.cpp and default server (patch provided)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



startx.cpp has a default server (full path) like: defaultserver=XSERVER 
which defaults to ${bindir}/X at configure time.

But if no command line arguments and no ~/.xserverrc and no system 
xserverrc configuration, the server gets reset. So xinit uses its builtin 
X choice (default_server does't have full path). So the problem is the 
startx script doesn't use its builtin setting, so wrong X may be started.

I have been using the following fix for a while now and I want to commit. 
(I updated the following patch now for the recent __APPLE__ changes.)

Can someone please give this an extra set of eyes? Am I understanding this 
correctly?

diff --git a/startx.cpp b/startx.cpp
index 7e67769..9931281 100644
--- a/startx.cpp
+++ b/startx.cpp
@@ -216,17 +216,17 @@ XCOMM process server arguments
 if [ x"$server" = x ]; then
     XCOMM if no server arguments or display either, use rc file instead
     if [ x"$serverargs" = x -a x"$display" = x ]; then
 #ifdef __APPLE__
 	server=$defaultserver
 	serverargs=$defaultserverargs
 	display="$defaultdisplay"
 #else
-	server="$defaultserverargs"
+	server="$defaultserver $defaultserverargs"
 #endif
     else
 	server=$defaultserver
     fi
 fi
 
 if [ x"$enable_xauth" = x1 ] ; then
     if [ x"$XAUTHORITY" = x ]; then


Also related: shouldn't the configure script define the DEFAULT_XINIT to 
full path like it does for DEFAULT_XSERVER? (that way the correct xinit is 
used)? For now, I use --with-xinit, but I don't have to use --with-xserver 
since configure does the right thing for XSERVER.
_______________________________________________
xorg mailing list
xorg@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/xorg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [X Forum]     [Intel Graphics]     [AMD Graphics]     [Nouveau Driver]     [XFree86]     [XFree86 Newbie]     [IETF Annouce]     [Security]     [Fontconfig]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Video for Linux]     [Linux RAID]

  Powered by Linux