# Problem forwarding X over ssh

## curmudgeon

This has always worked with no problem on other distributions :(

I looked through several past threads and none of them helped. :(

I changed sshd_config to all X11Forwarding and restarted.

```
$ ssh 1.2.3.4

user@1.2.3.4's password:

Warning: No xauth data; using fake authentication data for X11 forwarding.

Last login: Sat Feb 21 00:00:00 2004 from 5.6.7.8

$ set

[...]

DISPLAY=localhost:10.0

[...]

$ /bin/anyXapp

_X11TransSocketOpen: socket() failed for tcp

_X11TransSocketOpenCOTSClient: Unable to open socket for tcp

_X11TransOpen: transport open failed for tcp/localhost:10

anyXapp: cannot connect to X server localhost:10.0

$ su -

Password:

# lsof | grep LISTEN

sshd      10000  root    3u  IPv4    5274426                 TCP *:ssh (LISTEN)

sshd      20000  user    9u  IPv4    5365481                 TCP localhost:6010 (LISTEN)
```

What have I missed?

----------

## ckdake

I always type 

```
$ssh -X me@somewhere
```

 and have had this work with no other configuration than allowing X11Forwarding in the sshd config.

----------

## curmudgeon

Already tried it. Exactly the same error message.

----------

## ckdake

check these out:

https://forums.gentoo.org/viewtopic.php?t=123737&highlight=x11transsocketopen

https://forums.gentoo.org/viewtopic.php?t=104982&highlight=x11transsocketopen

https://forums.gentoo.org/viewtopic.php?t=73595&highlight=x11transsocketopen

https://forums.gentoo.org/viewtopic.php?t=82464&highlight=x11transsocketopen

----------

## curmudgeon

A couple of ideas there I will have to test further (like recompiling xfree

without ipv6 support). Thanks.

----------

## curmudgeon

OK, I can make basic connections now (thank you, again), but I still have a problem

running KDE apps.

I get the following error message:

```

$ /usr/kde/3.2/bin/kdeapp

Can not create file /home/user/.DCOPserver_remotehost_inet/localhost_10: No such file or directory

DCOPServer self-test failed.

kdeinit: DCOPServer could not be started, aborting.
```

In addition, a window pops up with the title "DCOP communications Error"

with the message:

"There was an error setting up inter-process communications for KDE.

The message returned by the system was:

Could not read network connection list.

 /home/user/.DCOPserver_remotehost_inet/localhost_10

Please check that the 'dcopserver' program is running!"

When I close this, the application window displays, but it doesn't work correctly.

----------

## ckdake

perhaps this one will help this time:  https://forums.gentoo.org/viewtopic.php?t=8275&highlight=dcop+error

----------

## curmudgeon

Thanks, ckdake, but I saw that thread when looking for an answer (I do search for the

answers before posting a question - sometimes just not very well :) ).

I guess I forgot to mention (I typed that last post late at night) that the dcop server

did start normally during boot - and local users have no problem logging in or

running anything). It just doesn't seem to let me connect when I log in remotely.

```
$ ps auwx | grep dcop

user      1286  0.0  0.1 21708  652 ?        S    04:39   0:00 kdeinit: dcopserver --nosid

user     23945  0.0  0.1  1532  500 pty/s1   S    18:55   0:00 grep dcop
```

I have tried to find documentation for dcop, but it seems that none gets installed

as part of kde, and I haven't had any luck (yet) searching on the internet.

----------

## ckdake

Hmm. I'm just searching and digging around because I don't use kde at all and remote X much.  Does DCOP go through ssh or does perhaps it need another port?

Other than that I am pretty much out of ideas.

----------

## xiangzi

In case you're still wondering, this KDE problem appears to be a result of having set your DISPLAY to inet/localhost to work around the IPv6 problem.  Instead of doing that, you should either:

1. emerge xfree, making sure IPv6 USE flag is off

Or, if you had the IPv6 USE flag on (which apparently you did) and you also are running a kernel with IPv6 support compiled as a module (this is what I did -- kind of silly to have it turned on perhaps, but never mind):

2. modprobe ipv6

Not sure why the kernel doesn't seem to load it automatically when SSH tries to use it, but I added ipv6 to /etc/modules.autoload.d so it always gets picked up.  Then X forwarding and KDE apps worked great.

Thanks to those who posted information about the problem before; it was driving me seriously crazy!    :Very Happy: 

  --Jonathan

----------

