Bug 36737 - [PATCH] startx hosed, .xserverrc/cmdline woes
Summary: [PATCH] startx hosed, .xserverrc/cmdline woes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: XFree86
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-04-20 02:05 UTC by h0e
Modified: 2007-04-18 16:32 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-12-21 21:37:35 UTC
Embargoed:


Attachments (Terms of Use)

Description h0e 2001-04-20 02:05:49 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.19-7.0.1 i686; en-US; 0.8.1)
Gecko/20010326


startx incorrectly handles passing a nondefault server to xinit. startx
passes .xserverrc, /usr/X11R6/lib/X11/xserverrc, and command line
overridden servers to xinit on it's command line, but they get treated as
server arguments. In the case of .xserverrc that means the server will get
some funny arguments (because xinit calls .xserverrc by itself anyway), in
the case of [no dot]xserverrc or a command line server those options won't
work at all.

Reproducible: Always
Steps to Reproduce:
1.startx -- /bin/true OR

1.echo 'exec X $*' > ~/.xserverrc
2.startx

Actual Results:  server complains about funny server arguments /bin/true or
~/.xserverrc, /bin/true doesn't get executed as the server

Expected Results:  /bin/true gets executed as the server, .xserverrc and
/bin/true not passed in as arguments

I believe this patch is nice and correct

--- startx~	Thu Aug 31 06:54:16 2000
+++ startx	Fri Apr 20 12:00:05 2001
@@ -30,9 +30,9 @@
 fi
 
 if [ -f $userserverrc ]; then
-    serverargs=$userserverrc
+    server=$userserverrc
 else if [ -f $sysserverrc ]; then
-    serverargs=$sysserverrc
+    server=$sysserverrc
 fi
 fi
 
@@ -48,7 +48,7 @@
 
	    fi
 
	else
 
	    if [ "x$serverargs" = x ]; then
-
		serverargs="$1"
+
		server="$1"
 
	    else
 
		serverargs="$serverargs $1"
 
	    fi

Comment 1 Mike A. Harris 2002-12-21 21:37:35 UTC
Hmm...  this problem seems to not be present in current XFree86.  I've
never noticed it before personally.  Must have been a problem in the
4.0.1 release only I guess.  I'm able to pass an X server to the startx
script in 7.1 and later using XFree86 4.1.0 and higher at least.

The current startx is quite different now it seems.  Sorry for not commenting
on this earlier.

Closing as CURRENTRELEASE (8.0)



Note You need to log in before you can comment on or make changes to this bug.