# X11 forwarding from Gentoo to Putty on windows

## Spanik

Never done this before, so be a bit patient please. I want to connect a windows pc to my Gentoo laptop and get an X11 application running in a window on windows.

First I installed Xming and PuTTy on the windows pc and followed the guide on http://www.geo.mtu.edu/geoschem/docs/putty_install.html

Next I logged in as root in the Gentoo:

- added sshd to rc default

- started sshd: it generated the keys

- made a user "remote" and gave it a password

- changed /etc/ssh/ssh_config with "ForwardX11 yes"

- changed /etc/sshd_config with "X11Forwarding yes"

- restarted sshd

For starters I gave both pc's a fixed IP and connected them with a cable. Neither pc was connected to anything else. They can ping each other (good start)

Next I started Xming then PuTTy and got the login prompt in the terminal. Login worked but the first time I got a message that there was no /home/remote. Created that one and this message went away when I loged in again.

But if I want to run an X11 application it doesn't work. Also "echo $DISPLAY" gives a blank line. And if I go to Xming it says there are no clients.

I obviously missing something simpel.

Another strange thing is that in the terminal I cannot even create a .txt file in the home directory of the user "remote". I tought that a user had r/w control over its ~/.

----------

## NeddySeagoon

Spanik,

 *Spanik wrote:*   

> I cannot even create a .txt file in the home directory of the user "remote". 

 

What are the permissions and owership on /home/remote?

```
drwxr-xr-x 243 roy     users        57344 Sep 18 19:21 roy
```

is the sort of thing you should have.

With no accoss to ~/ you won't get any files created there al all.

----------

## Spanik

Right! This is new stuff to me. I did created the directory while logged in as root so it is owned by root. Changed it and added the user to a couple of groups. Should be a step forward.

Now the X11 forwarding.

----------

## baaann

There are alternatives, you may want to look at

Xpra

or

X2Go

Both have the advantage of being able to suspend and resume sessions(at another pc if necessary), along with handling low bandwidth well

----------

## RazielFMX

 *baaann wrote:*   

> There are alternatives, you may want to look at
> 
> Xpra
> 
> or
> ...

 

I'm a huge fan of Moba-Xterm: http://mobaxterm.mobatek.net/

Where bandwidth and latency matter, you might want to consider running tigervnc server on your Gentoo machine and connecting to your desktop using tigervnc for Windows. Tigervnc performs fantastically for remote GUI access. For security, I would launch an SSH tunnel via PuTTy to your vnc server, then connect tigervnc on Windows to localhost:<the local port your chose>. If you want to go this route, let me know and I'll try to help you get it up and running.

----------

## Naib

 *RazielFMX wrote:*   

>  *baaann wrote:*   There are alternatives, you may want to look at
> 
> Xpra
> 
> or
> ...

 ++ moba-xterm is great

----------

## Spanik

I'll check out the alternatives. Moba-Xterm looks indeed useful and it looks as if it doesn't need anything installed remote side. That's a good thing. Can also do xdmcp, that's also handy to have around. Going to satrt with that. Thanks for the ideas.

EDIT: tried Moba-Xterm and it worked first time! Good stuff.

----------

