Results 1 to 6 of 6

Thread: Sudo error "cannot connect to x server"

  1. #1
    aionly NNTP User

    Exclamation Sudo error "cannot connect to x server"

    Im getting frustated.. When I type sudo ............

    Then always get error "cannot connect to x server"
    I already 3 times reinstal open suse 11..
    But always have the same results... Please Help me...

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Sudo error "cannot connect to x server"

    Use kdesu instead if running under KDE.

  3. #3
    Yosuf Mossad Mohammed Vitriolus NNTP User

    Default Re: Sudo error "cannot connect to x server"

    > Use kdesu instead if running under KDE.

    couldn't we get some kde or suse development help on this...it SEEMS
    that lots of folks who come here from other places (like ubuntu) get
    into this trap....which ought to be solvable somehow...

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,532
    Blog Entries
    15

    Default Re: Sudo error "cannot connect to x server"

    Quote Originally Posted by Yosuf Mossad Mohammed Vitriolus
    > Use kdesu instead if running
    under KDE.

    couldn't we get some kde or suse development help on this...it SEEMS
    that lots of folks who come here from other places (like ubuntu) get
    into this trap....which ought to be solvable somehow...
    Hi
    Try xdg-su, for example
    Code:
    xdg-su -u root -c gconf-editor
    --
    Cheers Malcolm (Linux Counter #276890)
    openSUSE 11.1 x86 Kernel 2.6.27.7-9-default
    up 9:20, 2 users, load average: 1.10, 0.38, 0.13
    GPU GeForce 6600 TE/6200 TE - Driver Version: 180.22


  5. #5

    Default Re: Sudo error "cannot connect to x server"

    Yosuf it is solvable

    I think you have to add the user to sudoers to be able to use sudo, either in Yast's security page or by directly editing /etc/sudoers

    I have a user added to etc/sudoers like this:

    username ALL = (root) NOPASSWD: ALL

    Works for me


    If you're using Suse 11 though you will need to check for this entry in a file called kdesurc which will be in two locations

    The entry:

    [super-user-command]
    super-user-command=sudo

    The two locations where you will find your kdesurc files:

    /home/username/.kde/share/config

    /home/username/.kde4/share/config


    I had to do this in both files because I'm still on kde 3.5 which using a mixture of kde3 and kde4 packages, I'm not sure if it will still apply if you're using kde4, try it and see

  6. #6
    Yosuf Mossad Mohammed Vitriolus NNTP User

    Default Re: Sudo error "cannot connect to x server"

    yes, I understand how to 'solve it' and have no problem with it
    myself...you missed my point:

    maybe I do not understand, but i think some folks come to openSUSE
    with previous experience in Unix, AIX, BSD, Ubuntu and OTHERS...and,
    they have experience with how sudo works..

    but, they try here what worked elsewhere...and, get a
    non-descriptive, UNhelpful error message: "cannot connect to x server"

    which MIGHT be changed to (say):
    "in openSUSE, use 'kdesu' instead of 'sudo'"

    *or* maybe the binary /usr/bin/sudo could be rewritten to
    automatically test to see if the outcome would fail as above, and
    redirect the command to kdesu (or the gnome equal, if that was what
    was needed)..

    understand? openSUSE makers decided to NOT allow sudo to work the way
    it does other places--but, didn't make it EASY for the new to SUSE user.

    not even *one* line in "man sudo" or "info sudo"

Tags for this Thread

Posting Permissions

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