Develop Desktop Applications
With dev environments, you can develop not only web applications but also applications with desktop graphical user interfaces (GUI). However, this comes with a few limitations:
How to access desktop windows running in a remote environment from your local machine?
This is possible with the help of Virtual Network Computing (VNC) or Remote Desktop Protocol (RDP). The idea is to install a VNC server in a dev environment, forward the server port to your
localhost
, and use a local VNC client to work with the dev environment's remote desktop.How to develop desktop apps for OSs other than Linux?
Dev environments are based on Linux, so you can fully develop desktop applications only for Linux. You can use dev environments to develop cross-platform applications, but testing and building for macOS and Windows still require the respective OSs.
To configure a VNC connection to a dev environment
On your local machine, install a VNC client. For example, VNC Viewer from RealVNC.
Install and run a VNC server in a dev environment. For example, X11VNC server:
In the IDE, open Terminal and run:
apt update && apt install x11vnc xvfb
In Terminal, run the VNC server:
x11vnc --create
The VNC server will run on port5900
.
Forward the VNC server port from the dev environment to your local machine:
In Terminal, click the
5900
port and select Forward Port.Specify the local port to forward the VNC server port to. For example,
5900
to5900
.
On your local machine, run the VNC client and connect to
localhost:{forwarded_port}
, e.g.,localhost:5900
. This will run the VNC terminal window.Use the VNC terminal window to build and run the UI application you develop in the dev environment.