[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Xlib: connection to ":0.0" refused by server



Hi,

On 12/20/05, Kent West <westk@acu.edu> wrote:
> Nikhil Prabhakar wrote:
>
> >Hi all,
> >When opening emacs from terminal as "su" I'm getting this error:
> >
> >debian:/home/nipra# emacs
> >Xlib: connection to ":0.0" refused by server
> >Xlib: No protocol specified
> >
> >emacs: Cannot connect to X server :0.0.
> >Check the DISPLAY environment variable or use `-d'.
> >Also use the `xhost' program to verify that it is set to permit
> >connections from your machine.
> >
> >
> The problem is that X is "owned" by your normal user, and when you "su",
> you no longer have "ownership" of X.
>
> Several ways around the problem. My personal fave is to use "sudo".
> Another popular recommendation is to use "sux", both of which handle the
> underlying issues of transferring host authentication.

Thanks. "sux" is working fine but while using "sudo" I get this error:

nipra@debian:~$ sudo emacs
Password:
nipra is not in the sudoers file.  This incident will be reported.

Regards
Nikhil Prabhakar



Reply to: