Remote programming with SSH and X11 Forwarding
Remote programming with SSH and X11 Forwarding
Remote programming with SSH and X11 Forwarding
Sometimes the screen is not connected or too small to programming with Purebasic on the Raspberry
For this, the SSH server on the Raspberry must be activated.
Under Linux it is easy, because X11 is available. Under Windows and macOS, an X11 server must be installed first.
Login Linux:
Start Terminal
- $ ssh -Y pi@<IP or hostname>
Login macOS
Start Terminal
- $ ssh -X pi@<IP or hostname>
Login Window:
Start Xming Server
Start Putty
- Session:
* Hostname 'pi@raspberrypi'
- Connection -> SSH -> X11:
* Enable X11 forwarding
* X display location 'localhost:0'
After logging in to the Raspberry, you can start the X11 application via Terminal.
Example 1:
- $ geany &
Example 2:
- change path to ./purebasic/compilers
- $ ./purebasic &
Downloads Window:
Link Xming: https://sourceforge.net/projects/xming/ ... /6.9.0.31/
Link Xming fonts: https://sourceforge.net/projects/xming/ ... /7.7.0.10/
Link Putty: https://www.chiark.greenend.org.uk/~sgt ... atest.html
Downloads macOS
Link XQuartz: https://www.xquartz.org
Sometimes the screen is not connected or too small to programming with Purebasic on the Raspberry
For this, the SSH server on the Raspberry must be activated.
Under Linux it is easy, because X11 is available. Under Windows and macOS, an X11 server must be installed first.
Login Linux:
Start Terminal
- $ ssh -Y pi@<IP or hostname>
Login macOS
Start Terminal
- $ ssh -X pi@<IP or hostname>
Login Window:
Start Xming Server
Start Putty
- Session:
* Hostname 'pi@raspberrypi'
- Connection -> SSH -> X11:
* Enable X11 forwarding
* X display location 'localhost:0'
After logging in to the Raspberry, you can start the X11 application via Terminal.
Example 1:
- $ geany &
Example 2:
- change path to ./purebasic/compilers
- $ ./purebasic &
Downloads Window:
Link Xming: https://sourceforge.net/projects/xming/ ... /6.9.0.31/
Link Xming fonts: https://sourceforge.net/projects/xming/ ... /7.7.0.10/
Link Putty: https://www.chiark.greenend.org.uk/~sgt ... atest.html
Downloads macOS
Link XQuartz: https://www.xquartz.org
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Remote programming with SSH and X11 Forwarding
Thanks, that will be useful
Re: Remote programming with SSH and X11 Forwarding
@mk-soft thanks.
But...
On Raspbian VNC is pre-installed and easy to activate and use in combo the with VNC-viewer on the different OS's.
Also VNC gives you the active desktop of the Pi, so already active programs opened on the Pi can be remotely handled.
This I could not do with the setup using SSH and X11, a second desktop (new) is openend then.
But...
On Raspbian VNC is pre-installed and easy to activate and use in combo the with VNC-viewer on the different OS's.
Also VNC gives you the active desktop of the Pi, so already active programs opened on the Pi can be remotely handled.
This I could not do with the setup using SSH and X11, a second desktop (new) is openend then.
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.
Re: Remote programming with SSH and X11 Forwarding
Thanks mk-soft, that helps me with my laptop and Purebasic on Debian 11. On the Raspberry, I prefer also the preinstalled VNC
"Daddy, I'll run faster, then it is not so far..."
Re: Remote programming with SSH and X11 Forwarding
In general:
VNC 'hijack' a device.
XServer and Client allows to start a total different connection with different screen resolution.
VNC 'hijack' a device.
XServer and Client allows to start a total different connection with different screen resolution.
Re: Remote programming with SSH and X11 Forwarding
@infratec: good point!
I wanted to try this out, but I'm already failing with the ssh activation on the PI.
Which IP do I have to enter? The IP of the computer from which I want to connect the PI, right?
I wanted to try this out, but I'm already failing with the ssh activation on the PI.
Which IP do I have to enter? The IP of the computer from which I want to connect the PI, right?
"Daddy, I'll run faster, then it is not so far..."
Re: Remote programming with SSH and X11 Forwarding
To connect with ssh The IP address or hostname of the raspberry.
If the SSH server on the raspberry is not yet active:
If the SSH server on the raspberry is not yet active:
sudo raspi-config
- 3 Interface Options
- I2 SSH Enable / disenable ...
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Remote programming with SSH and X11 Forwarding
Thanks, it works great now. It also works much better than with VNC! Thank you very much!
"Daddy, I'll run faster, then it is not so far..."
Re: Remote programming with SSH and X11 Forwarding
Of course, not all the functions of the graphics output are available as directly on the raspberry. (OpenGL, etc).
The programme runs on the Raspberry and the GUI runs on the X11 server of the local machine.
Thus, the output of the GUI also looks different, depending on which X11 server is used.
The programme runs on the Raspberry and the GUI runs on the X11 server of the local machine.
Thus, the output of the GUI also looks different, depending on which X11 server is used.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Remote programming with SSH and X11 Forwarding
With SSH and X11, how do you prevent having already openend and running software on the Pi ?
As that setup creates a new desktop on which nothing is shown of running software.
What if making several new connections (after having closed the one before) and not closing active programs on the Pi ?
Ok, you can doe a reboot of the Pi, but that is not a nice way ...
As told VNC show the current active desktop, with SSH always a new clean one.
As that setup creates a new desktop on which nothing is shown of running software.
What if making several new connections (after having closed the one before) and not closing active programs on the Pi ?
Ok, you can doe a reboot of the Pi, but that is not a nice way ...
As told VNC show the current active desktop, with SSH always a new clean one.
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.
Re: Remote programming with SSH and X11 Forwarding
An ssh connection does not have a desktop. The started application runs the GUI output on the local computer in the X11 server. This means on the desktop of the local computer and not on the Raspberry.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
- NicTheQuick
- Addict
- Posts: 1227
- Joined: Sun Jun 22, 2003 7:43 pm
- Location: Germany, Saarbrücken
- Contact:
Re: Remote programming with SSH and X11 Forwarding
In the past I also had good experiences with XRDP to a normal Ubuntu VM. It can be used on Windows with the default Windows Remote Desktop application.
Of course you can also use it with a Raspberry. Here is just one of many links to that topic: https://linuxize.com/post/how-to-instal ... pberry-pi/
Usually you can change the desktop resolution and other things.
Of course you can also use it with a Raspberry. Here is just one of many links to that topic: https://linuxize.com/post/how-to-instal ... pberry-pi/
Usually you can change the desktop resolution and other things.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.