Ubuntu on TP

by ncinerate@precentral


Want to try Ubuntu out on your touchpad but you're scared because of the need for crazy partitions and metadoctor usage?

This isn't ideal (it's better to make a specific partition etc), but this will get ubuntu up and working in the EASIEST way in the next couple minutes without any meta-doctoring or linux-knowledge if you REALLY want to do it. Everything will run fast and you'll get a kick out of it. If you decide you want to REALLY utilize ubuntu to the -max- you can easily reverse this process and go through the -harder- steps to get things set up properly on a big partition (that goes beyond the scope of this guide though).

Do this, of course, AT YOUR OWN RISK. This should be -completely safe- but don't get mad if you manage to botch my instructions and need to use webOS doctor to fix your touchpad. Also, take heed of the small warning at the bottom of this section regarding "missing gigabytes of space" on the touchpad.

The way we're going to set this up is to run Ubuntu out of a -file-, rather than partitioning a drive etc. There are some downsides to this method (limited space being a big one), but for someone who wants to try out ubuntu on touchpad this is the easiest AND easiest-reversible way to do it.

By the time you're done performing these steps you'll be running Ubuntu with a graphical environment, libreoffice, and of course chrome. You'll also have room to install some other stuff if you want to experiment, it's nice. Follow each step EXACTLY!

So, first you need to download 3 programs from preware. At the moment, these programs are in the TESTING feeds, so you'll have to activate testing feeds in preware. You can find instructions on how to do that here:

http://www.webos-internals.org/wiki/Testing_Feeds

Now that your testing feed is installed, go into preware and install:

Xserver
Xterm
Xecutah

Now, open up Xecutah on your touchpad.

Xecutah will bring up a window that shows xserver and xterm. Tap on xserver first. That'll load a gray window. Minimize that window temporarily (either using the center home button or with a finger swipe), go back to the card running xecutah, and tap Xterm.

Now minimize xecutah again and go back to your Xserver window (the one that was previously gray). Now it'll be a terminal window showing you root on your touchpad. (you can also perform these steps in webos quick install by going to tools/LinuxCommandline, but in this case I want to get you familiar with xterm).

Now that you're at a terminal command-line, type each of the following lines, followed by hitting the enter key. Bear in mind, some of these actions take a good long time, so don't panic if things don't seem to be moving along - it takes awhile to set up a nearly 2 gigabyte file. Just use the command and set the touchpad aside while it does it's work.

Here are your commands:

cd /media/cryptofs

dd if=/dev/zero of=ubuntu.img bs=1024 count=1900000


If at this point the device hangs for more than 20 minutes without progressing - that isn't a problem (if your device finished properly simply skip this bolded step). Occasionally the device will seem like it didn't complete the dd if= step even though it actually did. If this happens to you, close the xterm window, start everything back up (executah/xserver/xterm). Now type:

cd /media/cryptofs


From here, continue with the following steps as usual. Type:

mkfs.ext3 -F -b 1024 ubuntu.img 1900000

mkdir /media/ext3fs


mount -o loop /media/cryptofs/ubuntu.img /media/ext3fs


What you've done here is create a file 1.9gigabytes in size (remember, touchpad cannot handle files over 2gb in size). This file has then been mounted and will be used as a virtual "harddrive" for ubuntu.

I'm not including instructions here on how to auto-mount this drive at boot-up. If you reboot your touchpad you will need to mount the drive again before you can load ubuntu (by using that last command above, the "mount -o loop /media/cryptofs/ubuntu.img /media/ext3fs" command, in a linux command line).

For a casual user, the system I've just lined out will work just fine, just remember to mount the drive before using ubuntu if you have rebooted. I leave it this way to make testing and eventual removal of ubuntu trivial.

So, if you've followed this guide EXACTLY, you now have a file created and mounted ready for ubuntu. Close your xterm/xserver/xecutah cards. Now go into preware and install ubuntu chroot. As it installs, it will automatically populate the file you created for it.

Finally, open back up xecutah. tap on xserver. Minimize xserver to a card and go back to xecutah, select xterm. Minimize xterm and go back to xecutah, select UBUNTU.

Minimize xecutah, go back to the XSERVER/XTERM window.

You're finally here - staring at ubuntu on a command line!!!!! Just a couple more things to do and we'll be set up. Type:

apt-get update

Hit enter and watch as your computer updates apt-get.

From here, you can do things one of two ways. There is a nifty script to help set everything up and does a nice job of installing a virtual keyboard, gestures, and other nifty stuff here:

Easy Autoconfiguration for Ubuntu

The only difficulty with this script is it puts you into linux as a user rather than root. This isn't a problem for casual users, but is immensely annoying to me.

If you choose -not- to use this script, you can get to a similar place fairly easily. You've already run apt-get update, so now, type these commands to install the needed programs:

apt-get install lxde

apt-get install synaptic


lxsession


Tada, you'll be inside lxde ready to go as a root user. If you followed this guide then you'll need to type lxsession every time you wish to return to the graphical environment. For example, if you reboot your touchpad you will have to open up executah, open xserver, xterm. Mount the ubuntu.img file as described above, then open ubuntu from executah, and finally type lxsession.

That sounds like a mouthful of steps, but it's actually quite simple and only takes a few seconds.

That should finish up all of your optimizing and you should have an awesome ubuntu box ready to go! Also, at this point you can download tweaks from preware and adjust or turn off the virtual keyboard. If you ran the script above or if you have a bluetooth keyboard you don't need the virtual keyboard as lxde will have an onboard one built in.

Now that you're in LXDE you can tap the little globe on the bottom-left and it'll pull up a full blown chrome window, ready for use. Do that now.

There's one problem with chrome, you need to get scroll working for your touchscreen. To do this, go to this website:

http://www.chromeextensions.org/appe...g/chrometouch/

Scroll down and install the -newest- version of chrometouch (it'll be right near the bottom). Once you've done that, you can easily scroll and utilize your touchscreen to navigate chrome. YAY!

Now that you're finished setting up chrome, you can set up anything else you'd like. Tap on the little arrow at the bottom left and it'll pull up a menu with various applications, preferences, etc. If you tap on preferences, you'll find the synaptic package manager. Load this up! Now you can search for packages. This makes it easy to find and install things like libreoffice, gimp, etc.

You're done! Enjoy Ubuntu!