linux gedit: I always get “GConf Error: failed to contact configuration server …”

StackOverflow https://stackoverflow.com/questions/1421498

  •  07-07-2019
  •  | 
  •  

Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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=""

For some (RHEL, CentOS) you may need to install the dbus-x11 package ...

sudo yum install dbus-x11

Additional details here.

Setting and exporting DBUS_SESSION_BUS_ADDRESS to "" fixed the problem for me. I only had to do this once and the problem was permanently solved. However, if you have a problem with your umask setting, as I did, then the GUI applications you are trying to run may not be able to properly create the directories and files they need to function correctly.

I suggest creating (or, have created) a new user account solely for test purposes. Then you can see if you still have the problem when logged in to the new user account.

I ran into this issue myself on several different servers. It I tried all of the suggestions listed here: made sure ~/.dbus had proper ownership, service messagbus restart, etc.

I turns out that my ~/.dbus was mode 755 and the problem went away when I changed the mode to 700. I found this when comparing known working servers with servers showing this error.

I understand there are several different answers to this problem, as I have been trying to solve this for 3 days.

The one that worked for me was to

rm -r .gconf
rm -r .gconfd

in my home directory. Hope this helps somebody.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top