gui-apps not opening, when i login as "su -"

Discussion in 'Open Source' started by praka123, Mar 9, 2006.

Thread Status:
Not open for further replies.
  1. praka123

    praka123 left this forum longback

    Joined:
    Sep 7, 2005
    Messages:
    7,513
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    -
    Hello All,
    I use Debian Sarge .i cant open any gui apps for eg;gedit as "su -"
    i tried exporting $DISPLAY value
    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:9926): Gtk-WARNING **: cannot open display:
    Code:
    prakash@sarge:~$ xhost +
    access control disabled, clients can connect from any host
    now if i try opening gedit it will open.so any help..
     
  2. eddie

    eddie El mooooo

    Joined:
    Jan 26, 2006
    Messages:
    1,414
    Likes Received:
    14
    Trophy Points:
    0
    Location:
    India
  3. OP
    OP
    praka123

    praka123 left this forum longback

    Joined:
    Sep 7, 2005
    Messages:
    7,513
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    -
    Nyways i already installed sux,which allows to run gui-apps when login as :
    Code:
    prakash@sarge:~$ sux -
    Password:
    sarge:~# gedit
    but where do those security things cant we modify for logon..i understand that acl is enabled in default for most distros..but they allow running progs as "su",what is wrong with "su -"..thanks all.
     
  4. GNUrag

    GNUrag FooBar Guy

    Joined:
    Jun 22, 2004
    Messages:
    1,246
    Likes Received:
    5
    Trophy Points:
    0
    Location:
    Interwebs
    Your X Server is not allowing another user to open Your dosplay.

    You need to disable X authentication.

    $ xhost +

    and then switch users;

    Directly giving su retains your original user's environment variables, and su - loads the new user's environment profile. Hence the disparity.
     
  5. OP
    OP
    praka123

    praka123 left this forum longback

    Joined:
    Sep 7, 2005
    Messages:
    7,513
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    -
    I dont want any compromise in security..so no "xhost +".for now happy with "sux -".i use this command as a shortcut in my gnome taskbar with "run in terminal ticked",so that if i click it show a passwd prompt and directly i can be root.this is for some purposes like
    Code:
    sarge:~# pon dsl-provider
    and many uses.i am accustomed this way.thanks to all.but no real answer came :?
     
  6. GNUrag

    GNUrag FooBar Guy

    Joined:
    Jun 22, 2004
    Messages:
    1,246
    Likes Received:
    5
    Trophy Points:
    0
    Location:
    Interwebs
    What was your problem?
     
  7. OP
    OP
    praka123

    praka123 left this forum longback

    Joined:
    Sep 7, 2005
    Messages:
    7,513
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    -
    not a problem. a doubt-how can we enable "su -" to open gedit or any such xapps.thats what i am trying from starting of thread :)
     
  8. GNUrag

    GNUrag FooBar Guy

    Joined:
    Jun 22, 2004
    Messages:
    1,246
    Likes Received:
    5
    Trophy Points:
    0
    Location:
    Interwebs
    $ gksu gedit
    $ gksudo gedit

    Use any of the two, ideally put then as command for new launchers.

    Does this solve your problem?
     
  9. mediator

    mediator New Member

    Joined:
    Mar 18, 2005
    Messages:
    2,491
    Likes Received:
    16
    Trophy Points:
    0
    Location:
    In ur Evil Mind!
    nice info!
     
Thread Status:
Not open for further replies.

Share This Page