How to fix the problem of "Cannot open display"?
Ryan Schmidt
ryandesign at macports.org
Mon Oct 5 17:19:46 PDT 2009
On Oct 5, 2009, at 13:39, Rainer Müller wrote:
> Peng Yu wrote:
>> On Sun, Oct 4, 2009 at 10:05 PM, Ryan Schmidt <ryandesign at macports.org
>> > wrote:
>>> launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-
>>> session.plist
>>>
>>> So run that command (not as sudo).
>>
>> Here is what I got after running the command that you mentioned.
>> What's the problem?
>>
>> $sudo port install dbus
>> Password:
>> ---> Computing dependencies for dbus
>> ---> Cleaning dbus
>> $ 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.
> Alternatively you can force the load like this:
> $ launchctl load -F /Library/LaunchAgents/org.freedesktop.dbus-
> session.plist
More information about the macports-users
mailing list