emacs and gconf troubles

Ashish SHUKLA ashish at FreeBSD.org
Sun Dec 12 16:10:23 UTC 2010

Andrea Venturoli writes:
> On 12/11/10 16:18, Ashish SHUKLA wrote:
>> Hi Andrea,
>> Sorry for the late reply.

> No problem!
> Really, thanks for your help.

>> Okay, I'm able to reproduce warnings. As emacs tries to lookup DBUS session
>> bus in the environment, and if it doesn't find one, it starts one. And "dbus"
>> keeps running in the same TTY after you close emacs, so when you try to exit
>> From the SSH session, it hangs waiting for all processes (attached to current
>> TTY) to exit, and therefore you've to kill the SSH session forcibly. To verify
>> this, you can kill the started dbus-daemon (attached to the same TTY) and you
>> should be able to exit from SSH session as usual.
>> I'm not sure if my explanation is correct for this behavior.

> I think it only explains part of it.

> Scenario A:
> _ dbus is running on localhost;
> _ I run Konsole and start Emacs from there;
> _ I get the warning (but DBUS is running!!!);
> _ after I exit Emacs, Konsole usually closes, but not always (!!!).

Okay, DBus runs in two modes, system-mode, and session-mode. In "system-mode",
it's started by rc(8) during boot and exposes itself to all system-wide
services (like HAL, Avahi, etc.), whereas in "session-mode" it's usually
started by the desktop environment and provides service to all applications
specific to the user session. In case, DBus wasn't found running in the
session, it's started.

So, what I think happening in your case is kdm isn't starting the "DBus" on
startup of your session, which is why it only gets activated (started) when
you start Emacs (or any other DBus consumer application).

I use startx(1) and following is my $HOME/.xinitrc, where I start DBus prior
to starting xmonad:

chateau.d.if!abbe:~ % cat .xinitrc

xrdb ~/.Xdefaults
xmodmap ~/.Xmodmap
exec dbus-launch --exit-with-session ck-launch-session xmonad 2>&1 >$HOME/.xsession-errors

> Scenario B:
> _ dbus is running on localhost;
> _ I run Konsole and SSH into another box;
> _ on the remote box dbus is not running;
> _ I run Emacs, get the warning and DBUS is started;
> _ after I exit Emacs I cannot close Konsole unless I also close DBUS.

> So your explanation fits the second scenario perfectly, but does not
> explain the first.
> Also, I read I shouldn't run DBUS on the remote machine, but let Emacs
> connect to the one on localhost? Is this true? How do I do it?
> Should I run DBUS from rc on every box?

And for good overall desktop experience, please make sure dbus gets started on
system startup, as well as session startup. Lots of services expect DBus to be

If you're running Emacs on server and don't want DBus to be started, then
exclude DBUS using "make config" and reinstall the port.

>  bye & Thanks
> 	av.

Ashish SHUKLA      | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
freebsd.org!ashish | http://people.freebsd.org/~ashish/

Avoid Success At All Costs !!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20101212/58a68a60/attachment.pgp

More information about the freebsd-ports mailing list