Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to use ssh to start applications remotely? I have a linux machine for a mediacenter and I want to be able to connect through ssh and start for example XBMC or Boxee on it and then use my iphone as a remote.

share|improve this question

closed as off-topic by womble, Ward, kasperd, Jenny D, Falcon Momot Aug 25 '15 at 17:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – womble, Ward, Jenny D, Falcon Momot
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 5 down vote accepted


$ DISPLAY=:0 /usr/bin/xbmc

(after you ssh into the machine of course)

share|improve this answer
so basicly by adding DISPLAY:0 in front of the command. Thanks man. – Stulli May 18 '09 at 17:29
Of course you could do this in one line too: ssh user@server "DISPLAY=:0 /user/bin/xmbc" – x3ja May 19 '09 at 14:04

I took a different slant on what the OP asked and now realise I might have gone in the wrong direction. Had written the full answer below before I realised this, and think some people might find this looking for the other interpretation.

The advice below is if you want to start the application remotely but view it locally (i.e. run on mediacenter, view on another PC).

You could use:

ssh -X user@server


The -X just means "use X11 Forwarding".

To get it all in one line you could just do:

ssh -X user@server "/user/bin/xmbc"

This will only work if the server (in this case your mediacenter) has the X11 forwarding option enabled (normally in /etc/ssh/sshd_config and the option is X11Forwarding yes - restart ssh after you change this - /etc/init.d/ssh restart)

Now, if you're really wanting ease of use, you could key share between the two computers and then make an icon on your desktop that ran the above command and you'd have passwordless access to it!

share|improve this answer
In some cases I've had to use the -Y option instead of the -X option when doing this... – David Z May 18 '09 at 21:19
This actually might come in handy. Thanks – Stulli May 19 '09 at 9:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.