How to start X program on local display?

9,505

Just run xeyes on the PI (check that you have env variable DISPLAY setup export DISPLAY=:0.0 or specify it directly

xeyes -display ':0.0'

Share:
9,505

Related videos on Youtube

hyperknot
Author by

hyperknot

I'm Zsolt Ero, a creative full-stack developer from Budapest, Hungary. I enjoy working with interactive maps and creating augmented reality apps. I'm the founder of MapHub (https://maphub.net/) and I'm also available for freelance work.

Updated on September 18, 2022

Comments

  • hyperknot
    hyperknot over 1 year

    I'm ssh-ing into a Raspberry Pi. I would like to start an X program remotely, on the Pi's display.

    I know you can export DISPLAY to have programs open up on your computer when you ssh-in. But I'm looking for the opposite.

    What I'd like to have is have a program open up on the Pi's own (HDMI connected) display, when I run a command from ssh.

    What I'm looking for is to have a program run on the Pi and display it on the Pi. Pretty much I'd like to just remote control the Pi, using my desktop's keyboard.

    I'm on Raspbian / Deb Wheezy.

    • terdon
      terdon about 10 years
      That should be the default behavior unless you are using the -X or -Y options to ssh in. Doesn't it work? Do you get an error?
    • hyperknot
      hyperknot about 10 years
      Yes, my error is like Error: Can't open display: (null) Failed creating new xdo instance. I'm just using normal ssh to log-in, not -X or -Y
    • ctrl-alt-delor
      ctrl-alt-delor over 8 years
      You need to set DISPLAY=:0 and to configure xauth.
  • hyperknot
    hyperknot about 10 years
    I guess this runs a program on my desktop and displays it on the Pi. What I'm looking for is to have a program run on the Pi and display it on the Pi. Pretty much I'd like to just remote control the Pi, using my desktop's keyboard.
  • X Tian
    X Tian about 10 years
    Arh sorry, misunderstood, when you said opposite. Just run xeyes on the PI (check that you have env variable DISPLAY setup export DISPLAY=:0.0