Discussion:
Running meld (dbus error: autolaunch requested but X11 support not compiled)
iulian dragos
2011-01-20 09:58:01 UTC
Permalink
Hello,

I've been trying to get meld on Mac OS for a few times in the past
year and a half, with no success. I searched Google, the nabble
archives, and everything I could think of, but nothing helped, so here
I am.

I installed meld using a fresh port installation (MacPorts 1.9.2). I'm
on Mac OS 10.6.6.
Everything went fine during compilation. I ran the two commands listed by dbus:

--->  Activating dbus @1.2.24_1
############################################################################
# Startup items have been generated that will aid in
# starting dbus with launchd. They are disabled
# by default. Execute the following command to start them,
# and to cause them to launch at startup:
#
# sudo launchctl load -w
/Library/LaunchDaemons/org.freedesktop.dbus-system.plist
# launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
############################################################################

The only weird thing was that I needed to do 'sudo' for the second
command as well (didn't have permissions otherwise).

Then I tried to run meld, and here's the output:

$ meld

(process:78120): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Xlib: extension "RANDR" missing on display "/tmp/launch-hVOIj6/org.x:0".
Traceback (most recent call last):
File "/opt/local/bin/meld", line 123, in <module>
main()
File "/opt/local/bin/meld", line 115, in main
app = meld.meldapp.MeldApp()
File "/opt/local/lib/meld/meld/meldapp.py", line 136, in __init__
self.prefs = preferences.MeldPreferences()
File "/opt/local/lib/meld/meld/preferences.py", line 289, in __init__
super(MeldPreferences, self).__init__("/apps/meld", self.defaults)
File "/opt/local/lib/meld/meld/util/prefs.py", line 92, in __init__
self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE)
glib.GError: Failed to contact configuration server; some possible
causes are that you need to enable TCP/IP networking for ORBit, or you
have stale NFS locks due to a system crash. See
http://projects.gnome.org/gconf/ for information. (Details - 1:
Failed to get connection to session: Command line `dbus-launch
--autolaunch=8b3f1f14a2f770b7442e2c414d3803b3 --binary-syntax
--close-stderr' exited with non-zero exit status 1: Autolaunch
requested, but X11 support not compiled in.\nCannot continue.\n)

I didn't find any information about X11 support in dbus on the net (at
least, nothing useful). Can anyone help me? Even just to say that they
could successfully install and run meld (I'd know at least that my
quest is possible).

thanks,
iulian
--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais
Rainer Müller
2011-01-20 13:49:38 UTC
Permalink
Post by iulian dragos
############################################################################
# Startup items have been generated that will aid in
# starting dbus with launchd. They are disabled
# by default. Execute the following command to start them,
#
# sudo launchctl load -w
/Library/LaunchDaemons/org.freedesktop.dbus-system.plist
# launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
############################################################################
The only weird thing was that I needed to do 'sudo' for the second
command as well (didn't have permissions otherwise).
You only need write permissions once to remove the <Disabled> key from
the plist file. As an alternative you could use launchctl load -F which
forces the load.

Rainer
iulian dragos
2011-01-20 14:08:52 UTC
Permalink
Post by Rainer Müller
Post by iulian dragos
############################################################################
# Startup items have been generated that will aid in
# starting dbus with launchd. They are disabled
# by default. Execute the following command to start them,
#
# sudo launchctl load -w
/Library/LaunchDaemons/org.freedesktop.dbus-system.plist
# launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
############################################################################
The only weird thing was that I needed to do 'sudo' for the second
command as well (didn't have permissions otherwise).
You only need write permissions once to remove the <Disabled> key from
the plist file. As an alternative you could use launchctl load -F which
forces the load.
Thank you for your reply. The file still has the Disabled key:

cat /Library/LaunchAgents/org.freedesktop.dbus-session.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.freedesktop.dbus-session</string>

<key>ServiceIPC</key>
<true/>

<!-- bug in 10.4's launchd - on-demand loading does not work -->
<key>OnDemand</key>
<false />

<key>Disabled</key>
<true/>

<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/dbus-daemon</string>
<string>--nofork</string>
<string>--session</string>
</array>

<key>Sockets</key>
<dict>
<key>unix_domain_listener</key>
<dict>
<key>SecureSocketWithKey</key>
<string>DBUS_LAUNCHD_SESSION_BUS_SOCKET</string>
</dict>
</dict>
</dict>
</plist>

-F doesn't help here, but the daemon is still running:

$ launchctl load -F -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
org.freedesktop.dbus-session: Already loaded
launchctl: CFURLWriteDataAndPropertiesToResource(/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist)
failed: -10

Do you think this could be the source of my troubles?

thanks again,
iulian
Post by Rainer Müller
Rainer
_______________________________________________
macports-users mailing list
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais
Ryan Schmidt
2011-01-20 23:11:22 UTC
Permalink
Post by Rainer Müller
You only need write permissions once to remove the <Disabled> key from
the plist file.
I was under the impression that, as of Snow Leopard, launchctl does not store the enabled/disabled state in the plist.

The description of the "-w" flag in "man launchctl" on Snow Leopard says:

"In previous versions, this option would modify the configuration file. Now the state of the Disabled key is stored elsewhere on-disk."
Jeremy Huddleston
2011-01-21 02:33:51 UTC
Permalink
Post by Rainer Müller
Post by iulian dragos
############################################################################
# Startup items have been generated that will aid in
# starting dbus with launchd. They are disabled
# by default. Execute the following command to start them,
#
# sudo launchctl load -w
/Library/LaunchDaemons/org.freedesktop.dbus-system.plist
# launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
############################################################################
The only weird thing was that I needed to do 'sudo' for the second
command as well (didn't have permissions otherwise).
You only need write permissions once to remove the <Disabled> key from
the plist file. As an alternative you could use launchctl load -F which
forces the load.
On Snow Leopard, there's a per-user override. You should be able to just do:
launchctl load /Library/LaunchAgents/org.freedesktop.dbus-session.plist
Rainer Müller
2011-01-21 19:56:51 UTC
Permalink
Post by Jeremy Huddleston
launchctl load /Library/LaunchAgents/org.freedesktop.dbus-session.plist
Ah, right, thanks for the correction. I keep forgetting about this...

Rainer
Jeremy Huddleston
2011-01-21 02:36:13 UTC
Permalink
Post by iulian dragos
$ meld
(process:78120): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Xlib: extension "RANDR" missing on display "/tmp/launch-hVOIj6/org.x:0".
File "/opt/local/bin/meld", line 123, in <module>
main()
File "/opt/local/bin/meld", line 115, in main
app = meld.meldapp.MeldApp()
File "/opt/local/lib/meld/meld/meldapp.py", line 136, in __init__
self.prefs = preferences.MeldPreferences()
File "/opt/local/lib/meld/meld/preferences.py", line 289, in __init__
super(MeldPreferences, self).__init__("/apps/meld", self.defaults)
File "/opt/local/lib/meld/meld/util/prefs.py", line 92, in __init__
self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE)
glib.GError: Failed to contact configuration server; some possible
causes are that you need to enable TCP/IP networking for ORBit, or you
have stale NFS locks due to a system crash. See
Failed to get connection to session: Command line `dbus-launch
--autolaunch=8b3f1f14a2f770b7442e2c414d3803b3 --binary-syntax
--close-stderr' exited with non-zero exit status 1: Autolaunch
requested, but X11 support not compiled in.\nCannot continue.\n)
I didn't find any information about X11 support in dbus on the net (at
least, nothing useful).
dbus doesn't really have anything to do with X11.
Post by iulian dragos
Can anyone help me? Even just to say that they
could successfully install and run meld (I'd know at least that my
quest is possible).
As mentioned, just load the LaunchAgent. Don't use sudo or you'll be loading it for root (not your user).
iulian dragos
2011-01-21 09:03:31 UTC
Permalink
On Fri, Jan 21, 2011 at 3:36 AM, Jeremy Huddleston
Post by Jeremy Huddleston
Post by iulian dragos
$ meld
(process:78120): Gtk-WARNING **: Locale not supported by C library.
      Using the fallback 'C' locale.
Xlib:  extension "RANDR" missing on display "/tmp/launch-hVOIj6/org.x:0".
 File "/opt/local/bin/meld", line 123, in <module>
   main()
 File "/opt/local/bin/meld", line 115, in main
   app = meld.meldapp.MeldApp()
 File "/opt/local/lib/meld/meld/meldapp.py", line 136, in __init__
   self.prefs = preferences.MeldPreferences()
 File "/opt/local/lib/meld/meld/preferences.py", line 289, in __init__
   super(MeldPreferences, self).__init__("/apps/meld", self.defaults)
 File "/opt/local/lib/meld/meld/util/prefs.py", line 92, in __init__
   self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE)
glib.GError: Failed to contact configuration server; some possible
causes are that you need to enable TCP/IP networking for ORBit, or you
have stale NFS locks due to a system crash. See
Failed to get connection to session: Command line `dbus-launch
--autolaunch=8b3f1f14a2f770b7442e2c414d3803b3 --binary-syntax
--close-stderr' exited with non-zero exit status 1: Autolaunch
requested, but X11 support not compiled in.\nCannot continue.\n)
I didn't find any information about X11 support in dbus on the net (at
least, nothing useful).
dbus doesn't really have anything to do with X11.
I don't doubt that, but then what do you make of the error message?
Post by Jeremy Huddleston
Command line `dbus-launch
--autolaunch=8b3f1f14a2f770b7442e2c414d3803b3 --binary-syntax
--close-stderr' exited with non-zero exit status 1: Autolaunch
requested, but X11 support not compiled in.\nCannot continue.\n)
Post by iulian dragos
Can anyone help me? Even just to say that they
could successfully install and run meld (I'd know at least that my
quest is possible).
As mentioned, just load the LaunchAgent.  Don't use sudo or you'll be loading it for root (not your user).
Unfortunately, that's what I tried first. It didn't work. Here it is again.

$ launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
launchctl: CFURLWriteDataAndPropertiesToResource(/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist)
failed: -10

The file in /var/db/... is not writeable:
$ ll /var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist
-rw-r--r-- 1 root wheel 0 Jan 21 09:51
/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist

without '-w' the error is even more interesting.

$ launchctl load /Library/LaunchAgents/org.freedesktop.dbus-session.plist
nothing found to load

I found traces of crashes in the system log:

1/20/11 10:43:17
AM com.apple.launchd.peruser.501[208] (org.freedesktop.dbus-session[69379])
Job appears to have crashed: Segmentation fault

After I manually changed permissions on
/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist I
could launch dbus-session without root privileges. This has not solved
my problem, I still get the previous error message when running meld.

thanks everyone for helping,
iulian

--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais
Ryan Schmidt
2011-01-21 09:56:02 UTC
Permalink
Post by iulian dragos
$ launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
launchctl: CFURLWriteDataAndPropertiesToResource(/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist)
failed: -10
$ ll /var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist
-rw-r--r-- 1 root wheel 0 Jan 21 09:51
/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist
That sounds wrong; that file should have permissions 600 (not 644) and be owned by user 501 (i.e. you, not root). At least, that's how all the directories in /var/db/launchd.db are on my system.
Ionut Georgescu
2011-02-03 00:59:07 UTC
Permalink
Post by iulian dragos
Command line `dbus-launch
--autolaunch=8b3f1f14a2f770b7442e2c414d3803b3 --binary-syntax
--close-stderr' exited with non-zero exit status 1: Autolaunch
requested, but X11 support not compiled in.\nCannot continue.\n)
I didn't find any information about X11 support in dbus on the net (at
least, nothing useful). Can anyone help me? Even just to say that they
could successfully install and run meld (I'd know at least that my
quest is possible).
thanks,
iulian
--
Hi Iulian,

``man dbus-launch'' states

If DBUS_SESSION_BUS_ADDRESS is not set for a process that tries to use
D-Bus, by default the process will attempt to invoke dbus-launch with
the --autolaunch option to start up a new session bus or find the
existing bus address on the X display or in a file in ~/.dbus/session-
bus/


Now, autolaunch is not an option on OSX and

launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

sets DBUS_LAUNCHD_SESSION_BUS_SOCKET. According to
http://www.mailinglistarchive.com/html/fink-***@lists.sourceforge.net/
2010-04/msg00125.html


$ launchctl getenv DBUS_LAUNCHD_SESSION_BUS_SOCKET
/tmp/launch-Qsc1PT/unix_domain_listener

$ export DBUS_SESSION_BUS_ADDRESS=unix:path=$(launchctl getenv
DBUS_LAUNCHD_SESSION_BUS_SOCKET)

$ meld


works!!!!

Ionut

PS The dbus ession should be automatically be loaded at login and
DBUS_SESSION_BUS_ADDRESS should
be set somewhere in profile
Ionut Georgescu
2011-02-03 02:21:39 UTC
Permalink
Post by iulian dragos
Command line `dbus-launch
--autolaunch=8b3f1f14a2f770b7442e2c414d3803b3 --binary-syntax
--close-stderr' exited with non-zero exit status 1: Autolaunch
requested, but X11 support not compiled in.\nCannot continue.\n)
I didn't find any information about X11 support in dbus on the net (at
least, nothing useful). Can anyone help me? Even just to say that they
could successfully install and run meld (I'd know at least that my
quest is possible).
thanks,
iulian
--
Hi Iulian,

enable /Library/LaunchDaemons/org.freedesktop.dbus-system.plist and
respectively /Library/LaunchAgents/org.freedesktop.dbus-session.plist and
then modify your ~/.profile or ~/.bash_profile

export DBUS_SESSION_BUS_ADDRESS=unix:path=$DBUS_LAUNCHD_SESSION_BUS_SOCKET

Then restart the system. Open a terminal and type meld. It may crash the
first time, but run it one more time and it will be ok.

By the way, if you find another trustworthy merge tool please let know.

Good luck,
Ionut
--
http://www.pks.mpg.de/~george/

"UNIX is basically a simple operating system, but you have to be a genius to
understand the simplicity."
iulian dragos
2011-02-03 15:26:17 UTC
Permalink
Post by Ionut Georgescu
Hi Iulian,
enable /Library/LaunchDaemons/org.freedesktop.dbus-system.plist and
respectively /Library/LaunchAgents/org.freedesktop.dbus-session.plist and
then modify your ~/.profile or ~/.bash_profile
export  DBUS_SESSION_BUS_ADDRESS=unix:path=$DBUS_LAUNCHD_SESSION_BUS_SOCKET
Then restart the system. Open a terminal and type meld. It may crash the
first time, but run it one more time and it will be ok.
Ionut, thanks a million! It works. I had to restart indeed (first I
tried without restarting and it failed with a connection refused
error). Now it works just fine (in the meantime, I also recompiled
dbus with X support, by changing the portfile locally. I don't know if
that is required or not).

I wonder if this should be part of the port file? It's definitely not
obvious, and Googling the internet didn't reveal anything.
Post by Ionut Georgescu
By the way, if you find another trustworthy merge tool please let know.
I used Meld for a long time on Linux. Before that I was using Araxis
Merge on Windows. They have a version for Mac OS, but I find it too
expensive and meld is just as good.

thanks again, you really made my day,
iulian
Post by Ionut Georgescu
Good luck,
Ionut
--
http://www.pks.mpg.de/~george/
"UNIX is basically a simple operating system, but you have to be a genius to
understand the simplicity."
_______________________________________________
macports-users mailing list
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais
Loading...