Post Reply

[HOWTO] Linux on Android (Remote)

19th July 2012, 05:01 AM   |  #1  
wd5gnr's Avatar
OP Senior Member
Houston
Thanks Meter: 116
 
444 posts
Join Date:Joined: Dec 2010
I was on vacation a few weeks ago and saw a commercial for a product that promised to give you a full desktop on an iPhone, iPad, or Android device. I was interested so I looked it up. Can't remember the name, but it was basically some remote access software along with a Linux box they provided with OpenOffice, Gimp, etc. on it. You paid a fair amount for a year of service and renewed every year.

I got to thinking... why can't I just do that myself? I have tried remoting into my main desktop before, but that stinks because I have giant dual displays, and fancy 3D desktop effects, and all that. But it made me think: why not set up a virtual Linux box and access it anywhere I have a network connection. You could do this with Windows too or a variety of other tweaks, but I'm going to give you the broad strokes for what you need and you can customize as you see fit.

Here's what the end result looks like:
Click image for larger version

Name:	ss.jpg
Views:	193
Size:	37.2 KB
ID:	1207705




You need a few things:
1) A computer that is always on that can run VirtualBox or other virtualization software.
2) A public IP address for that computer. I use dyndns but sadly they are now making it hard to sign up for free.
3) A copy of Linux (I use Kubuntu)
4) Some setup on your Android device

You can probably figure out from here but follow along anyway, for a few observations.

1) https://www.virtualbox.org/ - Install this on your computer

2) Like I mentioned, I use dyndns.org but if you don't have an account you may want to try someone else. If your router supports a service, use that. Otherwise look at http://www.no-ip.com/ and http://www.dnsdynamic.org/ and pick what you like. For a dd-wrt router, look under Setup and DDNS for a lot of options. Set it up so your always on computer has a name like mycomputer.dyndns.org or whatever you are using.

3. Create a new virtual machine in Virtual Box. I'm using Kubuntu 386 (http://www.kubuntu.org/). Download Regular Download .iso. I named my machine TabletBack - I set the Base memory to 1GB (I have a lot of RAM; you may want to change this) and set the video memory to 32MB. I created a new virtual hard drive of 20GB and mounted Kubuntu iso as the virtual CDROM. I also set the remote desktop port to 9999 (you can change this, and you may not use it but it doesn't hurt to set it; see later in this guide). All the other settings were the normal settings, except later I will add a shared folder (more on that later). Boot the machine and go through the Kubuntu install. When you are booted completely, install the Virtual Box extensions and shut down. Go back to configure and set a VirtualBox shared folder so that you can access your normal home directory as a shared folder inside the virtual machine. Remove all the fancy wallpapers, 3D, etc. In fact, I may switch down to lxde as a window manager, but have not yet.

4. Here's the tricky part. You need to make the virtual machine have a screen to match the size of your tablet. You might want to make the screen slightly smaller. With the VM shutdown you want to issue this command:

VBoxManage setextradata "TabletBack" "CustomVideoMode1" "1250x695x16"

Obviously use your own VM name and screen size. The size listed works nice for my Samsung Galaxy Tab 2 10.1.

5. Boot up the VM again (use the regular VirtualBox GUI). Then you need to select this resolution in your xorg.conf. You need an xorg.conf section like this:
SubSection "Display"
Viewport 0 0
Depth 16
Modes "1250x695"
EndSubSection

If there is a request, I will attach my entire xorg.conf.

6. Almost there. While you are in the VM, browse to http://www.teamviewer.com/en/index.aspx. You might not want to use TeamViewer, and you do have a few options. However, TeamViewer is not only pretty good, but you can also get to your remote machine via any Web browser which is pretty slick. Install TeamViewer on the VM. Also install TeamViewer on your tablet (obviously, the Android version).

7. Tell the VM OS to start TeamViewer automatically. If you use KDE, System Settings, Autostart will let you do that.

8. Ok... now, while the VM is up, start up TeamViewer and do all the the logins. You should be able to start Teamviewer on the Android and using your dynamic DNS name. If it all worked, you should connect and can use your remote machine. If not, you need to fix things until you can. You do not have to use this setup, however, see step 9. TeamViewer should punch a hole in your router assuming it supports uPNP. If you don't use uPNP on your router, you'll need to open the TeamViewer port yourself (5050, usually).

9. You can also use any RDP client (I like the 2X Client from the market) to connect to the RDP server on port 9999 of your dynamic DNS computer. Note: You will need to open your router for port 9999 if you expect to use this outside your local network. If your client needs a password you will need to run the following:
vboxmanage setproperty vrdeauthlibrary "VboxAuth"

10. One last thing. Shut down the VM now that it is all working. Set your main computer to launch the following script:
vboxheadless -startvm TabletBack

Or whatever name you gave it. You won't see anything but you'll be able to connect to the virtual computer.

11. Install all the stuff you want on your VM. OpenOffice, GIMP, whatever.


Wow. That turned out uglier than I thought. But you should get the idea. Ask questions and if there is demand I'll try to clean it up paying special attention to the areas people are having trouble wit
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools
Display Modes


Top Threads in Android Apps and Games by ThreadRank