I am sorry if the title is wrong.
I have a raspberrypi3 that I am trying to view its windowing system with vncviewer from my laptop in a remote location.
I am able to ssh into it fine via an autossh service I setup at boot to connect to a mitm cloud instance of ubuntu. The ExecStart=
/usr/bin/autossh -M EphemPort1 -N -R EphemPort2:localhost:22 firstname.lastname@example.org -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -F /dev/null -i /home/pi/.ssh/MitmUserKey
So then from a laptop you can ssh yourself into the mitm instance , and then just
ssh pi@localhost -p EphemPort2 and you are instantly logged into the remote pi.
This works great, but I have never been able to figure out how to start a process on the remote raspberry pi and then have the windowing system forwarded to my laptop.
I have tried ssh from my laptop to the mitm with -AY I have run xset + on the laptop as well
The mitm /etc/ssh/sshd_config has:
The raspberry pi /etc/ssh/sshd_config has:
I have vncserver running on the pi , but then when I run "export DISPLAY=:0.0" and then vncviewer localhost:5901 via this ssh tunnel from my laptop into the mitm instance into then the raspberry pi it says: "vncviewer: CSession: connection error: connect: Connection refused (111)"
I then added "-geometry 800x600 -nolisten tcp -localhost" to the arguments of vncserver , from: here , then if you run "vncviewer localhost:5901" it appears to work fine, I can tell it runs and stays open , but it still never launches the windowing part of vncviewer on my laptop.
same for "export DISPLAY=:0.0" and then just running leafpad . leafpad will run , and stay open in the terminal , but it never opens the window on the remote laptop.
any ideas how to view gui applications remotely through a mitm ssh tunnel ?