Re: "E233: cannot open display" when starting gvim on ubuntu 8.04 root shell



On Aug 30, 4:52 pm, TsanChung <tsanchung.w...@xxxxxxxxx> wrote:
"sudo gvim" is ok on a non-root shell.
$ sudo gvim /etc/fstab
[sudo] password for ts:

However, "E233: cannot open display" error appears when starting gvim
on ubuntu 8.04 root shell.
# gvim /etc/fstab
E233: cannot open display
Press ENTER or type command to continue
# kdesudo gvim /etc/fstab
kdesudo: cannot connect to X server

What does 'DISPLAY' say, before and after you run the sudo?

# echo $DISPLAY
# sudo echo $DISPLAY
.



Relevant Pages

  • How to use sudo and a graphical program?
    ... I guess I don't understand access permissions to my display. ... If I become root via "sudo su -", I cannot use gedit or gvim because ... If I start them as "sudo gedit somefile" it works, ...
    (Ubuntu)
  • Using setenv DISPLAY
    ... I could no longer use sudo to start ... gtk apps without "cannot open display error". ... $ sudo env | grep DISPLAY ... either setenv or export? ...
    (Debian-User)
  • Re: How to transfer X11 auth across sudo invocation
    ... I can display windows perfectly fine. ... administrative account, to compare the differences. ... tunnel via SSH to my user account and do "su - " then I get the same ... I have permission to sudo using "-", but when I do it without ...
    (comp.unix.aix)
  • Re: Cant get gksudo to work for non-root user
    ... If you are running X as "russell", the system will complain if you try to ... run an X app as another user (the other user does not "own" the X ... session on display:0, and is not authorised to connect to the X server ... "sudo -u dashboard echo foo", for example, ...
    (Ubuntu)
  • Running an Old Kernel Solved.
    ... The sudo file on the system that did not display the "last ... # they are no longer logged in in system logs. ...
    (freebsd-questions)