thepiman
Posts: 42
Joined: Mon Nov 19, 2012 5:06 pm

Launching a program through ssh [Solved]

Mon Mar 04, 2013 10:26 pm

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?
Last edited by thepiman on Tue Mar 05, 2013 11:47 pm, edited 2 times in total.
ThePiMan - "Oh Yeah"

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Launching a program through ssh

Tue Mar 05, 2013 1:11 am

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.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

User avatar
jojopi
Posts: 3268
Joined: Tue Oct 11, 2011 8:38 pm

Re: Launching a program through ssh

Tue Mar 05, 2013 1:33 am

thepiman wrote:ssh -x raspberrypi iceweasel
That should be -X. -x is to disable X11 forwarding. Why are you logging in a root?

thepiman
Posts: 42
Joined: Mon Nov 19, 2012 5:06 pm

Re: Launching a program through ssh

Tue Mar 05, 2013 8:25 pm

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.
ThePiMan - "Oh Yeah"

DBryant
Posts: 281
Joined: Sat Feb 02, 2013 12:41 pm
Location: Berkshire, UK

Re: Launching a program through ssh

Tue Mar 05, 2013 9:24 pm

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.

thepiman
Posts: 42
Joined: Mon Nov 19, 2012 5:06 pm

Re: Launching a program through ssh

Tue Mar 05, 2013 11:16 pm

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
ThePiMan - "Oh Yeah"

Return to “Troubleshooting”