spaces in pathnames

Jeremy Huddleston jeremyhu at
Sun Jun 29 18:30:34 PDT 2008

So I just pushed a patch to xinit that addresses some issues with  
spaces in pathnames.  One issue remains, and I'm not sure if there's a  
clean way to address it.  At first, I thought I could do something  
like this:

-    serverargs=${serverargs}" -auth "${xserverauthfile}
+    serverargs=${serverargs}" -auth '"${xserverauthfile}"'"

but that doesn't work.  example:

$ mya="Some thing with spaces"
$ myargs="1 2 '$mya'"
$ ./printargs $myargs
argv[0] = ./printargs
argv[1] = 1
argv[2] = 2
argv[3] = 'Some
argv[4] = thing
argv[5] = with
argv[6] = spaces'

So... any thoughts on how to overcome this cleanly?  And no, telling  
people to not use spaces is unfortunately not an option... and neither  
is hitting them over the head with a do-better stick.


More information about the xorg mailing list