How to fix the problem of "Cannot open display"?

Joshua Root jmr at macports.org
Mon Oct 5 19:26:02 PDT 2009


On 2009-10-6 11:19, Ryan Schmidt wrote:
> 
> On Oct 5, 2009, at 13:39, Rainer Müller wrote:
> 
>> Peng Yu wrote:
>>> $ launchctl load -w
>>> /Library/LaunchAgents/org.freedesktop.dbus-session.plist
>>> launchctl:
>>> CFURLWriteDataAndPropertiesToResource(/Library/LaunchAgents/org.freedesktop.dbus-session.plist)
>>>
>>> failed: -10
>>> $ls /Library/LaunchAgents/org.freedesktop.dbus-session.plist
>>> /Library/LaunchAgents/org.freedesktop.dbus-session.plist
>>
>> The -w option requires write access to that file what you usually do not
>> have as a normal user. It is used to remove the Disabled key from the
>> file.
> 
> So the instructions the port prints out are wrong? Is there a way to
> correct them? It sounds like you're saying you need "sudo" to have
> access to write the changes to the plist, but I remember from prior
> discussions that this would cause the launchagent to be running as root,
> when in fact we want the launchagent running as the current user.

The bottom line is that the startupitem code needs some love. At present
it really can't handle anything beyond launchdaemons that will be
started by root.

- Josh


More information about the macports-users mailing list