Mailinglist Archive: opensuse (3863 mails)

< Previous Next >
Re: [SLE] X gurus: Xlib:connection refused, invalid magic cookie
  • From: Alexandr Malusek <Alexandr.Malusek@xxxxxxxxxx>
  • Date: 18 Feb 2004 23:55:24 +0100
  • Message-id: <86znbg6lr7.fsf@xxxxxxxxxxxxxxxxx>
Örn Hansen <orn.hansen@xxxxxxxxxx> writes:

> onsdag 18 februari 2004 02:23 skrev Terje J. Hanssen:
> >
> > Command dialog:
> > ---------------
> > On hostA I log in to hostB and enter the following commands:
> >
> > hostB-> xhost hostC
> > hostB-> rlogin hostC
> >
> Now you are telling hostB, that it should allow connections FROM hostC.
>
> > hostC % setenv DISPLAY hostA:0
> > hostC % XclientApp
> >
> Have you done:
>
> hostA-> xhost hostC
>
> which is needed for the above.

No, this cannot work since clients from hostA are not authorized to
connect to the X server. What he needs to do is to copy the
MIT-MAGIC-COOKIE-1 generated by GDM on hostB (and stored in the
~/.Xauthority file there) to hostC.


> > hostB-> rlogin hostA
> > hostA % xhost hostC
> > which only resulted in the following error message:
> > unable to open display ""
>
> rlogin to another machine, does not give you control over that
> machines X server. Which is what you are attempting to do. To be
> able to do the above, you must be the owner, or user of that hosts X
> server.

If I understand the sentence right then it is not true. XDM sessions
work in a different way.

> That is, the one logged in to that machine, otherwise you
> cannot tell that X, to accept connections from anywhere. Only the
> user of that session, has that right.
>
> Given, that you are logged in on the workstation hostA, directly:
>
> hostA-> xhost hostB
> hostA-> rlogin hostB
> hostB-> export DISPLAY=hostA:0
> hostB-> xterm
>
> Will run an xterm on hostB, and show the window up on hostA.

Note that he runs XDM session on hostB from an X server on hostA. In
other words: he is NOT logged in on hostA.

--
A.M.

< Previous Next >
Follow Ups