You are not logged in.

#1 2016-10-02 06:35:50

BigEars431
Member
Registered: 2015-09-23
Posts: 14

Running an X Application as ROOT: App will not connect to dconf/dbus

Hi,

I'm very new to arch.. been using Debian and Ubuntu based distros for over 3 years now, and I finally made the switch

I came across an issue, where everytime I launch gedit, nautilus or any app with reliance on dconf. I get the following error and my settings will not be saved once I close the app

$ sudo gedit

Returns:

(gedit:1721): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line 'dbus-launch --autolaunch=a991971893004f92aff0429e1450bdb0 --binary-syntax --close-stderr': Child process exited with code 1

(gedit:1721): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line 'dbus-launch --autolaunch=a991971893004f92aff0429e1450bdb0 --binary-syntax --close-stderr': Child process exited with code 1

$ su
$ Password:
$ gedit

Returns:

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

(gedit:1747): 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)

$ gksu gedit

Returns:

(gedit:1786): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line 'dbus-launch --autolaunch=a991971893004f92aff0429e1450bdb0 --binary-syntax --close-stderr': Child process exited with code 1

(gedit:1786): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line 'dbus-launch --autolaunch=a991971893004f92aff0429e1450bdb0 --binary-syntax --close-stderr': Child process exited with code 1

(gedit:1786): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line 'dbus-launch --autolaunch=a991971893004f92aff0429e1450bdb0 --binary-syntax --close-stderr': Child process exited with code 1

This is bothering me since I access the file system a lot to edit .conf files.

Hopefully this awesome community can find/formulate a solution

Thanks in advance smile

Last edited by BigEars431 (2016-10-02 06:38:42)

Offline

#2 2016-10-02 11:01:27

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,412
Website

Re: Running an X Application as ROOT: App will not connect to dconf/dbus

Try "gksudo"


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#3 2016-10-02 11:12:10

BigEars431
Member
Registered: 2015-09-23
Posts: 14

Re: Running an X Application as ROOT: App will not connect to dconf/dbus

$ gksudo gedit

(gedit:1372): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line 'dbus-launch --autolaunch=a991971893004f92aff0429e1450bdb0 --binary-syntax --close-stderr': Child process exited with code 1

(gedit:1372): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line 'dbus-launch --autolaunch=a991971893004f92aff0429e1450bdb0 --binary-syntax --close-stderr': Child process exited with code 1

Same error, and this is a fresh arch install sad

however using:

$ gksudo dbus-launch gedit

Returns:

# no error

So looks like that would be considered a temporary workaround, is there anyway to make that (dbus-launch) persistent for the root/sudo user?

Thanks in advance smile

Offline

#4 2016-10-02 22:16:38

escondida
Package Maintainer (PM)
Registered: 2008-04-03
Posts: 157

Re: Running an X Application as ROOT: App will not connect to dconf/dbus

Better yet, in this case, look into sudoedit. If sudo is invoked as sudoedit, it will run $EDITOR on a temporary file owned by your user, and then replace the original with the new one, thus preventing all kinds of fun privilege shenanigans with powerful editors...or the necessity to run graphical programs as root (-:

Offline

#5 2016-10-03 10:15:18

gamer01
Member
From: Bavaria - GER
Registered: 2011-06-02
Posts: 31

Re: Running an X Application as ROOT: App will not connect to dconf/dbus

i have the same issue with

deja-dup-preferences

(i cannot enable the automated backups as a resulting issue in the application)

No issues as non superuser and

gksudo dbus-launch deja-dup-preferences

also fixes the problem.

Offline

Board footer

Powered by FluxBB