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

Re: X11 server connection



on Sat, Mar 22, 2003 at 05:08:25PM +0100, Ignacio Mas Ivars (nacho@imit.kth.se) wrote:
> Hi all:
> 
> 	I have just upgraded mu X-server to the unstable branch and switched to
> using the gnome packages of unstable, and now i am not able to give the
> root user permission to access the X server belonging to normal user.
> Before I had a link from '/root/.Xauthority' to my_user/.Xauthority and

Bad idea.

> I was able to run X clients as root displaying in my X server of the
> normal user... Now, with all the upgrade, I am not able to do it
> anymore... I have even tried using:
> 
> #export DISPLAY=localhost:0.0
> $xhost +localhost

Very bad idea.  This opens your X session to any user.  If you're using
a truly brain-dead configuration, this means any host which can see
yours on the network can read or write your X connection.  Debian's
default X configuration denies TCP/IP access, unless you've modified
this.  Which you shouldn't do.  XDMCP unfortuneatly requires this.
Strongly discouraged.

> without success... I see that the client tries to access the x server
> since ippl reports 'x11 connection attemp', but I am absolutely unable
> to get anything started as root to display in my screen... I have
> enabled tcp connections to the X server... and nothing... I am
> starting to be a bit lost... Anyone giving me a hint on how to run an
> X client as root and display in my user X server?

    $ sudo su -
    # export DISPLAY=:0
    # xauth merge ~/<user>/.Xauthority
    # xlogo

...should turn the trick.  That is: use xauth, and add the X authority
MIT-MAGIC-COOKIE for the user running the X session.  This is the right
way to to do it.

Peace.

-- 
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
   Geek for hire:  http://kmself.home.netcom.com/resume.html



Reply to: