Page 1 of 1

Launching a program through ssh [Solved]

Posted: Mon Mar 04, 2013 10:26 pm
by thepiman
Issue: Unable to launch applications through SSH on my windows machine.

Solution:
1. Configure SSH on your pi. Use raspi-config to enable.
2. Download and install xming and putty for your windows machine.
3. Config your router to port forward all traffic to your internal IP (ie 192.168.1.5)
4. Note your external IP address. use whats my ip (google search) if you cant find it.
5. Open Putty and enter the external Ip into "Hostname (or IP)" section
-Connection = "SSH"
-Name the saved session and press save.
6. Now click Catagory SSH>X11. "Click enable X11 forwarding"
7. Open Xming after the install completes.
8. In putty click catagory "session" and click load.
9. Login into your rpi.
10. Type

Code: Select all

ssh -X <hostname> <application name>
10.1 Example to launch dillo with hostname rpi = ssh -X rpi dillo
11. Enter your password and whalla the application launches.

Note the command must be -X not -x. As for the command itself I am not sure if this is the best way but its the one that works for me.

Thank you all for your help.

----------------------------------------------------------------------------------------------------------------------------------
Initial Question:
Hi all,

I have setup my pi and would like to launch iceweasel using ssh on my current machine. I connect to the pi using both putty or firessh. I then login as root and when i enter the command below:

Code: Select all

ssh -x raspberrypi iceweasel
I get the following error:

Code: Select all

error no display specified
I have checked etc/ssh/sshd_config and X11Forwarding is set to yes
I have tried export DISPLAY=localhost:0.0 but still no joy.

Any advice?

Re: Launching a program through ssh

Posted: Tue Mar 05, 2013 1:11 am
by SirLagz
Is your current machine a linux machine ?

If you're using putty, you need to activate X Forwarding in the settings.

If you're using a windows machine, you'll need an X server running for X Forwarding to work.

Re: Launching a program through ssh

Posted: Tue Mar 05, 2013 1:33 am
by jojopi
thepiman wrote:ssh -x raspberrypi iceweasel
That should be -X. -x is to disable X11 forwarding. Why are you logging in a root?

Re: Launching a program through ssh

Posted: Tue Mar 05, 2013 8:25 pm
by thepiman
Hi i am on windows.
I have changed the putty setting and the following error appears:

Code: Select all

Can't open display: localhost:12.0
Thanks for the previous replies.

Re: Launching a program through ssh

Posted: Tue Mar 05, 2013 9:24 pm
by DBryant
But your Windows system needs to be running an X server. You could install Cygwin/X, available at http://cygwin.com/, a Unix environment running within Windows, and make sure you install and run the X server that is available.

No doubt others will suggest other X-servers. Search the forums if necessary.

Re: Launching a program through ssh

Posted: Tue Mar 05, 2013 11:16 pm
by thepiman
Hey I got it going using xming.
cygwin just would not work for some reason. Thanks for pointing me in the right direction though!!!!



-Mark as solved