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. --Jeremy
Oh... of course there's this: -XINIT "$client" $clientargs -- "$server" $display $serverargs +eval XINIT \"$client\" $clientargs -- \"$server\" $display $serverargs But is eval available on all the shells that startx should expect to work with? On Jun 29, 2008, at 18:30, Jeremy Huddleston wrote:
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.
--Jeremy _______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
I think you need to change the startx script to ensure that any variable that starts from $HOME is double quoted at the point of call - and you push the adding of -auth $xserverauthfile to the call to xinit. I enclose a hacked file with my suggestions. I haven't tested this with spaces in the $HOME though - and I am probably fixing the wrong problem.. On 30 Jun 2008, at 02:30, Jeremy Huddleston wrote:
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.
--Jeremy _______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
Whoops you need to be able to turn auth off. On 30 Jun 2008, at 02:30, Jeremy Huddleston wrote:
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.
--Jeremy _______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
And it helps to include the original $serverargs into the call to xinit. On 30 Jun 2008, at 02:30, Jeremy Huddleston wrote:
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.
--Jeremy _______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
participants (2)
-
Jeremy Huddleston
-
Peter Collinson