Cannot start gedit from a command line as root.

Pretty new OpenSuse 12.3 Gnome 3 install. If I open a terminal, login as root (su) and then attempt start gedit, this is the response I get:

study:/etc # whoami
root
study:/etc # gedit

** (gedit:2220): WARNING **: Could not connect to session bus

and gedit does not start.

If I try to sudo, I get a different response, but still no editor opens:

study:/etc # sudo gedit
No protocol specified

** (gedit:2226): WARNING **: Could not open X display
Cannot open display:
Run ‘gedit --help’ to see a full list of available command line options.

Is this a bug? How do I fix it? I presume that as I haven’t had it in other distros it is a Suse config issue, not something more inherent in gedit.

I’ve tried switching from the default X-Term to another terminal shell. Same results.

If I start nautilus from the command line, it does start but I get the following output (which may be significant):

study:/etc # nautilus
Unable to initialize DBus connection: The connection is closedInitializing nautilus-open-terminal extension

(nautilus:2252): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
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.
GConf Error: No D-BUS daemon running

cannot connect to the session bus: The connection is closed (g-io-error-quark, 18)
cannot connect to the session bus: The connection is closed (g-io-error-quark, 18)
cannot connect to the session bus: The connection is closed (g-io-error-quark, 18)

(nautilus:2252): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
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.
GConf Error: No D-BUS daemon running

(nautilus:2252): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
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.
GConf Error: No D-BUS daemon running

(nautilus:2252): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
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.
GConf Error: No D-BUS daemon running

(nautilus:2252): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
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.
GConf Error: No D-BUS daemon running

(nautilus:2252): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
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.
GConf Error: No D-BUS daemon running

** (nautilus:2252): WARNING **: failed to commit changes to dconf: The connection is closed

** (nautilus:2252): WARNING **: failed to commit changes to dconf: The connection is closed
No DBus connection available

Is DBus something that is missing that I should have running?

TIA

haughtonomous wrote:
>
> Pretty new OpenSuse 12.3 Gnome 3 install. If I open a terminal, login as
> root (su) and then attempt start gedit, this is the response I get:
>
> study:/etc # whoami
> root
> study:/etc # gedit
>
> ** (gedit:2220): WARNING **: Could not connect to session bus
>
> and gedit does not start.
>
> If I try to sudo, I get a different response, but still no editor opens:
>
> study:/etc # sudo gedit
> No protocol specified
>
> ** (gedit:2226): WARNING **: Could not open X display
> Cannot open display:
> Run ‘gedit --help’ to see a full list of available command line options.
>
>
> Is this a bug? How do I fix it? I presume that as I haven’t had it in
> other distros it is a Suse config issue, not something more inherent in
> gedit.
>
> I’ve tried switching from the default X-Term to another terminal shell.
> Same results.
>
> If I start nautilus form the command line, it does start but I get the
> following output (which may be significant):
>
> study:/etc # nautilus
> Unable to initialize DBus connection: The connection is
> closedInitializing nautilus-open-terminal extension
>
> (nautilus:2252): GConf-WARNING **: Client failed to connect to the D-BUS
> daemon:
> 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.
> GConf Error: No D-BUS daemon running
>
> cannot connect to the session bus: The connection is closed
> (g-io-error-quark, 18)
> cannot connect to the session bus: The connection is closed
> (g-io-error-quark, 18)
> cannot connect to the session bus: The connection is closed
> (g-io-error-quark, 18)
>
> (nautilus:2252): GConf-WARNING **: Client failed to connect to the D-BUS
> daemon:
> 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.
> GConf Error: No D-BUS daemon running
>
>
> (nautilus:2252): GConf-WARNING **: Client failed to connect to the D-BUS
> daemon:
> 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.
> GConf Error: No D-BUS daemon running
>
>
> (nautilus:2252): GConf-WARNING **: Client failed to connect to the D-BUS
> daemon:
> 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.
> GConf Error: No D-BUS daemon running
>
>
> (nautilus:2252): GConf-WARNING **: Client failed to connect to the D-BUS
> daemon:
> 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.
> GConf Error: No D-BUS daemon running
>
>
> (nautilus:2252): GConf-WARNING **: Client failed to connect to the D-BUS
> daemon:
> 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.
> GConf Error: No D-BUS daemon running
>
>
> ** (nautilus:2252): WARNING **: failed to commit changes to dconf: The
> connection is closed
>
> ** (nautilus:2252): WARNING **: failed to commit changes to dconf: The
> connection is closed
> No DBus connection available
>
> Id DBus something that is missing that I should have running?
>
> TIA
>
>
start Actvities ==> system monitor ==> Processes tab ==> click on
gconfd-2 and click on “End process” and now try again


GNOME 3.6.2
openSUSE Release 12.3 (Dartmouth) 64-bit
Kernel Linux 3.7.10-1.16-desktop

Pretty new OpenSuse 12.3 Gnome 3 install. If I open a terminal, login as root (su) and then attempt start gedit, this is the response I get:

study:/etc # whoami
root
study:/etc # gedit

** (gedit:2220): WARNING **: Could not connect to session bus

and gedit does not start.

If I try to sudo, I get a different response, but still no editor opens:

study:/etc # sudo gedit
No protocol specified

** (gedit:2226): WARNING **: Could not open X display
Cannot open display:
Run ‘gedit --help’ to see a full list of available command line options.

Is this a bug? How do I fix it? I presume that as I haven’t had it in other distros it is a Suse config issue, not something more inherent in gedit.

Use

xdg-su -c gedit

or

gnomesu gedit

gnomesu does the trick. Does this mean that plain ol’ su doesn’t work in this distro?

Tried that. No improvement, but thanks for the idea. It seems that using gnomesu instead of su works.

No it means you can not start a GUI program as root with out using the gnomesu command. same in KDE and kdesu When you are a different user you have to setup a handshake with the GUI in order to run GUI programs.

Yes, ‘gnomesu’ or ‘xdg-su -c’ will both work.

On 2013-10-19 10:16, haughtonomous wrote:

> gnomesu does the trick. Does this mean that plain ol’ su doesn’t work in
> this distro?

Plain old “su” does not, but “su -” does :wink:


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)