Find the answer to your Linux question:
Results 1 to 6 of 6
Hello, I use Sarge 3.1r1 and GNOME.i tried to "su -" and export DISPLAY variable as this: Code: prakash@sarge:~$ echo $DISPLAY :0.0 prakash@sarge:~$ su - Password: sarge:~# export DISPLAY=:0.0 sarge:~# ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! praka123's Avatar
    Join Date
    Jan 2006
    Location
    Kerala,India
    Posts
    35

    Post login as "su -" ,not able to open gui-apps


    Hello,
    I use Sarge 3.1r1 and GNOME.i tried to "su -" and export DISPLAY variable as this:
    Code:
    prakash@sarge:~$ echo $DISPLAY
    :0.0
    prakash@sarge:~$ su -
    Password:
    sarge:~# export  DISPLAY=:0.0
    sarge:~# gedit
    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified
    
    (gedit:10259): Gtk-WARNING **: cannot open display:
    sarge:~#
    what to do now.help appreciated

  2. #2
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Illinois, USA
    Posts
    111
    You might want to use sudo instead i.e.,
    Code:
    $ sudo gedit
    This works for me on ubuntu.

  3. #3
    Just Joined! praka123's Avatar
    Join Date
    Jan 2006
    Location
    Kerala,India
    Posts
    35

    Post

    Thank You.i know with sudo or su logins it works,so how do i add/export so that i can run gui-apps while looged in as "su -".

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    apt-get install sux
    Then use sux instead of su to change to root in an X console. Sux will take care of everything.
    Stand up and be counted as a Linux user!

  6. #5
    Just Joined! praka123's Avatar
    Join Date
    Jan 2006
    Location
    Kerala,India
    Posts
    35

    Post

    Thanks.I am already using sux.but plain curious whether we can achieve to open gui's from "su -".

  7. #6
    Just Joined!
    Join Date
    Mar 2006
    Posts
    1

    Use xhost

    You need to use xhost to tell the X server to allow connections from other users. You can get info on this by typing "man xhost". Typing "xhost +" will allow anybody to connect. You need to do this BEFORE typing "su -", i.e. in the context of the user that started the X session.

Posting Permissions

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