17

Whenever I open any software through Terminal I get following errors and eventually the software opens

dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(gedit:3609): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(gedit:3609): dconf-WARNING **: failed to commit changes to dconf: The connection is closed
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)

What can be the possible issue?

Braiam
  • 35,380
  • 25
  • 108
  • 167
Pawan Chauhan
  • 181
  • 1
  • 1
  • 6

4 Answers4

9

I had the same problem, in my case I was running "sudo gedit" from a user account; therefore when it tried to save dconf changes it realized that the user was not root, and thus it raised those errors. I solved it by running gedit as a "root":

sudo -i

gedit &

where sudo -i will login into a user acount.

Archemar
  • 31,183
  • 18
  • 69
  • 104
XAVI
  • 166
  • 1
  • 1
6

This has got on my nerves for a long time. I finally solved it using gksudo -l <command>, which runs the command in a login shell - similarly to XAVI's answer but without the need to type in the command after sudo.

yosoy
  • 61
  • 1
  • 1
6

You may want to check if the following folders are owned by root:

~/.cache/dconf
~/.dbus

If they are, try deleting them. According to other sources I found, they should be owned by yourself, but if you have run graphical programs with sudo they might have been created by root instead. Deleting them is apparently safe, as they are automatically recreated as necessary, but maybe back them up first.

sp00n
  • 61
  • 1
  • 2
-2

So I had this problem also. I did not have the patience to work through the various tedious and/or ineffective solutions that I found on the interwebs. The following worked for me:

$ emacs foo.py 2>/dev/null &   # (assuming you have an Xserver running)

No, it's not elegant. But it works. I haven't run into any bona fide emacs stderr's for years (if ever) so how bad can this be? And you can stick in an 'alias' in your .bashrc file.

  • 1
    The problem with this is that it doesn't solve the problem :) In my case, nautilus is unable to save configuration changes (say, changing an option to show hidden files.) Doing what you suggest justs hides the error, but it doesn't solve the error. – luis.espinal Feb 07 '20 at 16:30
  • 1
    True. But your problem is likely permissions on the dir's that contain the config files. At some point I had to track this down and fix it. [This is on Ubuntu/Wndows.] – Alex Rudnicky Mar 26 '21 at 22:20