Exporting X-stuff (was: Re: oops..sorry for the blank msg earlier)
On Tue, Jul 04, 2000 at 10:59:04PM -0700, kmself@ix.netcom.com wrote:
> On Wed, Jul 05, 2000 at 12:18:40AM +0000, john smith wrote:
>
> Strongly suggest you learn to add paraphraphs and whitespace to your
> posts.
>
Aye! :-)
> > I have another lazy
> > question, I want to allow another client to connect to the x-Server.how do I
> > do this? i.e. to allow another user to use the x-server while logged in as
> > a different user. sounds confusing does'nt it?
>
> Question: which scenario matches your problem:
>
> 1. You want two users to be able to run on two seperate X Window
> sessions on the same system. Obviously not interacting with the
> system at the same time if both sessions are running on console,
> but not havin to bail out of a session to allow the other user
> access.
>
> 2. You want to be able to run GUI programs under a second UID on the
> same X Session that is already active by a first user.
>
> For 1:
>
> o Do a console login as the desired userid.
> o Launch an X session to an unused local display. Assuming your first
> session runs to :0, try:
>
> startx -- :1 1>.startx.log 2>&1 &
>
> For 2:
>
> The second user needs to know both the display ($DISPLAY), and have
> xauth access to it. Again assuming :0 is your active session:
>
> o User 2 runs: export DISPLAY=:0
> o User 1 queries xauth: "xauth list | grep :0"
> o User 2 adds this display to their xauth list. I'd suggest cut and
> paste through the X Windows clipboard:
>
> xauth add <xauth cookie for display :1>"
>
>
> For more information: man xauth.
I personally prefer sudo (apt-get install sudo), put yourself into
/etc/sudoers as:
your-user-name ALL=(ALL) ALL
That way you can launch _any_ program as root from an user X-session.
You could be more restrictive with your permissions if you don't need
more than a few commands as root.
Have fun!
Morten
--
Morten Liebach <morten@hotpost.dk> ; http://home1.stofanet.dk/liebach
"Our scientific power has outrun our spiritual power. We have guided
missiles and misguided men (Martin Luther King, Jr.)"
Reply to: