# "Can't open display" via rsh [solved]

## cyannick

Hello,

I have a problem with an old application that I need to install on a "new" computer. This old application needs to connect to another machine via rsh (not ssh because it is not installed over there !). Then it executes a binary on the server, which display a window graphic, supposedly on client side.

The original command is 

```
rsh -l pol02 HP48 'export DISPLAY=10.3.160.248:0 && . /users/profile_ope && . ~/.profile && binary_to_execute'
```

The problem is that I have a [strike]problem[/strike] error :

```
Error: Can't open display: 10.3.160.248:0
```

What I have tried so far :

Modification of command to include xauth :

```
xauth extract - $DISPLAY | rsh -l pol02 HP48 'xauth merge - && export DISPLAY=10.3.160.248:0 && . /users/profile_ope && . ~/.profile && binary_to_execute'
```

On client, use of xhost :

```
xhost +HP48
```

Configuration of /etc/hosts is ok on client.

Modification of xdm-config files. There are 3 files, and since I don't exactly which one is used (I don't have that much knowledge about Unix), I modified all 3. BTW, I run on xfce4, so these modifications may not even be taken into account, in which case please tell me so and where I need to modify xfce4 config.

```
DisplayManager*authorize:   false

#DisplayManager.requestPort: 0
```

With all those done, I'm still stuck with the same error on display  :Sad: 

Has anyone an idea to solve my problem please?

If you need further information, feel free to ask.

Note : The Unix commands are launched via a python script. In the original python script, there is a socket created to HP48 on a port number based on ppid to make the port number relatively random. The socket connection used to fail on the computer I'm working on (but works with computers configured years ago), so I made a python test script to see which port could connect to HP48. In result, only a limited number of ports could connect to HP48, and I tried from range 1 to 20000. I did not configure any firewall, and neither on HP48. Why are there so few ports I can connect to? For now, I modified the python script to connect to HP48 with a static port number.Last edited by cyannick on Tue Apr 21, 2009 8:13 am; edited 1 time in total

----------

## Hu

Modern Linux distributions configure the X server not to listen on TCP, because there is no good reason to listen on TCP anymore.  Any remote window display should be handled by ssh X forwarding.  You can enable the TCP listener by removing -nolisten tcp from the command line parameters used to start the X server.  However, I think you would be better served by getting ssh working properly.

----------

## cyannick

Thanks a lot for your answer, this solved my problem  :Smile: 

Since I use xfce4, the "-nolisten tcp" option was in /usr/bin/startxfce4.

And of course I would like to use ssh (though I'll need to have a look at how to), but since the system on the server machine is HP-UX which is not maintained anymore, it might be a bit complicated to do so  :Sad: 

----------

## Gamma746

 *cyannick wrote:*   

>  but since the system on the server machine is HP-UX which is not maintained anymore, it might be a bit complicated to do so 

 

If it helps, OpenSSH for HP-UX is still supported.  (See http://www.openssh.com/faq.html#1.3)

----------

