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

Re: how can other users use X?



On Tuesday 27 July 2004 22:25, John van Spaandonk wrote:
> On Tuesday 27 July 2004 18:06, James Vahn wrote:
> > rich wrote:
> > > I start my X session as one user, then from a terminal where I've
> > > su'ed to another (not root), I want to be able to use gvim, but
> > > it tells me it's not allowed to use the X server.
> > >
> > > How can I get this working?
> >
> > Try issuing this command:  export DISPLAY=:0
> > It is probably unset and gvim has no idea where X is.
>
> Mmm,
>
> root@Marius:~# xhost +root
> Xlib: connection to ":0.0" refused by server
> Xlib: No protocol specified
>
> xhost:  unable to open display ":0"
> root@Marius:~#
>
> Suggestions?

As the user who started the X session (NOT root!), issue the command:
$ xhost +local:

Then you *might* possibly, if the application/shell doesn't know about 
it, tell root what your X display is, with (for bash)
# export DISPLAY=":0.0"
(assuming a local X server)

Cheers

-A



Reply to: