Bug 960955 - [startx] Bad argument parsing
Summary: [startx] Bad argument parsing
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-xinit
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 806491
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-08 11:24 UTC by larchunix
Modified: 2014-03-25 21:54 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-25 12:00:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description larchunix 2013-05-08 11:24:40 UTC
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 13:49:51 UTC
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 11:09:37 UTC
bug 806491 even breaks the very basic

  startx -- :3

calls.

Comment 3 Hans de Goede 2014-03-25 12:00:40 UTC
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 21:54:09 UTC
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.