# Remotely connecting to the gentoo linux box from windows.

## slimbim

I saw someone or read somewhere that Cygwin/XFree86 can remotely connect to the linux box from windows and have the linux desktop in a window in Windows.

I tried it, but can't get it to work, or don't know how to do it.  I followed the documentation in Cygwin/XFree86 to install Cygwin/XFree86, and tried the remote connection using telnet, or XDMCP, but it says "unable to open display" when doing first command in how to connect via telnet, or XWin not found when trying through XDMCP.

What do I have to do to my linux box, (i just installed gentoo and kde, gnome, and enlightenment), and to my windows box to accomplish this?

Thank you!!

----------

## Chris W

In your telnet session you need to set the DISPLAY environment variable to the IP address of your Windows machine.   Assuming you use bash: 

```
export DISPLAY=aaa.bbb.ccc.ddd:0.0

xterm &
```

 should get you started.

----------

## nE0

 *Chris W wrote:*   

> In your telnet session you need to set the DISPLAY environment variable to the IP address of your Windows machine.   Assuming you use bash: 
> 
> ```
> export DISPLAY=aaa.bbb.ccc.ddd:0.0
> 
> ...

 

Remember: U need to have an X server running localy..

Or, use xdmcp, it's much more simple, and you don't need to connect via telnet first.

to turn on xdmcp:

edit /etc/X11/xdm/Xaccess and remove the "#" in the line that say's "*   everyone can connect"

edit /etc/X11/xdm/xdm-config and place "177" as the port number in the last line, where it say's "0"

restart xdm/kdm/gdm

Or, just goto init 5 (which does not make sence in a gentoo bax.)

run: netstat -a and look for the protocol *.x11 LISTEN

NOw you can connect to this machine with an local Xserver like exeed. I use Reflection X because I have the license, and I like the product.

When you connect, you will get your DM login screen on your windows desktop, and you can login, and run a perfect session.

Remember: U are running a seperate session. You are not taking over the desktop.

A fast machine with a lot of memory is recommended   :Wink: 

goodluck.

----------

## slimbim

 *Chris W wrote:*   

> In your telnet session you need to set the DISPLAY environment variable to the IP address of your Windows machine.   Assuming you use bash: 
> 
> ```
> export DISPLAY=aaa.bbb.ccc.ddd:0.0
> 
> ...

 

I do this in my linux box or my windows box??

 *nEO wrote:*   

> Remember:  U need to have an X server running localy..

 

so I need to start an X server first in my windows box, before connecting to my linux box?

You mentioned exeed, and reflection X.  These are clients I would need on my windows box?  Which ones do you recommend?  any free ones?  My linux machine is Celeron 850MHz, 256MB, 30G HDD.

thank you guys![/quote]

----------

## dripton

 *Quote:*   

> I saw someone or read somewhere that Cygwin/XFree86 can remotely connect to the linux box from windows and have the linux desktop in a window in Windows.
> 
> I tried it, but can't get it to work, or don't know how to do it. I followed the documentation in Cygwin/XFree86 to install Cygwin/XFree86, and tried the remote connection using telnet, or XDMCP, but it says "unable to open display" when doing first command in how to connect via telnet, or XWin not found when trying through XDMCP.
> 
> What do I have to do to my linux box, (i just installed gentoo and kde, gnome, and enlightenment), and to my windows box to accomplish this? 

 

Start up Cygwin+XFree86 on windowsbox.

Open an xterm

"xhost + linuxbox" to allow linuxbox to display stuff on your Windows box.

ssh linuxbox

export DISPLAY=windowsbox:0

xclock &

If you see the clock pop up on windowsbox, you're in.

Note that "xhost + linuxbox" is insecure, because anyone else on that box (or anyone successfully spoofing its IP) can start X programs on your display, use the X conduit to mess with your box, etc.  Just "xhost +" is even worse because it lets *anyone* do the same, regardless of IP.  So the next step, after you get the insecure setup working, is figuring out how to tunnel X over ssh.  (Trivial from Linux -- dunno if Cygwin-XFree86 supports it.)

----------

## slimbim

"xhost + linuxbox" is exactly what I type in Cygwin/XFree86?

I don't know much about anything, so I would really appreciate it if you could outline exactly what I need to type.  Also, since this is just within my LAN, within my room actually, so security is really not a big issue...just that the monitor that's hooked up to the linux box sucks, so I just want to use it from my windows box.

Thanks all for help!!

----------

## nE0

 *slimbim wrote:*   

>  *Chris W wrote:*   In your telnet session you need to set the DISPLAY environment variable to the IP address of your Windows machine.   Assuming you use bash: 
> 
> ```
> export DISPLAY=aaa.bbb.ccc.ddd:0.0
> 
> ...

 

I would recommend exceed. It's free (atleast I thought is was.) ReflectionX works great, but is it not free.

So on the windows machine you need to run a client. Which is a X server.

On the serverside (your linuxmachine) make the needed changes like I posted some posts before this one.

ADDON to the howto: If your running kdm, you are ok, just by efitting the 2 files I described above.

When you are running GNome, you need to enable XDMCP, within the Gnome Desktop Manager configurator.. (I'm not sure of the name.)

It resides in Programs > System > GDM Configurator (or something simular)

Select Expert, and then the tab, "XDMCP" Select "Enable XDMCP" and reboot the machine like gonme tells you to   :Confused:  

[img:cf1a1b9787]http://www.motor-forum.nl/forum/misc/5504[/img:cf1a1b9787]

----------

## blunted

[img:33efbeae06]http://creep.ca/ss.png[/img:33efbeae06]

[img:33efbeae06]http://creep.ca/ss1.png[/img:33efbeae06]

Send me a private message over msn messenger if you want help getting a similar setup.

It's cygwin/xfree in windows xp.

----------

## BlinkEye

is this serious? i don't know how cygwin manages remote connection - but are we talking about a telnet connection? please, use a ssh connection so your connection (and your transmitted password of course) is encrypted.

----------

## dyqik

Another reason to favour SSH over Telnet is that SSH can compress the traffic, making the response a bit quicker, and impacting on the network less.

Exceed is not free by the way, it costs about $500, according to their website.  Cygwin and Xorg work perfectly on windows anyway, so I recommend that.

The other option is to run a vnc server on the linux box and connect using that.  That will open a window containing your linux desktop and interact by rendering the linux desktop into the window on the windows box, rather than relying on the local xserver if you go with x network transparency.

----------

