ssh - X connection to localhost:10.0 broken


Forum: Networking
Topic: ssh - X connection to localhost:10.0 broken
started by: kluber

Posted by kluber on Nov. 15 2004,08:54
Hello,

I access a DSL 0.8.3 through a SSH session, but whenever I try to use MC or to launch a X application the response is
"X connection to localhost:10.0 broken (explicit kill or server shutdown)."

I tried this with users : root, dsl, and a new user
and have the same problem with all of them.

Looking for this message on other boards I found so many differents answers and tests to do that I feel it will take a too long time to do all this tests.

Does somebody have a short answer to this ?

Thanks,

Michel.

Posted by ico2 on Nov. 15 2004,16:44
this means you are trying to launch an X application, this would require an Xserver,  and tunnelling enabled. what are you using to connect to the dsl machine (ssh client and OS)
Posted by kluber on Nov. 15 2004,17:27
Yes, using a SSH connection to the DSL "server" I hope to display a slideshow on the DSL "server".

On DSL, it's ok to start the slideshow at boot time, but I try to restart the slideshow remotely after each (remote) update, so I need to launch a X application remotely.

The client is Putty running on Windows 2000 (yes !)

Thanks,

Michel.

Posted by kluber on Nov. 19 2004,10:06
As this question don't inspire anyone ... I search an found a solution (tested with DSL 0.8.3)

1°) Configure the SSH connection,
We have to do the SSH connection with same user as the one used to launch X11 on the DSL 'server'
-> user dsl

On DSL server, running a root shell, I have to change the dsl password.
$sudo su
$passwd dsl
-> new password for 'dsl'

add
/etc/init.d/ssh start to /opt/bootlocal.sh
(if you launch ssh start from shell, you will not be able to keep a X11 application on the screen after disconnecting)

add
/etc/passwd
/etc/shadow
to /home/dsl/filetool.lst

And backup this config using DSLxxx

2°) make a SSH connection to DSL with user 'dsl'

3°) Have the env variable DISPLAY designing the X11 launched on ssh server.
-> export DISPLAY=":0.0"
Then I can launch a X11 application from SSH session, and the X11 application is displayed on server.

But ... when I disconnect from ssh, the application is stopped

4°) Launch the X11 application with the '&' parameter to have that one running in background and stay on screen when leaving session

So ... to launch dillo on DSL 'server' from a SSH client logged in with 'dsl' user
$export DISPLAY=":0.0"
$dillo &

Then if you disconnect from session, Dillo stay on screen.


5°) to kill dillo when reconnecting, type in a bash script :
--------------
#!/bin/bash
pspid=`ps|grep dillo|cut -d" " -f3|sed -e 's/ //'`
echo "ID:$pspid"
if [ "$pspid" != "" ]; then
 kill $pspid
 echo "dillo killed"
else
 echo "dillo is not on screen"
fi
--------------

I can now display what I want on a remote PC with just DSL on a USB memory key.
I will used that config to display information for workers on some large screens inside our factory.

Posted by ico2 on Nov. 19 2004,11:26
have you tried Xwin32? it is an xserver that runs on windows. it will allow you to do what you need.
Posted by kluber on Nov. 19 2004,12:58
Xwin32, yes I use it.
It's a X11 terminal you can launch on Windows.

My problem was : I have a Windows, I have a remote DSL on which I want to display a picture : on the screen physicaly connected to the DSL PC.
(my motherlanguage is french, sorry)

Posted by ico2 on Nov. 20 2004,23:48
oh:

try typing set and seeing what comes up next to display.

Posted by ico2 on Nov. 20 2004,23:52
oh, stupid me, your post tells me this (pretty much).

try typing "set display localhost:0.0" or DISPLAY prehaps, i cannot remember

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.