Learn how operate a VNC server.
Let's learn how to operate VNC servers including starting, stopping and debugging them.
root@localhost mentioned on Termux.
Andronix has already copied the necessary command on your clipboard if you are on the VNC server page. Just paste it in Termux (in the Distro shell [root@localhost]) and execute it
If you're prompted to select a resolution, just press Enter to dynamically select the resolution.
That's it. Now install the RealVNC app (opens in a new tab) from the Google Play Store (or any other VNC client).
Now press the Add(+) button to add a VNC connection. Enter localhost:1 as the address and give it a name. Save the record.
Click the newly created VNC address
You might be warned that the connection is untrusted. Click OK to continue.
You will be prompted to enter a password. Enter the password you set while installing the distro step and click ** Continue**.
You will now be able to see the GUI of your Linux distribution.
You might notice the horrible picture quality. Don't worry, we'll fix that in the next step.
Press the i button on the top menu bar of the VNC app to open the settings.
You will see the settings of the VNC app. Scroll down to the Picture Quality section and select High.
Now, you will be able to see the GUI of your Linux distribution in high quality.
You can now use your Linux distribution as you would on a PC ✅.
It is necessary to stop the VNC server once you are done using your distro or exiting it. To stop the VNC server execute the following command in the distro shell-
Once you execute it, the terminal will ask you for a port number. Enter 1 as the port number and click enter.
To apply your desired resolution, please execute the following command-
Now, you just need to change the last line of this file to-
vncserver -name remote-desktop -geometry 1920x1080 :1
Since you've made changes to the file, let's save it by pressing
ctrl + x , then hit y and finally hit
To change resolution permanently execute the following command in the distro's shell-
Once you do this, replace the second line with-
LD_PRELOAD=/lib/aarch64-linux-gnu/libgcc_s.so.1 vncserver -localhost no -depth 24 -name remote-desktop -geometry 1920x1080 :$PORT
Once you are done, just press
Ctrl+X and then type
Y and then hit enter. Now when you'll do just choose the first
option i.e., Start vnc-server with autodetect/dynamic resolution.
If you are using bVNC then you do not need to make any changes. It will make it's required changes itself.
If you are using RealVNC Viewer, then connect to the VNC Server and then click on (i) button at the top. Change Picture Quality to High, or to your desired quality.
Continuing with the instructions, please make sure that both of your devices are sharing the same network. If you don't have access to Wi-Fi, you can start the hotspot from the device having the Linux installed and connect the other device to the hotspot. Once both the devices are under the same network, execute the following command inside the distro's shell-
Now edit the last line and change it to-
vncserver -name remote-desktop -geometry 1920x1080 -localhost no :1
vncserver -name remote-desktop -geometry 1920x1080 -localhost :1
Once you are done with this open a new Termux session (drag from the left to open the sidebar for more options) and type:
Now copy then WLAN IP address (eg. 192.168.xx.xx). Now use this IP Address on the other device with the port number as 1 (eg. 192.168.xx.xx:1 ).