As a follow-up to my most popular post ever, installing KUbuntu 10.04 32-bit on VirtualBox and Appcelerator’s Titanium Mobile Developer, I am going to do another version for Ubuntu 10.10 32-bit running on VMware workstation 7.1.3. the installation process is mostly the same on VirtualBox, you [...]
As a follow-up to my most popular post ever, installing KUbuntu 10.04 32-bit on VirtualBox and Appcelerator’s Titanium Mobile Developer, I am going to do another version for Ubuntu 10.10 32-bit running on VMware workstation 7.1.3. the installation process is mostly the same on VirtualBox, you will just have to follow a different method for setting up shared folders (you can use my previous post for that). Several things have changed in the last year and I haven’t done 10 minutes of development work, not to mention I am not even sure where the files for the 10.04 VM are! (update, I found them, but they failed to boot, might be the 600 freaking virtualbox updates since then!!) This has taken me 6 days to write up, I’m almost, but not quite done, AND it is close to 3000 words at this point, so I am going to post it in three four parts, so in any case let’s get started.
**anything in bold is either a heading or a command for you to type into a terminal window! (heading should also be underlined)
Part one – setting up Ubuntu 10.10 32-bit
(this is hoping you already have VMware workstation installed on your system, as I am not going to go through that process again! it was a nightmare and took weeks to get going on my current system. As background I am running Ubuntu (not KUbuntu like last time) 10.10 x64 as my host machine, and Ubuntu 10.10 32-bit as the guest. I am installing all of the development files on the VM, because the first time I tried setting Appcelerator’s Titanium on my host machine, I had to format and reinstall the OS, now I have learned the power of home virtualization and run almost everything through it instead of on my actual desktop. The most important thing I have learned is only assign 1 cpu core to any VM until you find it runs at 100% when you perform tasks within it, then increase the number of cores by 1, the second most important thing I have learned using virtual machines is to never install a 64-bit OS, things are just easier to do with a 32-bit OS. (currently the only computer in my house running windows is my work laptop and I’d change that if I didn’t think it would get me fired!)
- have a working operating system
- install VMware workstation
- download ubuntu 10.10 32-bit and use the automatically install VM guest tools options to simplify
- I recommend naming the vm something useful, like android-dev, or titanium-mobile
- then set the host name the same
- make the Virtual HDD at least 20GB (I made mine 38GB and we shall see if that is satisfactory over time…)
- after testing with the kitchen sink I have not seen the RAM usage go over 450MB, so let’s assign 768MB of ram at this time
- go ahead and set 1 CPU with 2 cores, as having the Android Emulator running will peg 1 core at 100% all the time
- follow-up by setting the account password the same as the VM name, so if you don’t use it for 6 months after setting it up, you’ll still be able to log in
- next you need to setup shared folders in the VM, this is where we will store all of your work (on the host machine, incase something happens to the vm, you can always just wipe it and build another without losing your dev files.
- use the VMware workstation pull-down menu VM –> settings
- go to the options tab
- click shared folders
- select enabled
- add
- you should put what ever location you save your downloads to here, so you can get files from your host, then open them in the VM, I named this one “downloads”
- add a second shared folder, this one is where you want to keep your development environment, in case you need to reinstall Titanium on another machine later, I named this one “projects”
- log into the new Ubuntu VM and let’s change some settings
- (you might not have to do this, but I did) go to the System pull-down menu –> preferences –> monitors and change the resolution to something more appealing than 800×600, make sure it is at least 1280×900 or you won’t be able to create a UVGA854 display android VM (even that might not be enough, but it is just enough for a WXVGA800 AVD)
- click make default, enter your password, then close all of those windows
- go to the Applications pull-down menu –> accessories –> terminal
- sudo apt-get update |sudo apt-get install dpkg dpkg-dev |sudo apt-get dselect-upgrade
- now, while that runs, let’s do some other things, go to the System pull-down menu –> preferences –> screen saver
- uncheck Activate screensaver when computer is idle and uncheck lock screen when screensaver is active
- click power management at the bottom and set display to never
- click make default, enter your password, then close all of those windows
- go to the system pull-down menu –> administration –> login screen and click “unlock” enter your password, and set it to log in automatically, then close all of those windows
- in the top right hand corner of the VM desktop click the power button (should be red) and select Restart to complete Update
- now open up your terminal again (if you closed it)
- sudo apt-get autoremove
- the bad news is that you have to reinstall VMware tools, because you now have a new kernel
- go to the VMware pull-down menu VM –> reinstall VMware tools
- click ok on the popup
- the CD should auto-mount and open in a new window
- if not go to the Ubuntu Guest pull-down menu Places –>Computer
- on the left column go to File System –> /mnt –> open the VMware guest additions
- double click on the tar.gz file
- right click the folder vmware-tools-distrib
- select extract to…
- Put it in your downloads folder
- when it finishes, close all of these windows and go back to your terminal window
- navigate in the terminal to the vmware tools folder cd~/Downloads/vmware-tools-distrib
- sudo ./vmware-install.pl
- type yes to over-write the current installation
- press enter 10 times (when prompted!) to select the default installation locations (you will notice the script builds the tools from the source, which is nice), when it finishes, move on to the next step
- sudo vi /etc/fstab
- [Ctrl+f] – this should move the cursor to the last line
- o – this should insert a blank line at the end of the file and begin editing mode, copy and paste the following section and edit to fit the names you used or an alternate location if you don’t like mine.
- [Esc]
- : wq!
- [enter] – this will (in order) exit edit mode, save and quit the vi editor
- mkdir ~/android – you have to have an existing directory or the mount will fail!
- go to the power button in the top left corner of the guest screen (notice that it is grey this time, not red as there is not an update restart required)
**note – it would appear that the vmware guest tools do not install and mount the shares before the mounting process for the OS (which makes sense if you think about it), this means every time you restart this VM you will have to type “s” twice to skip the failed mounting of these two bind mounts. an inconvenience, but remembering to type sudo mount -a is a lot easier than almost anything else you could do as an alternative, only because mount requires super user rights and during the login process you cannot respond to a prompt for your password.
- goto the VMware workstation pull-down menu VM –> Snapshot –>Take Snapshot
- change the snapshot name to: pre-java install
- put the description as: OS installed, configured, updated, restarted, VMware tools reinstalled for new kernel, restarted again. ready for Java SDK installation
- click ok to start the snapshot
/mnt/hgfs/downloads /home/sdk/Downloads none bind,rw,user,auto,exec 0 0
/mnt/hgfs/projects /home/sdk/android none bind,rw,user,auto,exec 0 0
Ok, this is the end of part one, here we have installed our Ubuntu 10.10 32-bit OS, updated it and created a snapshot so we have a quick easy back-out in case anything screws up during the java setup (this has happened to me more than once in the past!). Before continuing on, go to your home folder and make sure the 2 shared folders show up where you put them! else this next part might not be very pretty for you…
So, I’ve started with a clean OS install in a virtual box VM (see screen shot) and here is where I’ve gone from there (currently not working, waiting on some advice from the Titanium Developers forums)…

Titanium Kubuntu 10.04 Virtual Machine Settings
Before we get started I want to make sure you know that there are a lot of steps below and that not all of them are necessary, again this is just how I did it.
*********update 5-17-2010**********
(on doing this again on a new from scratch system I have learned that in the Java section, steps 10-31 may not be necessary at all. while this is a good thing to have setup on your system for future upgrades, it is not necessary UNLESS you have the open source java installed prior to installing java (or anytime after installing java. this is actually out of order in these steps, you would have to do steps 1-7 in the following section (installing gcj-4.4-base) BEFORE doing the Java section, else steps 10-31 will not work.)
First let’s finish setting up the Ubuntu installation and get out guest additions installed. (although I use KDE, all of this should work from gnome, or ice, or xfce, or whatever GUI window manager you have chosen.
- sudo apt-get update
- sudo apt-get install dpkg dpkg-devel
- sudo apt-get dselect-upgrade
- sudo apt-get install yakuake
- reboot
- sudo apt-get autoremove
- select “devices” from the VM window
- select “install Guest Additions”
- when the “devices recently plugged in” window appears, click on the VBox guest additions, and select browse with Dolphin. this will mount the CD in /media for you
- cd /media/VB[press the tab here for auto-completion, as the name changes for every version of VirtualBox]
- sudo ./VBoxLinuxAdditions-x86.run
- wait for it to finish, then reboot your system (simplest way, not only method)
Now you should be able to resize your screen by just resizing the VBox window, and your mouse should move between host and guest without exclusivity, you also should get better performance if your host is outdated or low end.
Let’s install java SE JDK!
- cd ~/Downloads
- mkdir android
- mkdir android/environment
- mkdir android/environment/system
- http://java.sun.com/javase/downloads/widget/jdk6.jsp (this is where you need to go to get the current Java SE JDK, I tried to find a direct url useable by wget, but they have it scripted so you need to use the web browser, save this file in /opt/java)
- cd /opt/java
- sudo chmod +x jdk*
- sudo ./jdk-6u20-linux-i586.bin (may need to change the name depending on the the version you downloaded, this will install/extract java into the /opt/java directory)
- sudo rm jdk-6u20-linux-i586.bin (since this is a vm, it is a good idea to clean up after yourself! the final virtual hdd is gonna be pretty big anyway)
- sudo ln -s /opt/java/jdk1.5.0_09 /usr/lib/jvm/java-sun
- sudo vi /etc/jvm (this file did not exist for me, do not know why you need to do this or if you can skip this step)
- “O“
- “/usr/lib/jvm/java-sun” (make sure to include the quotes, again I do not know why, but the Ubuntu Forum post I found said to do it this way)
- sudo cp /usr/lib/jvm/.java-gcj-jinfo /usr/lib/jvm/.java-sun-jinfo (this file does not exist on my system, if you have it do steps 14 – 17, if not skip them, as he did not give the details of the expected file contents)
- sudo vi /usr/lib/jvm/.java-sun.jinfo
- [esc] :%s/java-gcj/java-sun/g (make sure to get the colon as the first character if you are copy and pasting!! this line replaces all the gcj’s with sun, gcj is the GNU open source version of java, what we are doing here is replacing the references to it with references to the newly installed sun java so your system will use sun java instead of the GNU java)
- [esc] :wq!
- sudo apt-get install galternatives
- sudo ln -s /usr/lib/jvm/java-sun/ /etc/alternatives/java-sun
- galternatives (this will run the GUI version of alternatives so you can make edits on the files without using vi)
- select each of the following one by one and repeat steps 22 – 24 for each one. jar, jarsigner, java, javac, javadoc, javah, native2ascii, rmic, rmid, rmiregistry, serialver
- click ‘add’
- set path to /etc/alternatives/java-sun/bin/[name of what you are changing, ie jar, java, javah, javap...]
- set the priority to the “gcj priority”+1 (note it will not allow you to input numbers greater than 1000 in the GUI, those must be done manually, so just set them to 1000 at this time. it is recommended not to set them to manual, so see step 34 after completing all of these additions for how to make these the defaults.)
- sudo update-alternatives –force –install /etc/alternatives/javap javap /usr/lib/jvm/java-sun/bin/javap 1066 (javap did not exist for me so I had to enter this at the command line, it returned multiple errors; however when I reran galternatives, the new setting was there.)
- cd /var/lib/dpkg/alternatives
- sudo vi java (repeat this process, steps 27 – 29, for all the changes above that you were not able to set the priority over 1000 on)
- [esc] :%s/1044/944/ (replace the “1044″ with the number that your system has, this may be different for each file. for simplicity, set the “944″ to the number your system has – 100)
- [esc] :wq! (note, this is not necessarily the fastest nor most efficient way of using vi, nor is it the way I usually do it; however I use this method when I write this information out, because it will work regardless of the contents in your file that are/were not in mine AND because without actually seeing the file I cannot tell you “go to line # 5′ or ‘change the third word of the eighth line to “blah”‘. this method should prevent you from inadvertently changing something you should not, I hope…)
- java -version (this should display the version you just downloaded and installed, if not… go over the steps again and make sure you followed them all, else… well back to searching the inet for a solution, for you!
- javac -version (just in case check this one too!)
Right now that that is done, let’s move on to installing the dependencies for your development environment (again, may not be the only method, nor even the recommended one, but this is what I have done!)
- cd ~/Downloads/android/environment/system (this will keep your home folder from filling with source code and build files)
- sudo apt-get install debhelper gcj-4.4-base gcj-jdk m4 debiandoc-sgml python-docutils cdbs (these are the dependencies for step 3 and need to be installed first)
- sudo apt-get -b source gcc-defaults gcc++ python-defaults ruby-defaults
- sudo apt-get update
- sudo apt-get dselect-upgrade (check for any updates to the files you have just installed, always a good thing!)
- sudo apt-get autoremove (this removed 85.2MB for me)
- at this point I did a complete shutdown and created a snapshot in VirtualBox. current Virtual HDD file was 4.72GB before I took the snapshot. (in case I messed something up in the next part, as we have accomplished a good bit of work at this stage)
Now that all of your prerequisites have been installed, let’s install our development environment! (finally)
- go to http://developer.android.com/sdk/adding-components.html and download the android SDK to /opt
- using dolphin (or your favorite GUI folder browser) find this file and right click on it, select extract here
- cd android-sdk-linux_x86/tools
- sudo ./android
- goto settings first and check the box for “force https://”
- select available packages click the down arrow to the left of the web address shown.
- check the boxes for: SDK 1.6 API 4 R2 / SDK 2.1 API 7 R1 / Google API 1.6 / Google API 2.1 (this will let you code for Android 1.6 (more of these currently than any other OS version) and 2.1 devices (the newest available) and the google API’s will let you access the preinstalled google apps that come with android and their resources (google maps and voice command and such) I also recommend the samples and documentation files if you are new to coding for Android.
- click “install selected”
- click “accept all”
- click “install” (at this point it will begin installing, you can wait, or continue on to my next step while it does this, personally I let it run, and went to get something to eat!! make sure you check the details before closing, my 1.6 environment did not install with the error: finished with wrong size, expected 63422901 bytes received 4828132 bytes, this also caused the google APIs for 1.6 to fail and I had to re-attempt to install 1.6, everything worked the second time)
- cd ~
- vi .bashrc
- press the following “jjjO” (this will move you down 3 lines, insert a new line and allow you to start editing, then just copy and past the following 2 lines)
- export JAVA_HOME=/usr/lib/jvm/java-sun
- export PATH=$PATH:$JAVA_HOME:/opt/android-sdk/
- [esc] “wq!“
- cd ~/Downloads/android/environment/system
- sudo wget http://www.appcelerator.com/download-linux32 (this should get you the “Titanium Developer.tgz” file)
- use dolphin again to right click and “extract here”
- now you should have a “Titanium Developer-1.2.1″ directory
- cd /opt/titanium/runtime/linux/1.0.0 (need to fix some incompatibilities that I found on the Titanium Developers forum)
- sudo mkdir backup
- sudo mv libgobject-2.0.* backup/
- sudo mv libglib-2.0.* backup/
- sudo mv libgio-2.0.* backup/
- sudo mv libgthread-2.0.* backup/
- cd ~/Downloads/android/environment/system/Titanium\ Developer-1.2.1/
- ./Titanium\ Developer (I have tried both with and without sudo, but it throws an error instead of running. I have posted a question on the Titanium Developers forum and linked it to here, so hopefully someone can help me out.)
Now that 32-bit is working, I’ll give the x64 version another shot this weekend. Hope I did not upset too many people over at the forums with my first post! but neither google nor bing came up with that forum post while I was searching…
Due to the popularity of my Fedora 12 version of this how to, I have copied it here and made the necessary changes for (K)Ubuntu 10.04 Guests (I actually did this while making said changes so I know it works…) :)
step by step instructions for getting shared folders to work in a Kubuntu 10.04 VM on VirtualBox (post OS installation)
- open a console window (I am a huge fan of Yakuake)
- sudo apt-get update
- sudo apt-get dselect-upgrade
- sudo apt-get install gcc gcc+ linux-kernel-headers
- restart the VM to boot with the newest kernel
- sudo apt-get autoremove (this will remove the old kernel files and decrease your used space on the virtual drive)
- goto the Devices drop down menu for VirtualBox and select install Guest additions
- sudo mount /cdrom /media
- sudo /media/VBoxLinuxAdditions-x86.run
- You will need to reboot the VM to reinitialize the HAL daemon (or manually restart the daemon if you know how; however restarting will let (K)Ubuntu auto resize your display as well)
- (special note, if you have already run the VBox Additions from the cd and just need to update it, or it was not working, then skip steps 7-10 and just type this “sudo /etc/init.d/vboxadd setup“
- sudo mkdir /mnt/[name you want your shared folder to have in the VM]
- mount -t vboxsf [name you gave the share in VBox] /mnt/[name you used in step 12]
- then you can now access your shared host directory from your (K)Ubuntu 10.04 install in the /mnt/[name you used in step 12] folder!!!
Really not that hard, but nowhere in the documentation for VirtualBox does it tell you that you have to do all of that!
Bonus step!!
now I bet you want to know how to make it comeback after a reboot, don’t cha!
- sudo vi /etc/fstab
- “G” (uppercase letter)
- “o” (lowercase number)
- [name you used in VBox shared folders] [tab] [fullpath to the mount point in the VM, or #12 above] [tab] vboxsf [tab] noauto,rw [tab] 0 [tab] 0 (both of those are the number zero)
- [esc] (the escape key, probably is labeled “esc” on your keyboard in the top left corner)
- “wq!” (lowercase letters and an exclamation (sometimes called a “BANG” by unix people, older people, and those who were taught by one of the afore mentioned.))
- now reboot
- sudo mount [name you used in VBox shared folders] (you will have to do this everytime you reboot (I just do a save state, so not an issue very often) as the fstab loads the mounts BEFORE the VBox additions are run, causing a “not found” error if it is not setup this way)
Special note: the folder name from VirtualBox shared folders is normally the name of the last directory in the path, for example if you are sharing /home/[my username]/Downloads/mystuff – then your VBox shared name will be “mystuff”
Also, check out my post on getting this to work in Fedora 12!!
just want to get this started as I hope it will motivate me to finish it, since I have done a LOT of things on my computer since my last post, and obviously I have posted none of it.
So, I got a little impatient about not having my PC functioning, so I I installed Fedora 12 x64 on the rest of my FreeBSD boot drive and I have about 80% of the things on my list done and working. I’ll reference them by numbers here, and you can go read what they were by clicking on “my list” above. I am still hoping to get FreeBSD as my host OS; however everything is working right now with Fedora (except that stupid wireless NIC), although I am still having my “system reached critical temp” error from ACPI, yet the system resource monitor I have running shows a nice pleasant 30C CONSTANT temp. maybe this summer I’ll pickup a liquid CPU cooler… I already have 5 exhaust fans and 2 intake fans, 2 x 240mm exhaust and a 160mm or 180mm intake, I think I have air flow covered. (talked to a friend who is more into the details of technical issues, a network engineer, and he says that an inactive CPU, like when the system shutsdown, can drop 40F in about 7-10 seconds so it might be why I cannot catch it reporting a high temp in the BIOS) The BIOS does not report any temps reaching above 45C ever, so I have no idea why this is happening, I do run widgets reporting the internal temp, but have never seen it change!!!) . most of the time when it shuts there is/has been high CPU/disk IO usage (all 4 cores over 60% sustained, multiple long term large/multiple file movements across drives and/or multiple VMs running). So it could be valid.
I have come up with a couple of things to try to resolve this issue (going with the cheapest first, even if it is not really going to help a CPU issue, it can’t hurt…)
- I could just upgrade some hardware and see if a different BIOS/MB manufacturer makes a difference. I would love a lower watt CPU (or 6 core!), more L2/L3 cache, and USB 3.0 and SATA 6GB/s, since my current system bottleneck is the SATA 3GB/s HDDs.
- Switch to liquid cooling and installing a new thermal sensor with an external readout.
- buy cute little 5cfm coolling fans to place on my NorthBridge, SouthBridge, and onboard GPU passive cooling fins (cheapest option, not necessarily attacking the actual issue though)
- purchase a pretty new Video card and disable the onboard video (the chip is within an inch or two from the CPU, so there maybe some issue with residual heat from the GPU causing my overheating).
in order from cheapest to most expensive would be 3, 2, 4/1 (really close and might be a tie or within a $20-$30)
My List of things to get working, except this one is for Fedora.
1. VirtualBox is installed, working and I have multiple VMs up and running.
2. Install VMWare Workstation, I have downloaded the newest trial version and it is good for another 3 weeks, but have not gotten around to installing it.
3. Mounting my NTFS drives, all mounted, where I want them, even went through and deleted the Windows OS system folders from all but one.
4. SSH connections, I have started this and was working on it when I decided to start this post, should be done tomorrow.
5. I am posting this from Google Chrome on my Fedora 12 installation right now, so I’d say installed and working. Java shows up in the plugins, although java.com cannot detect it in my browser.
6. Hulu works great in Firefox or Google Chrome, although is a bit spotty when I have VMs running, and the playback is laggy in Chrome… So I am trying to get the Hulu Desktop app running. will make a post after I get some work done on it and let you know how it goes.
7. So far everything is working great, going to try a couple of VM’ed games next week after I get the rest of this done.
8. Firefox is up, running, and is playing hulu; however it does not report Java as installed from the about:plugins page, even though it is and I followed all the steps to link the correct files to the correct places. I believe this is the Firefox 3.6 doesn’t support Java issue though and not an issue on my part.
9. access NTFS drives remotely via ssh and a chrooted account with links to the mounts. After I get my SSH working tomorrow I should be able to test this. I was reading something online I no longer have open and may not have bookmarked that said that I can double mount drives (mount a drive to more than one, specifically 2, locations)
10. convert my NTFS drives to a more suitable linux FS, this again is a last thing item, to be done after everything else is working.
11. convert my drives from MBR to GPT, most likely to be done at the same time as the FS change.
12. GUI package manager for KDE, done, comes with Fedora.
13. eliminate all traces of Gnome from my computer… again, have to be last thing, once all is up and working.
14. build my first kernel, normally done immediately after install, I’ll do it last after EVERYTHING else (including the other things I said I would do last)
15. Wine is installed and works. will try out some things that I have installed in VMs to see about dropping those VMs
16. install older apps, again part of a couple of other items, I will of course be installing older apps on older OS installation I have, and will try them in Wine as stated.
17. X.org port forwarding to Cygwin on a windows machine (laptop) something I might do in a week or two…
18. start regular backups… I’m getting there, I have the drive formated in ext3, I just have not started backing things up.
19. Java, I think it works in Chrome, I was able to see the animated maps on the NOAA website, which most people use to test their Java. not working in Firefox 3.5.9.2
20. Flash, Hulu is working in Firefox and Chrome, so all good here.
21. Yakuake is fully functional and working.
22. Picasa 3.6 (I think) is installed and working great, except I don’t seem to be able to find the facial recognician system.
23. No idea on this one, can not find where I posted what it was, only that it was completed on BSD.
Unfinished items for Fedora: 2, 4, 9, 10, 11, 19?
apparently Open Office will not load, for an unknown reason, looking into it at this time.
Twitter: finndo77
- New blog post... Diablo III closed Beta http://t.co/dKC2ChWm 01:36:32 PM December 07, 2011 from joelperryproductions.com ReplyRetweetFavorite
- New blog post... resolving video problems with K-L-Ubuntu and XFX Radeon 6850 http://t.co/H6bXuMqi 06:59:18 AM October 22, 2011 from joelperryproductions.com ReplyRetweetFavorite
- New blog post... Computer upgrades http://t.co/6PWVNy4m 01:39:35 PM October 20, 2011 from joelperryproductions.com ReplyRetweetFavorite
- $7 for $15 Worth of Hand-Tossed Pizza, Calzones, and Drinks at Andolini's Pizza Charleston, SC http://t.co/QnKwPwB 11:49:26 AM August 29, 2011 from Tweet Button ReplyRetweetFavorite
- New blog post... is zdnet.com/news down http://t.co/DThuI4r 07:57:28 AM August 17, 2011 from joelperryproductions.com ReplyRetweetFavorite
- New blog post... Netflix Down? http://bit.ly/q74Svu 07:39:30 PM August 08, 2011 from joelperryproductions.com ReplyRetweetFavorite
Blogroll
programming
Tech Websites
- a good coder I found on CodeProject
- Barebones HTML coding chart
- Code Project
- Extreme Overclocking
- FreeBSD blog
- Legit Reviews – Tech Hardware Review
- Linuxtopia
- Notion Ink – homepage
- Plug Computing web site and forums
- Tablet Roms – used to be – Notion Ink Hacks
- Ubuntu Forums post on the mount command and fstab file
- VMWare ESX blogger
- Wikipedia.org main page
- ZDNet's blog pages



