[Bug 2595] New: startx arg handling is not whitespace-clean

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 22 12:49:35 PST 2005


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=2595          
     
           Summary: startx arg handling is not whitespace-clean
           Product: xorg
           Version: 6.8.0
          Platform: All
               URL: http://bugs.gentoo.org/show_bug.cgi?id=82923
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Server/general
        AssignedTo: xorg-bugzilla-noise at freedesktop.org
        ReportedBy: jbucata at tulsaconnect.com


Taking upstream at request of Gentoo devs.

According to the man page, startx is supposed to take the same command-line
syntax as xinit, and provide some extra services like setting up authorization
and such like.  However, xinit handles single-quoted command line args with
embedded spaces correctly, but startx does not.

The script assumes that each individual command-line parameter has no embedded
spaces, with constructs like:
     clientargs="$clientargs $1"
Thus, any special quoting or grouping on the startx command line won't get
propagated to xinit correctly.

I discovered this problem while trying to do some testing for another bug. 
Boiled down, this command works:
     xinit /bin/sh -vxc 'xsetroot -solid orange; sleep 5' -- :1
but this command, which per the docs should work, doesn't:
     startx /bin/sh -vxc 'xsetroot -solid orange; sleep 5' -- :1
The former starts the server, sets the background color and waits for 5 seconds,
like it should.  The latter starts the server and bails immediately since
xsetroot runs with no args and sleep isn't run at all.

I used a little sed command that I hope is adequate to quote for whatever shells
you intend to support as /bin/sh.  Will upload patch.          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the xorg-bugzilla-noise mailing list