0
If I SSH into a Raspberry Pi or into a local VM running Ubuntu 18.04 LTS, then I can run:
user:~$ export DISPLAY=:0
user:~$ gedit
And this will open a graphical window on the OS with the text editor, gedit. However, if I SSH into an AWS EC2 instance running Ubuntu 18.04 LTS, and I run "export DISPLAY=:0" followed by "gedit", I get these errors:
No protocol specified
Unable to init server: Could not connect: Connection refused
(gedit:<proces id>): Gtk-WARNING **: <time stamp>: cannot open display: :0
Is there any way to find the display number, or any other way to launch a graphical application? Note that I do not want to forward a GUI window back to my terminal by passing for instance the -X flag.
Where do you want this gedit instance to display its window? – Kenster – 2019-10-02T12:29:57.000