9

I've got a Raspberry Pi connected to my TV, with no mouse or keyboard.

I'm sshing into it, starting X and then I want to launch VLC (or any other GUI program, for that matter). If I ssh -X, that will open the program in the computer I'm sshing from, not on the TV.

How can I launch a program and make it appear on the TV?

3
  • 4
    export DISPLAY=:0 ; vlc? Commented May 1, 2013 at 18:08
  • @JoachimIsaksson Can you please post your comment as an answer so that I can accept it? That's exactly what I wanted. Commented May 1, 2013 at 22:23
  • How to start a GUI software on a remote Linux PC via SSH and friends. Commented Dec 10, 2019 at 14:12

2 Answers 2

14

Slightly less typing than Joachim's (and actually slightly different behavior):

DISPLAY=:0 vlc

This doesn't actually set the DISPLAY variable to :0 for the whole shell session, only passes it to vlc.

So:

  • If you want to start other X programs in that session after VLC, Joachim's is better.

  • If you just want to run VLC ASAP, this is faster by 9 keypresses. :)

(I wanted to add this only as a comment, but I didn't have enough points for that, sorry.)

Sign up to request clarification or add additional context in comments.

Comments

6

The DISPLAY environment variable needs to have a value set to which display the program should be opened. If you set it to :0, it means the first local screen.

This should in other words open vlc on the first local screen;

export DISPLAY=:0 ; vlc

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.