Bug 36737 - [PATCH] startx hosed, .xserverrc/cmdline woes
[PATCH] startx hosed, .xserverrc/cmdline woes
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: XFree86 (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-19 22:05 EDT by h0e
Modified: 2007-04-18 12:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-21 16:37:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description h0e 2001-04-19 22:05:49 EDT
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 16:37:35 EST
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.