How to fix the problem of "Cannot open display"?
raimue at macports.org
Mon Oct 5 11:39:44 PDT 2009
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
> ---> 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
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.
Alternatively you can force the load like this:
$ launchctl load -F /Library/LaunchAgents/org.freedesktop.dbus-session.plist
More information about the macports-users