Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

linux gedit: I always get "GConf Error: failed to contact configuration server ..."

Tags:

linux

gedit

How come I always get

"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: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)"

when I start 'gedit' from a shell from my superuser account?

like image 859
jldupont Avatar asked Sep 14 '09 13:09

jldupont


2 Answers

I've been using GUI apps as a logged-in user and as a secondary user for 15+ years on various UNIX machines. There's plenty of good reasons to do so (remote shell, testing of configuration files, running multiple sessions of programs that only allow one instance per user, etc).

There's a bug at launchpad that explains how to eliminate this message by setting the following environment variable.

export DBUS_SESSION_BUS_ADDRESS=""
like image 133
Kevin Wright Avatar answered Sep 19 '22 09:09

Kevin Wright


The technical answer is that gedit is a Gtk+/Gnome program, and expects to find a current gconf session for its configuration. But running it as a separate user who isn't logged in on the desktop, you don't find it. So it spits out a warning, telling you. The failure should be benign though, and the editor will still run.

The real answer is: don't do that. You don't want to be running GUI apps as anything but the logged-in user, in general. And you never want to be running any GUI app as root, ever.

like image 33
Andy Ross Avatar answered Sep 21 '22 09:09

Andy Ross