[Xquartz-dev] 2.1.2 release candidate

Martin Costabel costabel at wanadoo.fr
Tue Jan 8 23:55:09 PST 2008


Jeremy Huddleston wrote:
> Great, thanks.
> 
> I'm uploading a new rc now which adds X11 to PATH within startx.  I'll  
> wait to hear back from you before I push it out.

Sorry, had to sleep for a while. And I am still not quite awake, sending 
out a NULL message by mistake, sorry.

Anyway...

> I want to start the server via '/bin/bash --login /usr/X11/bin/startx'  
> rather than just '/usr/bin/startx' because I want to make sure that / 
> etc/profile and ~/.profile are sourced to setup the user's  
> environment.  Not doing so would cause $PATH to be just "/usr/X11/bin:/ 
> usr/bin:/bin:/usr/sbin:/sbin".  Thus if they use macports and have  
> 'rxvt' as one of their applications in X11's Applications menu,  they'll 
> need to give the full path to the application.  This is  actually the 
> way the 10.5 shipped X11 behaved, but I regard this as a  bug and fixed 
> it by using 'login -f <username> /bin/sh -c /usr/X11/bin/ Xquartz' to 
> exec the server within server-main.c.  That carried over  to a bash 
> --login in the current configuration.

For people who don't have bash as their login shell, this is a 
regression. With /usr/bin/X11 now on the PATH, X11 will start up OK, but 
it will not have the rest of their environment. If they use Fink or 
macports, they will once again have to bend backwards in order to get a 
decent environment for the applications started from the Applications menu.

I don't know what launchd has for an environment, but couldn't you run 
the login inside startx? Something like

#!/bin/sh
/usr/bin/login -f $USER
/bin/sh

right at the beginning? This would continue inside sh, but with the 
user's login environment.

-- 
Martin



More information about the Xquartz-dev mailing list