Next Previous Contents

7. Remote control

An Andbox can be turned into a remote that works via WiFi, Bluetooth, or USB, to control a PC or other devices. Conversely, a PC can be used to remotely control your Andbox.

7.1 Web interface to android

There are several free-as-in-free-beer programs that provide a Web interface to Wi-Fi connected Andbox: AirDroid, 3CX DroidDesktop, RemoteDesktop, and many others. These programs let you access your device and manage files, SMS, multimedia, and more. Great programs, really: too bad they're not FOSS.

As of this writing, the only FOSS program that provides the same functionality (and much more) is Webkey, released under the GPL:

It lets you fully control your device via WiFi or 3/4G using a browser. Unfortunately, it requires root: but it's such an incredibly great program, you may want to root your device just to use it.

Enable Wi-Fi, start Webkey and take note of the https address. Open a browser on the Linux box and go the https address to be greeted by Webkey's login page. Click on ``Registration'', insert a username and password and click on ``Create new user''. Webkey will ask for your permission to allow the user to control the phone. Using the newly created credentials, you can now log in.

Now, put the Andbox down and navigate through available options. Everything you can do on the Andbox can be done in Webkey's page: it provides a terminal, file manager, screenshot, program control, and much more!

7.2 Android as a remote

Many commercial and/or free-as-in-free-beer applications exist; just search the web to find them. FOSS applications worth mentioning are:

They all work in a similar manner. First off, you install a ``server'' program on the Linux box, then use the Android application that talks to it. Let's see, for instance, how to install RemoteDroid.

Copy the server RemoteDroidServer.jar somewhere to your Linux box, then run it:

Linux:~$ java -jar RemoteDroidServer.jar

A window will pop up, showing some information and the IP address you can connect to. Activate WiFi on the Andbox (3G/4G/xG is not supported), launch RemoteDroid, and provide the IP address you were shown. There you are: slide your finger on the Android screen and see the arrow move on the Linux box.

7.3 X servers

If you're a geek, you know that you can run a program on a remote computer and display its graphical user interface on another computer. This useful feature is provided by the X server; most Linux distributions use X.Org.

At least two Android X server implementations are available:

I encountered a few issues using android-xserver, while XSDL gave me no problems. XSDL is pretty self-explanatory: when you first start it, it asks for your permission to download and install additional fonts. Then, it gives you instructions on how to start a window manager and an application on the remote Linux (or Unix) machine.

Start XSDL, then start Terminal IDE and run these commands:

terminal++@$ ssh user@remote.linux.machine
user@remote.linux.machine's password:
Linux:~$ export DISPLAY= # IP of Andbox
Linux:~$ marco & # window manager
Linux:~$ gimp

At this stage, you'll have the Gimp running on the remote machine and displaying its user interface on the Andbox. Now you can enjoy the awkward experience of using a graphical application without a physical mouse!

7.4 VNC client

Using a VNC client you can control a remote graphical session from your Andbox. Several VNC clients exist; a GPL'ed one is androidVNC,

also available from F-Droid.

You will also need a VNC server on the Linux remote machine. There are many VNC servers available; in the following example I'll use Tight VNC, GPL'ed,

The first command you must provide on the Linux box is tightvncpasswd, which lets you set an access password for VNC sessions (user name is not required). Once you've set your password, start the server:

Linux:~$ tightvncserver 

New 'X' desktop is linux-machine:1

Creating default startup script /home/guido/.vnc/xstartup
Starting applications specified in /home/guido/.vnc/xstartup
Log file is /home/guido/.vnc/geo:1.log

The server is started, most probably on TCP port 5901 (check the log file). A new file, $HOME/.vnc/xstartup, has been created: you're free to modify it to customize your VNC session.

Now, run androidVNC and provide the connection information. Colour depth will influence your connection speed; the fewer colours, the faster the connection. Again, enjoy the awkward world of mouse-less user interface!

Next Previous Contents