Ubuntu 12.04 KVM

From Proxmox VE
Jump to: navigation, search

Note: This community contributed article is not really Proxmox VE related, and contains not optimal settings for Proxmox VE, needs rework or is will be deleted

Get the ISO

On the PVE 1.9x host:

cd /var/lib/vz/template/iso
wget http://releases.ubuntu.com/precise/ubuntu-12.04.1-desktop-i386.iso
# Get the Unity Desktop version
# http://mirror.switch.ch/ftp/mirror/ubuntu-cdimage/12.04.1/ubuntu-12.04.1-desktop-i386.iso
# https://launchpad.net/ubuntu/+cdmirrors
# Alternative KDE ISO
# http://cdimage.debian.org/debian-cd/6.0.6/i386/iso-cd/debian-6.0.6-i386-kde-CD-1.iso

Install the Guest

qcow2 32 GB HDD
1024 MB RAM
Linux 2.6
NIC e1000
Boot from above ISO
Admin user during install: adminuser / secretpwd

Update manager - 140 Updates

APT Updates

apt-get install screen

Not Working Tweaks

Only some parts of the following work for Unity 2D:

sudo apt-get install myunity

The following does not work in Unity 2D:

sudo apt-get install compizconfig-settings-manager



Invoke the Terminal using CTRL-ALT-T.

The Terminal shortcut does not come up on the launch bar or when using Alt+Tab / Alt-F2. Enable it by removing it and re-installing it immediately:

Ubuntu Software Center -> Installed -> gnome-terminal -> Remove
Ubuntu Software Center -> All Software -> gnome-terminal - > Install

The launcher is stuck at the left side - cannot bring it down in Ubuntu 12.04 - Precise pangolin ordinarily.

VNC Server

Alt-F2 => All Applications => Desktop Sharing => Install


apt-get install vino


This appears to be the best Unity Desktop Tweaker:

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

Move the Windows control buttons to the right:

sudo apt-get install gconf-editor
apps -> metacity -> general -> button_layout -> :minimize,maximize,close


To bring back the icons into the system tray and tweak it we need dconf-editor from the gnome library:

apt-get install dconf-tools
ALT-F2 -> dconf-editor -> desktop -> unity -> panel -> systray-whitelist
  • Default: [‘JavaEmbeddedFrame’, ‘Mumble’, ‘Wine’, ‘Skype’, ‘hp-systray’, ‘scp-dbus-service’]
  • Can Append inside: , ‘shutter’, ‘easycrypt’
  • For mostly clean taskbar, just append inside: , 'Ts3client_linux_amd64' or , 'Ts3client_linux_x86'
  • To bring all, just replace with: ['all']
  • Can revert by clicking Set to Default
  • Set using CLI
gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"
  • View current settings:
gsettings get com.canonical.Unity.Panel systray-whitelist

For these settings to take effect, just log out and log back in.

Add / Remove Indicators

Find applications listed in the indicator at

ls /usr/share/indicators/messages/applications

Remove / rename them.

The Indicators Notification Area is now called Systray now managed with dconf-editor.

Dash Overlays Un-Maximise

ALT-F2 -> dconf-editor -> desktop -> unity -> form-factor
  • Possible choices: Automatic (default maximised), Desktop, Notebook
  • Alternative means from CLI:
gsettings set com.canonical.Unity form-factor 'Desktop'

Block Social Networking sites

Append to /etc/hosts:	facebook.com flickr.com fubar.com linkedin.com myspace.com netlog.com twitter.com

Shortcuts in Unity

sudo apt-get install --no-install-recommends gnome-panel
gnome-desktop-item-edit --create-new ~/Desktop
  • On resulting GUI, clicking icon on left to change
  • Browse Executables generally from /usr/bin
  • Example: Scanner - /usr/bin/xsane
  • Example: HP Print / Scan - /usr/bin/hp-toolbox
  • Example Icon Location: HP Print / Scan - /usr/share/hplip/data/images/128x128/hp_logo.png
  • Copy existing shortcuts from /usr/share/applications
  • Shortcuts for users will be in /opt/<username>/.local.share/applications or in ~/.local/share/applications ( ~ => /home/<username> ).
  • Shortcuts can be dragged and dropped onto desktop from all applications list:
sudo chmod +x ~/Desktop/*.desktop
sudo chown <username> ~/Desktop/*.desktop

Shortcut Format


When an icon is specified by name with no file extension and no path, then the defaults would kick in - in this example it would be:

[Desktop Entry]
Name=XSane Image scanning program
Comment=A program to work with scanner. Can be used as a scanning, copier, OCR, fax tools.


Icons are available in the respective theme icon folders like:

[Desktop Entry]
Name=HP Device Manager
GenericName=Printer Management Application
Comment=View device status, ink levels and perform maintenance.

Google Chrome Disable Sign In

Locate the Preferences file in the user's profile in this case:

nano /home/adminuser/.config/chromium/Default/Preferences

and add the user_skipped parameter in the sync_promo stanza at nearly the end of the file:

   "sync_promo": {
      "startup_count": 1,
      "view_count": 1,
      "user_skipped": true

This will make sure that the google chrome sign in page does not get displayed.


Network Printer - HP Laserjet Pro 400 M 425dtn:

URI = http://mydomain.com:631/printers
Select Printer from Database: HP Laserjet 4100dtn -> Foomatic/Postscript (Recommended)

This installs v3.12.2 of the hplip driver as seen from

dpkg -l hplip

Make sure that the following ports are opened on your printer's firewall if running one locally (see http://www.iana.org/assignments/port-numbers): Add IANA HP I/O and Status ports to /etc/services - port forward:

hpssd: 2207/tcp and 2207/udp
hpiod: 2208/tcp and 2208/udp
cups: 631/tcp and 631/udp

Updating to Latest HP Printer Drivers - v3.12.11

# login as adminuser
sudo -i

## Take from http://sourceforge.net/projects/hplip/files/hplip/3.12.11/hplip-3.12.11.run
wget http://switch.dl.sourceforge.net/project/hplip/hplip/3.12.11/hplip-3.12.11.run
chmod 755 hplip-3.12.11.run
mv hplip-3.12.11.run /home/adminuser
chown adminuser:adminuser /home/adminuser/hplip-3.12.11.run

cd /home/adminuser/

This will install the updated SANE scanner driver as well with all dependencies. Choose to overwrite HPLIP-3.12.2 driver to avoid conflicts. If this is done from PuTTY we get this innocuous error:

warning: No display found.
error: hp-systray requires Qt4 GUI and DBus support. Exiting.

If done from the desktop terminal, the error does not appear. Attempting to use a printer with a Global IP or internet resolvable domain that is not in the LAN will prevent a Networked Printer from being installed and result in python errors. manual Printer addition using the Network Printer install of the previous section will however work across the internet.

SSH Access

On the Ubuntu host:

sudo apt-get install openssh-server

SSH Speedup

sudo -i
echo "UseDNS no" >> /etc/ssh/sshd_config
/etc/init.d/ssh restart

From the SSH client login as adminuser and sudo -i to root.

Restart SSH Server

service ssh restart

Blacklist Hardware Modules

Place the list of modules to be blacklisted (not loaded at boot) in /etc/modprobe.d/blacklist.conf. For example, to blacklist the bmc43xx (broadcom wireless driver) append the line blacklist bmc43xx to the file /etc/modprobe.d/blacklist.conf, save, close and reboot.