Having linux running on your home PC / laptop makes setting up the development environment for the Raspberry Pi (RPi) board much easier and more fun. This tutorial is for those that run Windows on their home machines but would still like to develop for the RPi board. The easiest and least intrusive way of doing this is to setup a Linux virtual machine capable of running in your Windows host OS. This tutorial walks you through setting up such a machine.
The virtualization tool that will be used in this tutorial is VMWarePlayer 5 . Another really popular virtualization tool is Oracle’s VirtualBox which is also a great tool that performs an identical task. I personally prefer VMWare Player because I find that it has slightly better hardware support for the guest operating system.
This brings me to the issue of terminology. In “virtualization speak”, the “host OS” is the OS running directly on the hardware. In our case this will be Microsoft (MS) Windows (Windows 7 64-bit in my case). The virtualized linux machine that will run in VMware Player is known as the “guest OS”.
We will be installing the Kubuntu Linux distribution. Its internals are identical to the more popular Ubuntu. The major difference between Kubuntu and Ubuntu is that Kubuntu uses KDE for its desktop graphical user interface (GUI) (hence the K in Kubuntu..), while Ubuntu relies on the Unity desktop graphical user interface (GUI). KDE is more refined than Ubuntu’s Gnome desktop GUI in my opinion.
So to get started download VMware player 5 and Kubuntu 12.04 (32-bit) from:
Installing VMware Player 5 and Creating a Virtual Machine
- Make sure that you download the latest VMWare Player for windows and that you download the 32-bit version of Kubuntu regardless of your bitwidth/bitness of your machine.
- Install VMware player 5 on your MS Windows machine. This is a standard installation. You can accept all the defaults in the installation process.
- Once the installation process of VMware player 5 completes, start VMware player 5 from the start menu. You should see the main VMware player window in all of its glory (figure 1).
- The next step is to click on the “Create New Virtual Machine” option. This will open a new window as shown in Figure 2. Choose the “I will install the operating system later” option and click next.
- In the next window, make sure that under the “Guest operating system” you choose “Linux”. And in the “Version” drop down menu choose “Ubuntu” as shown in Figure 3 (Unfortunately there is no option for Kubuntu and Ubuntu is very close to Kubuntu anyways). Then click “Next”.
- At this point you can assign a name for your virtual machine as shown in Figure 4. I will use “KubuntuVM”. Click Next.
- Now you will decide on the size of the primary virtual hard drive associated with your virtual machine (Figure 5). I would recommend a minimum size of 40GB (I’m choosing 60GB). The default selection for splitting the disk into multiple files is acceptable. Click Next.
- In the next window (Figure 6) click on the “customize hardware” button and assign a reasonable amount of RAM to your virtual machine. I recommend a minimum of 2GB.
- Within the same “Hardware Menu” click on “Processors” under “Device” and assign at least 2 processors if you have a quad core processor. If not then keep processor at 1 (Figure 7).
- Under “New CD/DVD (IDE), mount the Kubuntu iso image as a drive in the new virtual machine (Figure 8). This way the Kubuntu ISO image will boot when the virtual machine runs the first time. Then click “Close” in the “Hardware” window and “Finish” in the “New Virtual Machine Wizard” window.
- At this point the KubuntuVM virtual machine is created as shown in Figure 9. Select it and hit the green “play button.
- Pressing the play button will cause Kubuntu to load. You should see a Kubuntu Welcome Screen (Figure 10). Select “Start Kubuntu” and hit the “Enter” key.
Installing Kubuntu in the Virtual Machine
- The following window gives you the option of trying Ubuntu or installing it (Figure 11). Click on the “Install Kubuntu” button.
- In the next window (Figure 12), check both check boxes to enable the installation of 3rd party software and to download updates while installing. Then click “Continue”.
- In the next window (Figure 13) accept the defaults and click “Install Now”. This will basically use the entire virtual disk for the Kubuntu Installation.
- In the next window select your nearest city and/or time zone and click continue.
- In the next window (Figure 15) you can select the keyboard layout. Accept the default unless you are planning to us a default layout other than “English (US)”. Click on “Continue”.
- In the next window (Figure 16) enter your name, username, password and computer name. I chose my computer name to be the same as the name of the virtual machine; KubuntuVM. Click on “Continue”.
- At this point the installation will resume for 20-30 minutes. When the installation is complete you will be asked to restart the guest OS “Now”.
- You may be asked to press “Enter” one more time.
- When the guest OS (Kubuntu) restarts you will prompted to enter your username and password at the login screen. Enter them and press enter to log in to your Guest OS (Kubuntu) for the first time.
- Click on the “Blue” start menu icon with a ‘K’ written in it. Navigate to Applications->System->Terminal. Right click on the Terminal icon and left click on “Add to Favourites” and “Add to Panel” This will make the Terminal program easily accessible from the Panel (bottom of screen) as well as the “Favourites” Menu as shown in Figure 17.
Updating Kubuntu and installing VMware-Tools
- The next step is to open the terminal program and typing in the command line: “sudo apt-get update” followed by “sudo apt-get upgrade” or alternatively we can do both at the same time “ sudo apt-get update && sudo apt-get upgrade“. The first command consults the /etc/apt/sources.list and updates the database of available packages. The second command checks updates for all installed packages and then prompts to download and install them. When it does this, accept the updates and hit enter. The second command might take some time before it completes. Once completed, reboot your guest OS by clicking on the “start menu->leave->restart”
- When the Guest OS boots up again, login and open a console window and type: “sudo apt-get install build-essential“. When prompted to download packages type ‘Y’ or “yes” and hit enter. This will install the native GCC compiler along with some other toolchain utilities. This is required for the installation of the VMware-tools.
Without VMware-Tools you can run the guest OS, but you cannot re-size the window containing the Guest OS, you cannot utilize full screen and unity modes and you cannot seamlessly copy and paste between host and guest OS’s. To enable all of these abilities we need to install VMware-Tools
- Under the VMware player “Player” Menu go to and click on “Player->Manage-> Install VMWare Tools”
- This will mount a new drive called “VMware Tools”. Use the GUI based file manager “Dolphin” (available from the KDE menu) to navigate to it and extract the VMware-Tools-x.y.xxxxx.tgz file into the “/home/halherta/Downloads” directory (double clicking on the .tgz compressed file invokes a GUI-based extraction tool).
- In the command line (console window) go to this directory. Navigate to the “/home/halherta/Downloads/vmware-tools-distrib” directory (“cd ~/Downloads/vmware-tools-distrib“) and type “sudo ./vmware-install.pl“.
- Accept all defaults by hitting “Enter” after each question is printed in the command line. This will install the VMware-Tools.
- Make sure that either the “build-essential” package is installed before installing vmware-tools. Otherwise the VMware-Tools installation will fail.
- Once this is done, restart your machine and you should have a successful complete install of the Kubuntu (with all fancy guest OS abilities enabled) via VMWare Player!!!