Search This Blog

Installation of Ubuntu 12.10 with Unity on VMWare

A while ago I posted a "how-to" doubling as a check list for installing Linux on VMWare and later I've added other posts full of little hints and reminders (e.g. fonts, keymaps). A few years later and that information is still valid, however my workflow has changed a bit, so here's a new post based on Ubuntu 12.10 (Quantal Quetzal) trying to consolidate everything into one big list.

Ingredients

A newly created virtual machine with 1-1.5GB of RAM, a 20-40GB disk and a couple of CPU cores.

Installation

Mount the ISO image to your VM and boot it up, then follow the instructions to install your distro selecting your preferences (timezone, keyboard layout, etc.). It helps if your Linux account has the same username as the one on your host OS - it helps when accessing your computer via ssh.

Once the installation finishes and the VM boots up, log in with your newly created user account and password and admire the new clean desktop. It won't last long.

Change the Screen Resolution, Keyboard and Mouse speed

At this point I always change the screen resolution from the default 800x600 to something more appropriate that fits in your monitor (I assume you don't have a CRT from the late 90s), even though this is short-lived as we are installing VMWare tools with automatic screen resizing a bit later.

What I also do at this point, is set up the keyboard's repeat keys delay and speed, and the mouse's acceleration and sensitivity to my preferred values.

Terminal

Hit Ctrl+Alt+T to start the terminal, your new best friend. Ubuntu Quantal uses Unity by default, so the terminal's icon will appear on the launcher(dock) on the left. Right-click and "lock to launcher" if you'd like to keep this permanently pinned there.

Enable root account (optional)

To enable the root account (disabled by default on Ubuntu) type:

sudo passwd

Type your own password first, then choose a really difficult one for the root user (type it twice).

Log in as root if you can't be bothered to sudo all the time (I give you a waiver today just because it's installation time, normally you should sudo like a good user):

su - root

Update local apt package system and install ssh

sudo apt-get update
sudo apt-get install ssh

Install VMWare tools

Before installing VMWare tools we need to make sure that we have "make" and the gcc compiler, so quickly type:

sudo apt-get install make
sudo apt-get install gcc

On the latest Ubuntu these are installed by defaults, but it doesn't hurt it you just ensure they are there.

Install vmware tools by choosing VM -> Install VMWare tools... from VMWare Workstation's menu. This will mount a virtual DVD-ROM image that contains the VMWare tools tar archive. Extract it somewhere then from the command line change to that directory () and type:

sudo ./vmware-install.pl

When the VMWare tools are installed, restart your VM and log in as your user. You can now resize the desktop by using VMWare's menu View -> Autosize -> Autofir Guest, and you could always go full screen if you prefer.

Download and Install Chrome

Time to get a serious browser, so get out to a terminal window and install one dependency that I've found critical:

sudo apt-get install libgconf2-4

Google "Chrome download", download it and install it by getting out to the terminal again and typing in the directory where the .deb file has been downloaded to.

sudo dpkg --install google-chrome-stable_current_i386.deb

If you see any dependency errors like Errors were encountered while processing: google-chrome-stable, type the following to fix it:

sudo apt-get install -f

Install additional software

I would assume here that everybody has their own list, mine contains the following:

After installation you can log-off and change the desktop environment from the login screen (click button next to your username).

Install Sublime Text 2

Everybody has their favourite editor, I won't get into the VI vs Emacs flame here. My favourite (of recent) text editor for all OS's is Sublime Text 2, if you haven't tried it yet you are half a (wo)man.

If you don't know what to put in the User preferences, you can see a full list with explanatory comments in Preferences -> Settings - Default, but be careful not to edit that file as those settings will be lost if you upgrade to the next Sublime patch.

For key bindings I leave everything as is, with the exception of two keystrokes taht stayed with me from the 80s. As I was too young and innocent I haven't managed to get over them no matter how many text editors and operating systems I've changed. From the menu again, choose Preferences -> Key Bindings - User and edit to your heart's content. I do this:

Using ssh with Public Key Authentication

The final part of my setup on VMWare is to install my public key from the host onto the VM so that I can use key authentication. For the remainder of this section I will assume we are using cygwin on Windows.

On your PC (client), you need to generate a key pair. Using cygwin type:

ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/ksymeon/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/ksymeon/.ssh/id_rsa.
Your public key has been saved in /home/ksymeon/.ssh/id_rsa.pub.
The key fingerprint is:
e8:bb:5f:d5:e0:f1:49:88:01:38:c1:cd:7d:b4:94:99 xxxxxxx@xxxxxx

You now have the public and private keys in your .ssh folder on your cygwin install.

Next thing to upload your public key to your linux VM (let's assume you called it "linuxvm"). The content of your public key needs to be added to the ~/.ssh/authorized_keys2 file on the VM. You can have multiple authorised keys for your account. I use different keys for each different machine I use to connect to my servers, i.e. my laptop has a different key than my desktop.

Using cygwin log in to your linux XM:

ssh linuxvm

Create the .ssh folder under your home (~) folder:

mkdir .ssh
chmod 700 .ssh

Open another local cygwin shell, copy your public key securely to your linux VM:

scp id_rsa.pub linuxvm:~/.ssh/temp.pub

From your remote cygwin shell, get into your .ssh folder and check the temp.pub is there:

cd .ssh
ls -lFa

Append the public key to your authorised keys and delete it:

cat temp.pub >> authorized_keys2
rm temp.pub

Now, back to you cygwin prompt, try to ssh again into your linux box:

ssh linuxvm
Enter passphrase for key '/home/xxxxxx/.ssh/id_rsa':

Instead of your password, now the passphrase is required unless you've left it empty.

You can now add your public key to other accounts, for example the root account if you would like to log in as root directly from your PC. Otherwise you can always log in as yourself and 'su - root' after you are in.

Conclusion

Customisations on Linux are endless. My next step, for example, is to customize the UI, colors, create new terminal profiles, add new fonts.

This post is only the beginning - I've just tried to write up my basic checklist after I install a new VM. Thanks for reading and I hope there's a few tips above for your own installs.

Popular posts from this blog

Thanks to my dear friend from NYC and his... accomplice :), I have had an iPad delivered a couple of days ago. I haven't actually managed to do much on it yet, I have spent my minimal free time in the evenings having the iPad lying on my desk connected to my desktop, while I was trying to find any decent specialized iPad apps in the AppStore, which is not as easy as it sounds.

Quickly let me get through what everybody else has already said: looks stunning, feels sturdy, screen is amazing and bright, battery life exceptional. That all we all know. Here is my take on the rest - a very quick first impressions review...

Ergonomics
Sturdy feeling generally and the thick bevel allows you to handle it very easily. On the desktop surface is perfectly usable. It's like a normal notepad instead of a pen you use your fingers. Admittedly you can write faster than you can type on one hand, but for casual use it's perfect. In bed lying on your back it's unusable, too heavy. Lying in …

I've been always wanting to sit down one day and solve this problem; test the speed of manipulating pixels on a Bitmap using the three options:

- the convenient but understandably slow Pixels[],- the "interesting" Scanline property and- the Windows API GetDIBits and SetDIBits.I have been traditionally using Pixels for quick work and the Get/SetDIBits for low-level pixel manipulation such as the filters used in ToolBox. Never really used the Scanline property in anger, I was always thinking, DIBits "had" to be quicker. Little I knew...I have been experimenting with two tools that I've written and never released to the public domain. The first is the BMPCreator which I wrote in order to create 256-level grayscale bitmaps, the other is the IconCreator which uses a grayscale bitmap and applies color maps to it, giving you the ability to create different colored versions of the same icon (like in my database visualization tool VirtualTreeNavigator).Yesterday I wr…

It's been 2.5 years since I posted an installation guide of installing Ubuntu 12.10 on VMWare Workstation but the release of Linux Mint 17.1 has prompted me to write an updated guide. This is the third of my guides, acting mostly as a memo for a quick install of new distros on VMWare, my first one written in 2009 (Linux on VMWare with later additions of other posts full of little hints and reminders (e.g. fonts, keymaps)).IngredientsPlease note that these instructions work for most distros, although this post focuses on Mint 17.1A downloaded ISO image of your favourite distro (Mint, Mint LMDE, Ubuntu, Debian)A newly created virtual machine with 2-8GB of RAM, a 40-60GB disk and a couple of CPU cores.InstallationMount the ISO image to your VM's optical drive and boot it up, then follow the instructions to install your distro selecting your preferences (timezone, keyboard layout, etc.). For accessing your VM via ssh from your host, it helps if your Linux account has the same user…