unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12112: 24.1.50; Starting emacs without dbus
@ 2012-08-01 13:46 Harald Hanche-Olsen
  2012-08-07 14:17 ` Michael Albinus
  2012-08-24 13:08 ` Michael Albinus
  0 siblings, 2 replies; 3+ messages in thread
From: Harald Hanche-Olsen @ 2012-08-01 13:46 UTC (permalink / raw)
  To: 12112

This is perhaps a documentation enhancement request,
or perhaps a feature request.

Background: emacs launches dbus if it is started under X11 (i.e., with
DISPLAY set). If the user logged into the machine via ssh, the dbus
process(es) will continue after emacs is terminated, thus holding open
a channel (or two) through the ssh tunnel to the X11 server. So ssh
hangs when the user tries to log out.

Therefore, there is a need for users to be able to either start emacs
without launching dbus in the process, or else making sure that dbus
is also terminated when emacs is terminated (if dbus was started by
emacs in the first place).

This can be achieved in the current code by compiling emacs with these
configure flags: --without-dbus --without-gsettings --without-gconf
However, this is very difficult to discover without extensive trial
and error. If this could be documented some place, it would be good.
Or perhaps the configure script should have an option that is
equivalent to this combination?

It would be even more desirable if the goal of running without dbus
could be achieved without a specially compiled binary. I know of just
one way to achieve that:

  DISPLAY= emacs --daemon
  emacsclient -c ...

This works because emacs does not launch dbus if it does not have
DISPLAY set in its environment. Perhaps that might be documented, too.

Yet another possibility: A special startup flag to stop emacs from
launching dbus, perhaps by unsetting DISPLAY in its own environment
during startup, then resetting it after all the code that might
conceivably launch dbus has run. (This may not be practical.)

I am seeing this problem in recent bzr revisions (as of yesterday and
today) on trunk.

All this has been discussed on the emacs-deval mailing list: See the
thread titled "Emacs insists on starting dbus?" starting on July 31,
2012.

In that thread it has been noted that the dbus maintainers have an
open issue surrounding this phenomenon:
https://bugs.freedesktop.org/show_bug.cgi?id=32509
However, a long time has passed without any acitivity, so it may not
be resolved on the dbus side for a while.

- Harald





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#12112: 24.1.50; Starting emacs without dbus
  2012-08-01 13:46 bug#12112: 24.1.50; Starting emacs without dbus Harald Hanche-Olsen
@ 2012-08-07 14:17 ` Michael Albinus
  2012-08-24 13:08 ` Michael Albinus
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Albinus @ 2012-08-07 14:17 UTC (permalink / raw)
  To: Harald Hanche-Olsen; +Cc: 12112

Harald Hanche-Olsen <hanche@math.ntnu.no> writes:

> This can be achieved in the current code by compiling emacs with these
> configure flags: --without-dbus --without-gsettings --without-gconf
> However, this is very difficult to discover without extensive trial
> and error. If this could be documented some place, it would be good.
> Or perhaps the configure script should have an option that is
> equivalent to this combination?

I have documented this in INSTALL. Since it is not widely used for
compilation, I don't believe it needs another configure option.

> It would be even more desirable if the goal of running without dbus
> could be achieved without a specially compiled binary. I know of just
> one way to achieve that:
>
>   DISPLAY= emacs --daemon
>   emacsclient -c ...
>
> This works because emacs does not launch dbus if it does not have
> DISPLAY set in its environment. Perhaps that might be documented, too.

This could be documented in the Emacs manual, chapter Emacs Server. Or ...

> Yet another possibility: A special startup flag to stop emacs from
> launching dbus, perhaps by unsetting DISPLAY in its own environment
> during startup, then resetting it after all the code that might
> conceivably launch dbus has run. (This may not be practical.)

... we add a new command line option for Emacs "--no-dbus", which
prevents initialization in init_gsettings(), init_gconf() (both in
xsettings.c) as well as any action in dbusbind.c.

What do people think? Stefan, Chong?

> - Harald

Best regards, Michael.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#12112: 24.1.50; Starting emacs without dbus
  2012-08-01 13:46 bug#12112: 24.1.50; Starting emacs without dbus Harald Hanche-Olsen
  2012-08-07 14:17 ` Michael Albinus
@ 2012-08-24 13:08 ` Michael Albinus
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Albinus @ 2012-08-24 13:08 UTC (permalink / raw)
  To: Harald Hanche-Olsen; +Cc: 12112-done

Harald Hanche-Olsen <hanche@math.ntnu.no> writes:

> Yet another possibility: A special startup flag to stop emacs from
> launching dbus, perhaps by unsetting DISPLAY in its own environment
> during startup, then resetting it after all the code that might
> conceivably launch dbus has run. (This may not be practical.)

Finally, it is sufficient to set DBUS_SESSION_BUS_ADDRESS to a syntactic
correct, but invalid address. Call Emacs like

# env DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/foo emacs

I have documented this in the Emacs manual, node Emacs Invocation >
Environment > General Variables. I'm closing this bug.

> - Harald

Best regards, Michael.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-24 13:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-01 13:46 bug#12112: 24.1.50; Starting emacs without dbus Harald Hanche-Olsen
2012-08-07 14:17 ` Michael Albinus
2012-08-24 13:08 ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).