Results 1 to 8 of 8

Thread: New from Ubuntu -- gksu error

  1. #1

    Default New from Ubuntu -- gksu error

    Hi,

    This is my first post on open-suse after changing over from Ubuntu which I have used since 8.04. I purchased a nice and new shiny SSD so I took that omen to start a new and get rid of Ubuntu which has been annoying me for a few generations now.

    If I am being honest I am on my 2nd install after I messed up my nvidia driver the evening I installed, but I digress.

    I installed O_S with KDE but after a week or two I was missing Gnome I decided to install Gnome 3 using Yast (which I do like alot!). However I am having certain issues that I am unsure how to fix. They are not major issues but they are annoying me none the less. When I run either sudo/kdesu I get the following error

    Code:
    odwyerda@linux-91x1:~> sudo gedit /etc/fstab 
    Cannot open display: 
    Run 'gedit --help' to see a full list of available command line options
    Code:
    linux-91x1:/home/odwyerda # gedit /etc/fstab
    
    ** (gedit:7535): WARNING **: Could not connect to session bus
    Code:
    odwyerda@linux-91x1:~> sudo kdesu kwrite /etc/fstab
    kdesu: cannot connect to X server
    I found this but to be honest I do not understand what it means and it is from Ubuntu so I am unsure... editor - Unable to run gedit as a different user - Ask Ubuntu

    I get around this by installing another editor such as "nano" and editing in there, but I would like to know what is wrong or if I did something wrong, is it a conflict between Gnome & KDE ? Should I remove KDE completly if I am not going to use it ?


    Thank you in advance for any advice or help

    Dave

  2. #2

    Default Re: New from Ubuntu -- gksu error

    Quote Originally Posted by not_just_an_username View Post
    If I am being honest I am on my 2nd install after I messed up my nvidia driver the evening I installed, but I digress.
    Let's discuss this on a different thread.

    Code:
    odwyerda@linux-91x1:~> sudo gedit /etc/fstab 
    Cannot open display: 
    Run 'gedit --help' to see a full list of available command line options
    On openSUSE sudo won't work with graphical applications because it doesn't pass over the display by default.
    See below for how you could run gedit as root.

    Code:
    linux-91x1:/home/odwyerda # gedit /etc/fstab
    
    ** (gedit:7535): WARNING **: Could not connect to session bus
    I guess you've used 'su' here. That doesn't work because of the same reasons.

    Code:
    odwyerda@linux-91x1:~> sudo kdesu kwrite /etc/fstab
    kdesu: cannot connect to X server
    "sudo kdesu" is not working either because of above reasons.
    kdesu is running the app as root anyway (and is designed to do that for graphical applications), so no need to use sudo there.
    Just use:
    Code:
     kdesu kwrite /etc/fstab
    But, as you are running GNOME, you shouldn't use 'kdesu'.
    Use 'gnomesu', that should work: (there's no 'gksu' on a default openSUSE install)
    Code:
    gnomesu gedit /etc/fstab

  3. #3

    Default Re: New from Ubuntu -- gksu error

    It seems I cannot edit my post I forgot some information upon review of my post.



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

  4. #4

    Default AW: New from Ubuntu -- gksu error

    Quote Originally Posted by not_just_an_username View Post
    I get around this by installing another editor such as "nano" and editing in there, but I would like to know what is wrong or if I did something wrong, is it a conflict between Gnome & KDE ? Should I remove KDE completly if I am not going to use it ?
    There's no need to remove KDE. There won't be any conflict.
    You can even run KDE applications in GNOME and vice versa.

    But if you're not gonna use it anyway, you can of course uninstall it...

  5. #5

    Default Re: New from Ubuntu -- gksu error

    Quote Originally Posted by wolfi323 View Post

    "sudo kdesu" is not working either because of above reasons.
    kdesu is running the app as root anyway (and is designed to do that for graphical applications), so no need to use sudo there.
    That made me face-palm it was so obvious, once I read that I thought of gnomesu.... which you say below.

    I will try and read up as to why Opensuse does not pass sudo through the display. I find that curious and interesting, learning a new system has lots of new terminal quirks.

    Thank you for the reply.

    As for my Nvidia driver, I do not have the problem now, however when I will get around to installing bumblebee I am sure it will go wrong somewhere, but that is not for here and now.


    Dave

  6. #6

    Default Re: New from Ubuntu -- gksu error

    Quote Originally Posted by not_just_an_username View Post
    That made me face-palm it was so obvious, once I read that I thought of gnomesu.... which you say below.

    I will try and read up as to why Opensuse does not pass sudo through the display. I find that curious and interesting, learning a new system has lots of new terminal quirks.
    Don't worry!
    There are differences between distributions which may not be obvious at first sight (especially regarding default settings for stuff like sudo).
    I don't know what the upstream default is for sudo; maybe Ubuntu has tweaked that a bit, or maybe openSUSE, or maybe both?

    Anyway, you CAN configure sudo to act like on Ubuntu.
    Have a look at:
    https://forums.opensuse.org/english/...-programs.html

    Yes, that is a long thread, but it does have a lot of insider informations...

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

    Default Re: New from Ubuntu -- gksu error

    not just an username wrote:
    >
    > Hi,
    >
    > This is my first post on open-suse after changing over from Ubuntu
    > which I have used since 8.04. I purchased a nice and new shiny SSD so I
    > took that omen to start a new and get rid of Ubuntu which has been
    > annoying me for a few generations now.
    >
    > If I am being honest I am on my 2nd install after I messed up my nvidia
    > driver the evening I installed, but I digress.
    >
    > I installed O_S with KDE but after a week or two I was missing Gnome I
    > decided to install Gnome 3 using Yast (which I do like alot!). However I
    > am having certain issues that I am unsure how to fix. They are not major
    > issues but they are annoying me none the less. When I run either
    > sudo/kdesu I get the following error
    >
    >
    > Code:
    > --------------------
    > odwyerda@linux-91x1:~> sudo gedit /etc/fstab
    > Cannot open display:
    > Run 'gedit --help' to see a full list of available command line options
    > --------------------
    >
    >
    >
    > Code:
    > --------------------
    > linux-91x1:/home/odwyerda # gedit /etc/fstab
    >
    > ** (gedit:7535): WARNING **: Could not connect to session bus
    > --------------------
    >
    >
    >
    > Code:
    > --------------------
    > odwyerda@linux-91x1:~> sudo kdesu kwrite /etc/fstab
    > kdesu: cannot connect to X server
    > --------------------
    >
    >
    > I found this but to be honest I do not understand what it means and it
    > is from Ubuntu so I am unsure... 'editor - Unable to run gedit as a
    > different user - Ask Ubuntu' (http://tinyurl.com/mbm36v9)
    >
    > I get around this by installing another editor such as "nano" and
    > editing in there, but I would like to know what is wrong or if I did
    > something wrong, is it a conflict between Gnome & KDE ? Should I remove
    > KDE completly if I am not going to use it ?
    >
    >
    > Thank you in advance for any advice or help
    >
    > Dave
    >
    >

    Since you installed KDE first and then GNOME there is high chance that
    you might be using KDM to login into GOME.Ensure that you have switched
    to GDM before removing KDE. If you can spare half a gig let KDE stay
    around. When 13.1 comes out do a fresh install with GNOME 3.8 which
    *supposedly* has GNOME *classic*.

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

  8. #8
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: New from Ubuntu -- gksu error

    On 08/07/2013 11:06 PM, not just an username wrote:
    > I will try and read up as to why Opensuse does not pass sudo through
    > the display.


    there are lots of differences between openSUSE (not Opensuse, not
    OpenSUSE, not openSuSE, etc) and Ubuntu....some of them are available
    for your enlightenment here:

    http://tinyurl.com/ubuntu-to-openSUSE

    http://tinyurl.com/Ubuntu-Differences

    --
    dd
    http://tinyurl.com/DD-Caveat
    http://tinyurl.com/DD-Complaints

Posting Permissions

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