Bug 960955 - [startx] Bad argument parsing
[startx] Bad argument parsing
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: xorg-x11-xinit (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: X/OpenGL Maintenance List
Fedora Extras Quality Assurance
:
Depends On: 806491
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-08 07:24 EDT by larchunix
Modified: 2014-03-25 17:54 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-25 08:00:40 EDT
Type: Bug
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 larchunix 2013-05-08 07:24:40 EDT
Description of problem:

startx does not parse correctly command line arguments and does not select the program to execute as X server.

Version-Release number of selected component (if applicable):

/usr/bin/startx in package xorg-x11-xinit-1.3.2-7.fc18.x86_64

How reproducible:

Always.

Steps to Reproduce:
1. Try to launch Xephyr using startx : startx -- /usr/bin/Xephyr :1
  
Actual results:

Fatal server error:
Unrecognized option: /usr/bin/Xephyr

=> /usr/bin/Xephyr is interpreted as an argument to the X server, startx try to execute the following command :

xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :1 vt0 /usr/bin/Xephyr :1 -auth /path/to/authfile

Expected results:

/usr/bin/Xephyr must be interpreted as the X server program to execute instead of an argument to the X server.

Additional info:

Seems to be a regression due to the following bug https://bugzilla.redhat.com/show_bug.cgi?id=806491

The patch provided to resolve RHBZ#806491 always initializes the serverargs variable with a vt number. As a result, the test if [ x"$server" = x ] && [ x"$serverargs" = x ] (line 68) is always false.
Comment 1 Fedora End Of Life 2013-09-16 09:49:51 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20
Comment 2 Michael Schwendt 2013-11-27 06:09:37 EST
bug 806491 even breaks the very basic

  startx -- :3

calls.
Comment 3 Hans de Goede 2014-03-25 08:00:40 EDT
Hi All,

Thanks for the bug-report and the input. I've prepared a new xorg-x11-xinit version fixing both the passing in an alternative server as well as the display not working.

Note that with this new version if you specify an alternative server, or any server arguments other then the display, the vt to start on will no longer get added. This is by design as ie Xephyr does not take a vt argument at all.

For now I'm building this just for rawhide, but the rawhide package should install on F-20 fine. Please give it a try. If everything works to everyone's liking I'll consider also doing an F-20 update for this.

Regards,

Hans
Comment 4 larchunix 2014-03-25 17:54:09 EDT
Hi,

Thanks a lot for your work !

I made a few tests with the rawhide version :

> startx -- :3

=> OK, launches a X server on the current VT. The session within this X server is registered as active by logind. PolicyKit allow performing privileged actions like shutdown, reboot, etc.

> startx -- /usr/bin/Xephyr :4 

=> OK, launches a Xephyr instance within the current X server.

It seems bug 806491 and this one are now properly fixed. 

Good job :)

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