# Emacs 24.2 , Gedit-2.30.4 and dbus issue



## Juh924 (Dec 25, 2012)

Hello everybody,

I've just finished compiling my new FreeBSD system yesterday (following FreeBSD 9 Stable) and I'm now starting installing again everything from ports.

Emacs 24.2,3 wasn't starting on X11 (Gedit was working correctly even though there were some warnings on the Terminal. After reading a post about this issue, I added to my .xinitrc file the following line:


```
exec ck-launch-session dbus-launch awesome
```

Emacs can now be launched as a user without any warnings.

However, trying to launch emacs as root make it crash with the following errors:


> (emacs:10024): GLib-GIO-CRITICAL **: g_dbus_connection_add_filter: assertion `G_IS_DBUS_CONNECTION (connection)' failed
> g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting



and Gedit crashes as well giving the following error (when started as root):


> GConf Error: 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: The connection is closed)
> g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
> Terminated



Is there a way to solve this problem? I've read somewhere that dbus could be disabled. However there are a lot of ports depending on dbus on my system.

Thank you very much,


----------



## cpm@ (Dec 25, 2012)

Please, install editors/emacs with this options disabled, and leave the other default:

```
DBUS=off: D-Bus IPC system
GCONF=off: GConf configuration backend
GSETTINGS=off: GSettings support
```


----------



## purgatori (Dec 28, 2012)

There shouldn't be any need to launch Emacs as root. If you need to edit a file with root permissions -- for example, hosts.allow, then:

C-x C-f /su::/etc/hosts.allow


----------

