Start X11 automatically when launching programs from Terminal

Leo Singer aronnax at macports.org
Thu May 16 19:11:27 PDT 2013


On May 16, 2013, at 7:05 PM, Lawrence Velázquez <larryv at macports.org> wrote:

> On May 16, 2013, at 9:46 PM, Leo Singer <aronnax at macports.org> wrote:
> 
>> On Mountain Lion, how do you configure X11 (provided by MacPorts' xorg port) to start automatically as needed? When I am Terminal.app, if I run 'xclock', I just get:
>> 
>>   Error: Can't open display: 
>> 
>> It works fine if I open /Applications/MacPorts/X11.app, then open an xterm window, and then run 'xclock' from there.
> 
> Did you load the xorg-server LaunchAgent, then log out and back in?
> 
>    % launchctl load -w /Library/LaunchAgents/org.macports.startx.plist

Thanks, that worked!

> Yeah, the xinit install tells you to do this. Very briefly. If you're paying attention.
> 
> http://trac.macports.org/browser/trunk/dports/x11/xinit/Portfile#L82

Indeed. I never noticed that message.

Could you add a startupitem so that you can load/unload X11 with 'port (un)load) xinit'?

Thanks,
Leo


More information about the macports-users mailing list