LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-18-2006, 05:30 PM   #1
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
X-Forwarding with ssh through routers


Hi all,

I am trying to get X-Forwarding working between my laptop and desktop. It works great when my laptop is on the same LAN with the desktop, but I am unable to get it working accross the WAN when both computers are behind different routers.

On the LAN I do this from the laptop:

laptop>xhost +desktop
laptop>ssh desktop
desktop>program --display=laptop:0.0

This works as expected. When I try this accross the WAN, substituting the external IPs for the internal ones, I get "Couldn't connect to X-server". I have also tried ssh'ing with the -X switch and get the same problem. When I manually set the DISPLAY variable to my laptop's router's IP I get no error message, but neither does the program launch on my laptop.

Any help would be appreciated.

Thanks,
Brian
 
Old 01-18-2006, 05:50 PM   #2
odevans
Member
 
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246

Rep: Reputation: 30
I could be wrong here, but I think when you use the method --display=laptop:0.0, it will not send the data over ssh, but over a high number port (for some reason I'm thinking it's in the 6000s somewhere), and is not encrypted.

See my post #10 in this thread for a quickie on getting X forwarding over ssh (port 22 by default and encrypted)
 
Old 01-18-2006, 07:23 PM   #3
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Yes you should not set DISPLAY or do xhost or anything like that. Just use "ssh -Y" and it forwards through the SSH connection and so should not be affected by routers, etc.
 
Old 01-19-2006, 10:04 AM   #4
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Original Poster
Rep: Reputation: Disabled
Thanks for the answers.

It seems that some programs are happy to be x-forwarded and others are not. The program that I primarily use remotely is Bluefish. It gives a BadWindow error and stops with the -X method both accross LAN and WAN (which is why I switched to the --display method). I've tried a couple other programs now (eg. Scribus) and they are happy with the -X method even though they produce a bunch of BadWindow errors as well (and are slow as the dickens over WAN).

Thanks again,
Brian
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH X forwarding krusty_lab AIX 10 01-02-2008 09:36 AM
SSH X forwarding djgerbavore Linux - Networking 1 11-17-2005 09:40 AM
X11 forwarding over SSH SirSlappy Linux - Networking 1 10-18-2005 01:37 PM
X forwarding via SSH bd1308 Linux - Software 4 08-30-2005 07:13 PM
ssh and X-forwarding Björneborg Linux - Networking 2 02-19-2004 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration