You are not logged in.

#1 2005-07-20 20:51:38

dekernel
Member
From: Vassar, MI USA
Registered: 2004-03-22
Posts: 117

Using X Remotel

I have is most likely a simple question, but it is something that I have never done so here goes.

What I want to do is run KMail on my machine at home from my machine here at work. My work machine is Windows, but I have Cygwin installed and running the X server (I can type 'X' from the shell and X appears to start).
My firewall at home is OpenBSD which currently allows port 22 and 80. Work does not have any ports closed so that shouldn't be a problem.

My guess is that first, I will need to change the hosts.allow file to allow incoming connections on port 6000 or something like that. The one real question is how do I tell the Cygwin X server to run KMail on the remote machine but put the display here.

Eventually I would like to add this to the Wiki because I am pretty sure that I am not the only person who wants to do this. If not, I guess am the only igut in the group!!!

Offline

#2 2005-07-20 20:54:45

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Using X Remotel

I'd be happy to know how to do this too.

I don't know much about it, but some keywords you might want to look for are X11 tunneling and ssh forwarding.

Dusty

Offline

#3 2005-07-20 21:42:01

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Using X Remotel

Ok, well, I set this up once... and it was a big pain.

First and foremost, you need an X server running.  There's like 3 or 4 options, but cygwin is the best.  I ran cygwin in it's "use Windows as the window manager" so what you run looks no different from a windows app.

Secondly, it's easiest to setup with putty.  You need to run sshd on the server with X11 forwarding (can't recall the setting) enabled, and in the putty settings, see Connection -> SSH -> X11 and check "Enable X11 Forwarding"

That's all the settings you need, but it took me some monkeying to fix.  When you connect with ssh you need to "echo $DISPLAY" and make sure it's defined... if not, you need to mess with it... display should be "localhost:0.0" or "localhost:0.10" if you modified none of cygwin's settings.

Offline

#4 2005-07-21 00:43:23

dekernel
Member
From: Vassar, MI USA
Registered: 2004-03-22
Posts: 117

Re: Using X Remotel

I think I might need to clarify. I don't really need to tunnel X through my ssh connection. I should apologize. I was just trying to tell that my connection at each end is flexible in that ports won't be blocked at either end.
Many apologies for that mistake.

What I am looking for is from the purists perspective of what ports are used, what entries in hosts.allow do I need and what confuses me the most is how to tell Cygwin's X server to run the app remotely.

Again sorry for the confusion.

Offline

#5 2005-07-21 01:21:43

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Using X Remotel

There are a few ways you can do it.

You can tunnel XDMCP, but that is messy.
You can use VNC or nomachine/freeNX.
You can use ssh X forwarding.

The last one is probably the easiest.

here we go..
on the server in /etc/ssh/sshd_config, set

X11Forwarding yes

then restart sshd

Then on the client, make sure you are allowing sshx forwarding.

$ ssh -XC user@host
$ appname

Then, simply ssh into your server..and start the app. The display should forward to your desktop, through the ssh tunnel.

Be warned though, sometimes it can be *painfully* slow, take a long time to start the gui, and so forth..

best of luck.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#6 2005-07-21 06:33:03

sudman1
Member
From: Huntingdon, UK
Registered: 2005-02-18
Posts: 143

Re: Using X Remotel

If you want to view what's on your phisical display at home from work, you should use x11vnc.  That would use port 5900 by default, but you could tunnel that through ssh, so that it comes to you through an already open firewall port.


v/r
Suds

Offline

#7 2005-07-21 13:11:28

dekernel
Member
From: Vassar, MI USA
Registered: 2004-03-22
Posts: 117

Re: Using X Remotel

Cactus and all, thanks for the help. Much appreciated.

Just to recap, here is what I did for the next person.
1) On the Linux box that was going to receive the connection I made the following changes to /etc/ssh/sshd_conf:

X11Forwarding yes

and made sure that /etc/hosts.allow had the following line:

sshd: ALL

The changes to /etc/hosts.allow were crude in that it should really contain just the desired address, but that is for later.

2) On my Windows machine that was going run the client, I started a bash session.

3) I started the Xserver on the Windows box.

xwin -multiwindow &

4) Set the enviroment variable DISPLAY to :0 in the Bash shell

export DISPLAY=:0

5) Connected to the Linux box from the Windows box.

ssh -XC 'machine name or IP' -l username

At this point, to run any application like KMail, I just ran

kmail &

from the ssh window an voila, it worked.

Offline

#8 2005-07-21 15:27:42

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Using X Remotel

dekernel wrote:

I think I might need to clarify. I don't really need to tunnel X through my ssh connection. I should apologize. I was just trying to tell that my connection at each end is flexible in that ports won't be blocked at either end.
Many apologies for that mistake.

What I am looking for is from the purists perspective of what ports are used, what entries in hosts.allow do I need and what confuses me the most is how to tell Cygwin's X server to run the app remotely.

Yes, but you *should* use ssh, as it's a secure, encrypted protocol - anything else is a *huge* security risk (as far as X forwarding is concerned).

Offline

#9 2005-07-21 23:50:42

cs25x
Member
Registered: 2004-05-04
Posts: 150

Re: Using X Remotel

you could use

ALL: LOCAL
ALL: 192.168.0.0/255.255.255.0

that should limit the connections to the local host and the local net, in this cse 192.168.0.0 Of the vnc clones on Arch, I liked tightvnc most of all, but x11vnc worked too.


--(*(cs25x--));

Offline

#10 2006-02-21 02:31:13

dekernel
Member
From: Vassar, MI USA
Registered: 2004-03-22
Posts: 117

Re: Using X Remotel

Not sure what happened but somewhere along the line, this has stopped working. I was able to connect and run apps like kmail and such but they have stopped working. Now all I get is the error "cannot connect to  X server".

Is anybody else having problems?

Offline

Board footer

Powered by FluxBB