Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Wednesday, August 24, 2022 at 18:36

This tutorial will explain how you can setup a basic remote desktop between Xubuntu (Xfce desktop) computer and Android phone using TigerVNC technology in a local area network. We will show that you can do this excellently without relying to software that is not free nor third-party service.

Subscribe to UbuntuBuzz Telegram Channel to get article updates.


Overview

Xubuntu computer            Wifi Router            Android phone 
192.168.1.80      <-->  192.168.1.1  <--> 192.168.1.81
(VNC server)             (router)          (VNC client)


Requirements

1. AVNC on Android phone (download on F-Droid).
2. Tiger VNC Server on Ubuntu computer.
3. A local network, both wifi and cable will work.


First Setup

1. On Ubuntu computer, install tigervnc server program.

$ sudo apt-get install tigervnc-standalone-server

 

(TigerVNC logo)

2. Setup VNC server password:

$ vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
A view-only password is not used

3. Edit Xfce desktop-specific text configuration for VNC server. Run this command and copy-paste the text lines into it.

$ nano ~/.vnc/xstartup
#!/bin/sh
# Start up the standard system desktop specific to Xfce or Xubuntu
# Source: https://bytexd.com
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
/usr/bin/startxfce4
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
x-window-manager &

4. Give executable permission to the configuration file:

$ chmod +x ~/.vnc/xstartup

5. Start VNC server:

$ vncserver -localhost no :1

5. Check if VNC server is running:

$ vncserver -list

TigerVNC server sessions:

X DISPLAY #    RFB PORT #    RFB UNIX PATH    PROCESS ID #    SERVER
1             5901                           3668            Xtigervnc

6. Check Xubuntu computer's IPv4 address by clicking network manager (at the top) > Connection Information > note the IPv4 address.

 

Second Setup

1. On Android phone, run AVNC. 

2. Create a new connection with details as the following then save:

  • Name: Remote PC
  • Host: 192.168.1.80
  • Port: 5901
  • Password: master

3. Tap the connection name "Remote PC"

4. Xubuntu desktop displayed on Android phone.


Note: long press a saved connection in order to Edit it.


The Result

Once established, you will see Xubuntu desktop on your Android phone's display. Top, double tap, long press and do any other finger gesture to control your Xubuntu computer remotely. Learn the gestures next section.

 (Screenshot of a phone display showing a full screen of Xubuntu desktop)

Controls

Tap = click.

Double tap = double click.

Long press = right-click.

Two-Fingers Tap = activate on-screen keyboard.

Pinch = zoom.

Back, Home = close remote desktop.

 

Stop Remote Desktop

On computer, run the command line:

$ vncserver -kill :1 

On phone, tap Home button.

That's all. 


Afterword 

To this point, you should be able to setup a very basic remote desktop with what you have at home, namely, Android phone and Xubuntu computer. As we said "basic", this tutorial does not covers further setups like resolution choices and encryption. We planned to publish more about that later. See you next time!


References

1. https://www.cyberciti.biz/faq/install-and-configure-tigervnc-server-on-ubuntu-18-04

2. https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-22-04

3. https://bytexd.com/how-to-install-configure-vnc-server-on-ubuntu



This article is licensed under CC BY-SA 3.0.