Xmanager Forum

setenv DISPLAY doesn't work with a router...?

Last post: Wednesday, May 15, 2002 10:12 AM by Kay, 7 reply

 
Tuesday, May 14, 2002 8:18 PM

setenv DISPLAY doesn't work with a router...?

 
Hi,

I have a network at home. I use a router to connect all my computers together. The router connects to the internet using an ISDN link.

I need to use graphical tools on another computer that belongs to another local network. What I use to do is the following:

1. open an ssh connection to ComputerA
2. from ComputerA open a telnet session to ComputerB (ssh is not available on B + ComputerB is only reachable from A)
3. from the prompt I do: setenv DISPLAY ipaddress:0
4. use my graphic tools

This works ok if I am at work as the ipaddress I specify is the address of my machine (unique ip on the internet).

When I try the same from home it doesn't work because I have the router or, at least is what I think...

I have tried specifying the ip address of the router as "ipaddress" in step three with no luck.

Is there a solution to this?

(As a note, both ComputerA and B are unix systems. A running on Digital and B on Solaris)


Thank you very much.
Tuesday, May 14, 2002 10:36 PM - Kay

Re: setenv DISPLAY doesn't work with a router...?

 
There are two solutions to the situation.

1. After reaching at the Computer A via ssh, run "echo $DISPLAY" command. You can find out the display name used by ssh connection (e.g.: localhost:10.0). And then connect to the Computer B, run "setenv DISPLAY computerA:10.0" as the display name. Now, you can run an X applications in Computer B. Be sure that this is possible only when Computer B can reach at Computer A.

2. By configuring a port forwarding rule on the router at home, you can forward an incoming connection to the local home computer. For example, forward (router : TCP 6001 port) to (local PC : TCP 6000). And then you can "setenv DISPLAY router_ip:1.0" in order to connect to your local PC at home.

I suggest method 1. It is more secure and easy to use.
Tuesday, May 14, 2002 10:57 PM

Re: Re: setenv DISPLAY doesn't work with a router...?

 
Hi Kay,

I have done the following:

1. ssh to ComputerA
2. echo $DISPLAY
3. telnet ComputerB
4. setenv DISPLAY NameComputerA:10.0
5. my x application

and I get:
"connection to ... refused by server"
"Xssh: Invalid X11 authentication cookie!"
"Error: Can't open display ..."

I have not tried yet the second method... please advise if I have misunderstood your instructions.

Thanks
Tuesday, May 14, 2002 11:23 PM

Re: Re: Re: setenv DISPLAY doesn't work with a router...?

 
Though it seems a very basic requirement, my router can't be configured to forward packets as specified.

At the moment option 2 is a no-go...
Wednesday, May 15, 2002 12:22 AM - Kay

Re: Re: Re: setenv DISPLAY doesn't work with a router...?

 
Sorry for my mistake.

Please try to copy $HOME/.Xauthority file from Computer A to Computer B. It might not work in some ssh servers.

I think this is required for every login to Computer B. So, you need a clever method to copy the .Xauthority file and launching an xterm with a script. (Using rcp or other file transfer methods.)

For more information on extracting and merging .Xauthority file, you can see the man page of xauth command.
Wednesday, May 15, 2002 12:54 AM - Kay

A better solution

 
Using an ssh client program (e.g.: TeraTerm), you configure a port forwarding rule. And then you can run a graphic software in Computer B without copying an X authority cookie. For example:

1. Forward TCP 6050 of ssh server to TCP 6000 of ssh client. You can set it up at TeraTerm.
2. Connect to Computer A using TeraTerm and telnet to Computer B.
3. "setenv DISPLAY computerA:50"
4. Run an xterm or other X applications in Computer B.

I hope I don't make a mistake at this time.;)

Kay
Wednesday, May 15, 2002 3:10 AM

Re: A better solution

 
...so this actually means not using xmanager at all?
Wednesday, May 15, 2002 10:12 AM - Kay

Re: Re: A better solution

 
TeraTerm is a freeware software and works with Xmanager. TeraTerm is used to establish a secure connection and Xmanager is required to get a graphical X applications.