Remote access to Linux from Android
In this post I'm going to explain how to to remotely access your Linux machine and use it from your Android device. For this we are using VNC (Virtual Network Computing). Let's see how to install a vnc server on your Linux and a vnc client on your Android.
1. Install and start Tightvnc Server. First you lets install Tightvnc Server in the computer. Do it from your package manager or, if you use Debian or some of its derived distros (Ubuntu, Mint, etcetera), open a terminal and type.
sudo apt-get install tightvncserver
Type your password, hit enter and wait for the program to finish the installation.
If you use openSUSE there's a One Click Install package.
To start the program for the first time type this (only the first line without the $ symbol)
$ vncserver -geometry 1200x800 -depth 16 -port 5901 You will require a password to access your desktops. Password: Warning: password truncated to the length of 8. Verify: Would you like to enter a view-only password (y/n)? n New 'X' desktop is R2D2:1 Creating default startup script /home/werner/.vnc/xstartup Starting applications specified in /home/werner/.vnc/xstartup Log file is /home/werner/.vnc/R2D2:1.log
As you can see, the program will ask you to set a user password, type a password using a maximum of 8 characters, reenter the password when asked. After this the program will ask for a read-only password, I didn't set one. Then the program will start.
Probably a this point yo have guessed the options passed to the program. -geometry 1200x1800 set the screen size, -dept 16 is the color-depth and -port 5901 is the port to use. That last number will be needed to configure the Android client.
2. Install and configure the VNC client on Android. In this case we are going to use bVNC (google play), it's a good open source VNC client for Android, I prefer Jump Desktop, but It's neither free nor open source. After you install the Android app open it:
The configuration is simple. First set a name for this profile so it's easier to identify the next time you use it, in this case I called it Linuxo. After that enter the IP of your PC, if you don't know this and both your android and your Linux are connected to the same access point, open a terminal and type.
$ ifconfig wlan0 Link encap:Ethernet HWaddr 88:77:66:55:4a:31 inet addr:192.168.1.13 Bcast:192.168.1.255 Mask:255.255.255.0
In this case I use my wireless card, identified by the name wlan0, my IP is 192.168.1.13, that number is after inet addr. After you enter your IP in Android, set the port to use, remember I set that to 5901. Next enter your password and that's all, go to the main bar of the app in your android and tap "Connect" you will see your Linux display in your android screen, just as shown at the top of this post.