Results 1 to 8 of 8

Thread: Cannot start gedit from a command line as root.

  1. #1

    Default 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
    Last edited by haughtonomous; 18-Oct-2013 at 22:36. Reason: spelling correction

  2. #2
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: Cannot start gedit from a command line as root.

    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

  3. #3
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    19,872
    Blog Entries
    1

    Default Re: 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.
    Use
    Code:
    xdg-su -c gedit
    or
    Code:
    gnomesu gedit

  4. #4

    Default Re: Cannot start gedit from a command line as root.

    Quote Originally Posted by deano_ferrari View Post
    Use
    Code:
    xdg-su -c gedit
    or
    Code:
    gnomesu gedit
    gnomesu does the trick. Does this mean that plain ol' su doesn't work in this distro?

  5. #5

    Default Re: Cannot start gedit from a command line as root.

    Quote Originally Posted by vazhavandan View Post
    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
    Tried that. No improvement, but thanks for the idea. It seems that using gnomesu instead of su works.

  6. #6
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,521

    Default Re: Cannot start gedit from a command line as root.

    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.

  7. #7
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    19,872
    Blog Entries
    1

    Default Re: Cannot start gedit from a command line as root.

    Quote Originally Posted by haughtonomous View Post
    It seems that using gnomesu instead of su works.
    Yes, 'gnomesu' or 'xdg-su -c' will both work.

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Cannot start gedit from a command line as root.

    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 ;-)

    --
    Cheers / Saludos,

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •