I'm using Cygwin to control my RPi over ssh,
ssh [email protected]
however if I try to launch an application (using Geany as an example):
sudo geany
I get the response: Geany: Cannot open display. I'm not sure what's going on here, so I'd be very grateful to receive any tips!
More (hopefully useful) information
- If I run the command on the Pi, everything works as expected.
- If I launch Xwin server and run:
export DISPLAY=:0.0
ssh -Y [email protected]
sudo geany
the window is forwarded to my laptop just as expected. - Running a java executable over ssh (JavaFX application built with maven) also works as expected (the application is displayed).
Just to be sure - I would like the application window to open on the Pi, not the laptop I'm using to ssh into it.
Edit
Not all applications return the same error - for example BlueJ throws a Java exception:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
Scratch returns:
squeak: could not find any display driver
Chromium-browser:
[2260:2260:0616/200257.886341:ERROR:browser_main_loop.cc(495)] Failed to put Xlib into threaded mode.
2260:2260:0616/200257.899631:ERROR:browser_main_loop.cc(272)] Gtk: cannot open display:
sudo
? Do notexport DISPLAY
. It should be set automatically if you set it up correctly.export DISPLAY=:0.0
AFTER you've established an SSH connection with the RPi