Home Pauline Howto Articles Uniquely NZ Small Firms Search
Ubuntu Unity - Evolution or Revolution


The page is no longer being updated as we have now switched to Linux Mint which provides a much better desktop experience than Ubuntu with Unity or Lubuntu for lower power 'Legacy' computers.

This page was last updated to extend my experiences to include Precise Pangolin 12.04 . The earlier versions are available at Unity-Natty and Unity-Oneiric Some non Unity specific sections have been moved out.


Contents List

Introduction

The main page covering my experiences in making the transition from Microsoft Windows to Ubuntu Linux - Fun with Ubuntu Linux quickly become excessively long and has been split into a series of pages covering various aspects in detail.  This is slightly different to the other pages as it covers a big change in the direction of Ubuntu - this to me seems to be revolution not evolution however you disguise it by calling it Unity.

Our MSI Wind U100 netbooks have been used as the guinea pigs for this and we have been using Unity since Natty 11.04, a year now. The big question then was "Is it worth changing to a non Long Term Support (LTS) version?" The pace of development of hardware means that each version is likely to support some of the latest hardware much better than earlier versions. This was true of Natty where the Connection (network) Manager and Bluetooth support was significantly improved for our hardware. It also has significant upgrades in software to Firefox 4 and LibreOffice 3.3 and also had a one year support which took it to the issue of the next LTS version. The main change is however in the Desktop and our decision to upgrade was mainly to get an early look at Unity as a replacement for the Gnome Desktop on a machine with a small screen where it should offer real advantages. Natty also offered a choice of Desktop but that is not true for the new LTS version Precise Pangolin 12.04.

Change wass inevitable because Gnome has also moved to a major new version with an enhanced desktop (Gnome Shell). This led to an accelerated development pace and the Unity development has arguably been rushed out of the door whilst it still needs further refinement and needs more bug fixes, tweaks and documentation than any previous LTS version of Ubuntu.

Useful Enhancements in the new LTS version of Ubuntu Precise Pangolin 12.04

Unity (certainly an enhancement for netbooks but arguably a step back for desktops)

The new version of Ubuntu follows the desktop design developed for Netbooks which are designed to make best use of the screen area. In particular, this addresses the problems with widescreen type layouts which are only 600 pixels high on a netbook which gives a stupid aspect ration for the working area when you have multiple toolbars.

Unity therefore uses what is currently, a fairly basic launcher on the left, removes the lower panel and shares use of the top panel with the general toolbar (the one with drop down menus like File Edit View ... Help) belonging to the application which is In Focus and various application and system indicator 'trays'. The Unity Launcher bar on the left lacks some features you would expect and each application Icon doubles with the item you used to see in the bottom panel. Unity has many other excellent touches such as automatic expansion to full screen when an application is dragged to the top or half screen when dragged to a side but they are not strictly part of Unity as they are implemented by Compiz so can be or are part of the Classic version with the Gnome panels. Some major features have disappeared including the ability to run applets such as Netspeed completely and the system tray part of the top panel is only accessible to a few favoured and whitelisted applications which stops many programs from being usable if they require an indicator icon in the systray although this is easy cured. Overall it is a good idea but released too early in the development cycle for a mainstream desktop user.

Unity Desktop and Terminology

If you wonder about the terminology used for the various components of the Unity there is an excellent explanation at http://askubuntu.com/questions/10228/whats-the-right-terminology-for-unitys-ui-elements. I have used Stefano Palazzo's excellent work to produce the following and all credit is due to him whilst any errors in changes are due to me!

Picture from askubuntu.com/questions/10228/whats-the-right-terminology-for-unitys-ui-elements
  1. Windows Title
  2. Application Menu
  3. Dash Icon
  4. Launcher Icons
  5. Workspace Switcher
  6. Launcher
  7. Trash
  8. Indicators
    • Mail
    • Network
    • Volume
    • Time & Date
    • Shutdown

The special thing about Unity is the way it efficiently uses all the space available. Most Desktops have two 'panels', one at the top and one at the bottom as well as a Title bar in the application. Unity shares the top panel between the system and application with the Application's Menu being at the left top and the system area at the right. On the left the Launcher Icons can be either 'pinned' in place or appear at the bottom when an application is running. The little marks to left and right (see the Firefox one) show running applications and the number of open windows. Overall the Launcher area is more similar to the dock on an Apple than a Windows system.

Unity keyboard and mouse shortcuts

Much of the apparent power of Ubuntu with Unity are due to the Keyboard and Mouse Shortcuts. There is a useful page at askubuntu.com which covers the majority of these: Unity keyboard and mouse shortcuts. I have reproduced most of them here with some of my additions and changes and with the ones I find useful highlighted. They are essential if you use Unity as many of the panel equivalents have been lost, such as hiding windows and showing the desktop (bottom left icon under almost every other variant of gnome panel) which is now achieved by Ctrl Super D. In actual fact they are almost all implemented via Compiz and are equally applicable whether you use Unity or not and most are available already in the Long Term Support version 10.04 Lucid Lynx! However one big step forwards is that all the shortcuts are now dispalyed ready for you to use if you just hold down the Super Key

Unity Shortcuts Display from holding down the Super Key

Fixes for 'Open Bugs' and Problems Areas in Ubuntu Unity

Restoring Ctrl Alt Backspace function to restart Xserver and go to login screen if Unity Freezes

Unity is sufficiently flaky at present that one needs ways to escape from a major freeze such as restarting the Xserver.

Administration or System Settings -> Keyboard Layout [Settings] -> Options (bottom right corner) -> Key Sequence to Kill the Xserver and tick box for Control Alt Backspace.

Other options before using Ctrl Alt Backspace if mouse click freezes.

I have had a couple of program problems which have prevented mouse actions being accepted.

It is also possible these are because the window is displayed but has lost 'focus' - this is mentioned in https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/772612 which would explain why the re selecting of the window using one of the switchers works.

Solution to Major Problem - Restoring the Notification Area (Systray) for applications when running Unity

Many programs that I use require use of Indicators in the Systray (ie on the top panel) which is blocked by default for most programs by Unity. In my case this prevented use of Truecrypt, Kaffeine and Gnome-ppp to name a few.

There are several places on the web which cover this and the best overall site covering such matters currently is Web UPD8 - there is a good article on How to Re-enable the Notification Area (systray) for all Applications.

First you need to install the configuration tool for the Unity Desktop - the equivalent to gconf-editor for the gnome desktop. Not surprisingly it is called dconf-editor and most of it is very similar - there is however a useful addition of a return to defaults button for each setting. It can be installed in a terminal or you can use the Synaptic Package Manager. In this case I used a terminal to get the overall package of tools but first I had to enable the universe repository and the easy way was to run the Ubuntu Software Centre and use the drop down edit menu -> Software Sources and tick the Universe box on the Ubuntu Software tab - you should also be able to search and install from the Software Centre. If you do it in a terminal then also install the compiz configuration settings manager and gconf-editor at the same time as you will certainly need CCSM latter

sudo apt-get install dconf-tools compizconfig-settings-manager gconf-editor

Now run dconf-editor using the terminal

dconf-editor

then navigate to desktop > unity > panel and enter: ['all'] in place of the existing string in Value for the for the Key systray-whitelist by clicking, overwriting with ['all'] and then a return.

Tip Most of the tweak tools described below also allow you to restore the Notification area for all programs

Wine is Corked under Unity - still the case in Precise

There are several serious problems with use of Wine under Unity

Unity workaround for Mouse Displacement on programs running maximised under Wine

I could not use Dreamweaver which runs under Wine with Unity as the Mouse Pointer was displaced by what seems to be a toolbar width down. On further investigation this occurs with all my Wine applications and seems to be quite consistent when any Wine program is maximised. This bug now seems to be recognised at https://bugs.launchpad.net/unity/+bug/755406.

The workaround is to avoid running wine/dreamweaver maximised but to run it in a window which is adjusted to be as big as possible. Dreamweaver always seems to be launched maximised - it does not seem to be possible to launch any application in a window which is over 75% of full size without it being automatically maximised but at least the previous size is remembered for when you un maximise it. The size can be customised in Oneiric and Precise and set up to 100%

Launcher Item Anomalies using Picasa and any other programs running under Wine - the solution below still works in Precise

Unlike the problem above, this is a serious problem rather than an inconvenience and needs a workaround to make Wine usable. If you have more than one program available to be run under Wine (ie with launcher files (.desktop) in ~/.local/share/applications) the Unity Launcher display seems to get confused about which Wine application(s) are running. Picasa seems to be a good example of the effect for me and initially showed up as another window of Dreamweaver or Paint Shop Pro 4 with an extra tick at the side of their launcher item if one of them was already running - definitely some bugs here! Clicking the launcher item led to the display of the two windows running the completely different applications. Picasa and other Wine applications, when started, would often display the launcher item for a different Wine application. This did not seem to be documented as a bug anywhere although I found a reference somewhere to some similar effects having been seen with java programs using a different 'dock' to Unity. I reported this bug at https://bugs.launchpad.net/unity/+bug/799023 which has been marked as a duplicate of https://bugs.launchpad.net/unity-2d/+bug/702452/ and I am still putting my input in there.

I think I have found a workaround for this strange effect after a lot of experimenting and I have carried out the final procedure on a second machine with success [ click here for the full story and steps I took. ] The following section gives a reasonably full description of what to do.

The problem only seems to occur if any of the launcher files (.desktop) in ~/.local/share/applications and its subfolders contains a line specifying a StartupWMClass=Wine and these lines all need to be deleted or commented out (with a possible exception of Picasa - see below). You can edit the files using a right click menu in the file browser (nautilus) and need to open them using gedit (the text editor). You do not need to be running as root as they are files local to you as a user but they are in a hidden folder (Ctrl H will reveal hidden folders and files in the file manager). You need to logout and back in to see the effects. It may be easiest to make a copy of ~/.local/share/applications, delete the wine subfolder which contains these files and then drag back the just the launchers you need. Then modify them by opening within gedit and commenting out the relevant lines. - A typical basic launcher file for a Wine program (in this case Notepad++) now looks like:

[Desktop Entry]
Name=Notepad++
Exec=env WINEPREFIX="/home/pcurtis/.wine" wine "C:\\Program Files\\Notepad++\\notepad++.exe"
Type=Application
#StartupWMClass=Wine
Path=/home/pcurtis/.wine/dosdevices/c:/Program Files/Notepad++/localization
Icon=421e_notepad++.0

The change is in red.

Note: None of the changes seem to come into effect until a logout/login sequence is done as Unity seems to do its matching when it is first run.

 

Background: The definitive source for the Specification of Desktop Entries is http://standards.freedesktop.org/desktop-entry-spec/latest/index.html

Picasa: The Picasa launcher is different if you install the linux version and calls a script /opt/google/picasa/3.0/bin/picasa rather than directly launching the program and does not have a StartupWMClass=Wine anywhere I can find in the picasa script or any of the other script files in the folder. There is no picasa.desktop file in ~/.local/share/applications - it is in usr/share/applications Initially I found that removing the lines from all the other .desktop files was sufficient to allow picasa to be used normally but the latest combinations of wine and unity on one of my machines started showing Picasa running as a Wine Launcher Application. I am not sure exactly where and when this new 'feature' arrived or if this is a side effect of changing absolutely all the other wine launcher files with the procedure below. I have found that one now has to copy the picasa.desktop file from /usr/share/applications to ~/.local/share/application and add the line StartupWMClass=Wine to the bottom of it to prevent it showing up as a Wine Launcher in the Unity Launcher - another little mystery! I added the line with a space at the begriming to prevent the procedure below commenting it out again. It is possible that just defining any unique StartWMClass for Picasa is sufficient.

Automated Procedures to Search for all Lines containing StartupWMClass=Wine and comment them out (Advanced).

It is a tedious procedure to find and open for editing all the launcher files for Wine Applications so I am developing a way to search the .desktop files using a single terminal command line and add a # at the start of all every StartupWMClass=Wine line. It searches for lines which start with the string to avoid adding successive # symbols if it is rerun. Before doing such a large and potentially damaging operation you must backup the folder and preferably the whole machine.

First do the following in a terminal to see how many StartWMClass lines will be found. Note these lines for the terminal may have wrapped round in your browser - they should be single lines and should be cut and pasted in total

cd $HOME && find $HOME/.local/share/applications -name '*.desktop' -exec cat '{}' \; | grep StartupWMClass

When you are sure what is going on you can do the search and replace:

cd $HOME && find $HOME/.local/share/applications -name '*.desktop' -exec sed -i 's/^StartupWMClass=Wine/#StartupWMClass=Wine/' '{}' \;

Then repeat the earlier check to see that all the lines are now commented out.

You may wish to modify the commands for Desktop for launchers as well.

cd $HOME && find $HOME/Desktop -name '*.desktop' -exec cat '{}' \; | grep StartupWMClass

cd $HOME && find $HOME/Desktop -name '*.desktop' -exec sed -i 's/^StartupWMClass=Wine/#StartupWMClass=Wine/' '{}' \;

These commands are good examples of the power of linux when you are piping the output of one sophisticated command on to another - sed and find justify big manuals for themselves and the regular expressions used merit whole books. For a simple explanation of how the search and replace works see www.pcurtis.com/ubuntu.htm#find_replace_in_folder noting the ^ is to only search for the string at the start of a line and the cd $HOME ensures that the commands are run from your home folder - this seems to be required for the checking command to work. If you are using this within a script you may need to look at man find and use $HOME instead of ~ and put the {} in quotes like '{}' and escape or quote where wildcards like * are used to avoid the script processor misinterpreting the brackets - I have tried to do all that but have not yet experimented with wrapping these in scripts and if you do the checking command is the safer one to try it on!

Addition Problems first apparent in Precise

Programs not remaining in Launcher after logout

I have found an additional but related problem in 12.04. Even when a program displays the correct icon when you start it one can not permanently hold it in the Launcher. It will stay until one does a restart but after that it has disappeared.

The problem is only present when the launchers are in a subfolder of ~/.local/share/applications as are most wine applications which are in subfolders of ~/.local/share/applications/wine .

The workround is to copy or move them to ~/.local/share/applications

Launchers copied to the desktop also seem to work as long as there is also a copy in ~/.local/share/applications

Incorrect matching when Wine program started from file association

Even when everything seems to work fine from the unity launcher you do not always get the correct matching if you start from a file which is associated with the program. ie if I right click on a .jpg file and open it with Paintshop Pro if turns up in the Launcher as Picasa or with a Wine Icon depending on which machine I am using. I have tried defining a different StartupWMClass= for each program and placing them in~/.local/share/applications but even that still does not always give the correct behavior for starting a Wine program from an association.

 

Tips and Tricks to get the best from Unity

A Netspeed AppIndicator for Ubuntu with Unity - tested under Oneiric and Precise

The most important missing facility I needed for Unity was a replacement for the Netspeed Applet which would continuously display upload and download speeds in the 'panel'. Applets no longer work in Unity and the nearest replacements are called Appindicators so I have been looking for a replacement which I eventually found on Webupd8 in the article How To Display Network Upload / Download Speed On The Panel In Ubuntu 11.04 . This solution uses an existing Appindicator called Indicator-Sysmonitor which is very versatile and allows one to display almost anything on the Unity (or GNOME) panel by using a simple command or a bash script. In this case a script has been written by Alex to display any combination of network speeds, memory use and cpu loads using a system application called dstat to provide the information. I have modified the script slightly to display lower data rates for watch for data 'leakage' when operating mobile.

Indicator-Sysmonitor is in a PPA which can be loaded using a terminal by:

sudo add-apt-repository ppa:alexeftimie/ppa
sudo apt-get update
sudo apt-get install indicator-sysmonitor

NOTE - at this point in time the PPA has not been updated for Precise and I had to download and install using gdebi the version for oneiric from https://launchpad.net/indicator-sysmonitor/+download

The script needs a system program called dstat to be installed - this is a very versatile way to monitor many system parameters do a man dstat to find out more once it is installed. It can be installed in a terminal by:

sudo apt-get install dstat

My modified version of the script is optimised for mobile use and should be stored as sysmon in a folder called scripts in the home folder - if you put it elsewhere the command in Indicator-Sysmonitor will need to be modified. The file needs to be made executable - right click -> Properties -> Permissions and tick Executable box. It also needs to be a file with unix line endings - bash hates windows files and the scripts do not run properly. If you ever get a file with Windows line endings which can happen when you download a script then create a new file under Linux and copy and paste the old contents into it. You can download my latest version from http://www.pcurtis.com/sysmon . Do not open it - Right click -> Save As to download the copy. The changes from the original are in red.

#!/bin/bash
# Script from http://www.webupd8.org/2011/05/how-to-display-network-upload-download.html#more
# Modified by Peter Curtis on 5th October 2011.

#-------------- settings: -----------------------------
netspeed=true
netspeedjoint=true
ram=false
cpu=false

#---------------- initialize ---------------------------
rm /tmp/.sysmon > /dev/null 2>&1
dstat --net --mem --cpu --output=/tmp/.sysmon 1 1 > /dev/null 2>&1

#----------- up/down speed -----------------------------
if [ $netspeed = true ]; then
#upspeed=$(echo $(cat /tmp/.sysmon | tail -1 | cut -d ',' -f2)/1024 | bc)
upspeed=$(echo $(cat /tmp/.sysmon | tail -1 | cut -d ',' -f2)/1 | bc)
upkbmb=$(if [ $upspeed -gt 1024 ]; then
up1=$(echo $(cat /tmp/.sysmon | tail -1 | cut -d ',' -f2)/1024 | bc -l)
echo $up1 | head -c 4
else
echo $upspeed | head -c 3
fi)
#
#downspeed=$(echo $(cat /tmp/.sysmon | tail -1 | cut -d ',' -f1)/1024 | bc)
downspeed=$(echo $(cat /tmp/.sysmon | tail -1 | cut -d ',' -f1)/1 | bc)
downkbmb=$(if [ $downspeed -gt 1024 ]; then
down1=$(echo $(cat /tmp/.sysmon | tail -1 | cut -d ',' -f1)/1024 | bc -l)
echo $down1 | head -c 4
else
echo $downspeed | head -c 3
fi)

#---------------- up/down speed unit --------------------
# upunit=$(if [ $upspeed -gt 1024 ]; then echo "MiB/s"; else echo "KiB/s"; fi)
# downunit=$(if [ $downspeed -gt 1024 ]; then echo "MiB/s"; else echo "KiB/s"; fi)
upunit=$(if [ $upspeed -gt 1024 ]; then echo "KB"; else echo "B"; fi)
downunit=$(if [ $downspeed -gt 1024 ]; then echo "KB"; else echo "B"; fi)
fi

#-------- up/down padding to keep constant width --------
uppad=$(if [ $upspeed -ge 0 -a $upspeed -lt 10 ]; then
  echo ".00" ;
    else if [ $upspeed -ge 10 -a $upspeed -lt 100 ]; then
      echo "0." ;
        else if [ $upspeed -ge 100 -a $upspeed -le 1024 ]; then
           echo "." ;
        fi
    fi
fi)
downpad=$(if [ $downspeed -ge 0 -a $downspeed -lt 10 ]; then
  echo ".00" ;
    else if [ $downspeed -ge 10 -a $downspeed -lt 100 ]; then
      echo "0." ;
        else if [ $downspeed -ge 100 -a $downspeed -le 1024 ]; then
          echo "." ;
        fi
    fi
fi)

#-------- CPU % (Enhanced by Hater Zlin) --------------
if [ $cpu = true ]; then
#cpufree=$(cat /tmp/.sysmon | tail -1 | cut -d ',' -f9)
cpufree=$(cat /tmp/.sysmon | tail -1 | cut -d ',' -f9 | cut -d '.' -f1)
#cpuused=$(echo 100-$cpufree | bc | sed -e 's/..*//')
cpuused=$(echo `printf "%02d" $((100-$cpufree))`)

fi

#------------------- RAM % used --------------------------
if [ $ram = true ]; then
memused=$(free -m | grep buffers/cache | tr -s ' ' | cut -d' ' -f 3)
memfree=$(free -m | grep buffers/cache | tr -s ' ' | cut -d' ' -f 4)
memtotal=$(echo $memused+$memfree | bc -l)
memusedpercent=$(echo 100-100*$memfree/$memtotal | bc)
fi

#------------------ The Indicator Sysmonitor actual output -
echo $(if [ $ram = true ]; then echo Mem: $memusedpercent% \|; fi) $(if [ $cpu = true ]; then echo CPU: $cpuused% \|; fi) $(if [ $netspeed = true ]; then echo ↑$upkbmb$uppad$upunit↓$downkbmb$downpad$downunit; fi)

Open Indicator-Sysmonitor (it should show up as System Monitor Indicator in the menu), then click it on the panel and select "Preferences" and under "Use this command", enter this:

$HOME/scripts/sysmon

Close and re-open sysmon and it should now display upload and download speeds.

I start it automatically by System Settings -> Personal ->Startup Applications -> Add - and fill in the command as indicator-sysmonitor , the name as Netspeed Appindicator and the Description as Displays Download and Upload Speeds.

Enhancements in above script to reduce the changes in width of the display for CPU

I have been emailed some suggested a patch to the sysmon script to show zero padding for cpu so the output width is more stable which is incorperated above - many thanks to Hater Zlin. Changes above are in red.

Enhancement in above script to keep netspeed display a constant width

I have looked at a number of ways to maintain a constant width and a major problem is that the output is in a variable width font - numbers are always the same width but not spaces, dots etc. The only way to pad is therefore to use zeros and dots to maintain the same output. My final code achieves the objective of constant width but lacks elegance! I added two new 'functions' which are added in the code in a new section and modified the section 'Indicator Sysmonitor actual output'. Changes above are in red.

Taming Unity with Compiz

Unity has a very efficient interface in terms of increasing the real estate available for Applications but it lags far behind the Gnome Panels in offering even the most basic facilities. For years I have told beginners that if they they were ever uncertain how to do something then right clicking would almost inevitably give them a route to do it - just try that on a Unity Launcher Icon (Item). The answer to the huge shortfalls lies in extending further the use of Compiz

Compiz is a compositing window manager for the X Window System that exploits most current 3D graphics hardware to create fast desktop effects for window management. A window manager is software that draws a graphical user interface on a computer display – it positions windows, draws additional elements on windows (such as borders and title bars), and controls how windows interact with each other, and with the rest of the desktop environment. With earlier window managers, each program was responsible for rendering its own window directly to display memory. A compositing window manager, however, combines the buffers of each window into a unified framebuffer representing the entire screen.

Compositing window managers such as Compiz can perform additional processing on the buffered windows, applying 2D and 3D animated effects such as fading, scaling, rotation, duplication, bending and contortion, shuffling, blurring, redirecting applications, and translating windows into one of a number of displays and virtual desktops. Computer graphics technology allows for visual effects to be smoothly rendered in real time such as drop shadows, live previews, and complex animation. Since, technically, the screen is double buffered, it does not flicker during updates. The most commonly-used compositing window managers for Linux are Compiz, KWin, and Mutter. Compiz can replace the default managers (Mutter in GNOME and KWin in KDE) because it conforms to the Inter-Client Communication Conventions Manual standard.

Compiz has split and rejoined in the last 7 years and now has all the developments from Beryl and Compiz Fusion back under the same roof. The best source of information is the Compiz Wiki wiki.compiz.org and the description of window managers above draws heavily on wikipedia.

In Compiz, the effects, are implemented as loadable plugins. Compiz plugins include many advanced effects as well as simple features such as Alt-Tab application-switching with live previews or icons, and a feature similar to Exposé. The project has been given a big boost now Canonical Ltd. has hired Sam Spilsbury, lead Compiz developer, to further develop Compiz for Ubuntu.

Unity was initially designed for netbooks and related touch-based devices. It includes a new panel and application launcher that makes it fast and easy to access preferred applications, such as the browser, while removing screen elements that are rarely used in mobile and netbook computing.

Unity has a vertical task management panel on the left-hand side and a menu panel at the top of the screen. Using a sidebar for task management conserves vertical screen space, which is much more valuable on a widescreen netbook. The task panel displays icons for commonly-used applications and programs that are currently running. Clicking on an icon will give the target application focus if it is already running or launch it if it is not already running. If you click the icon of an application that already has focus, Unity will activate an Expose-style view of all the open windows associated with that application.

Unity depends on Compiz to provide much of its functionality which has been lost from the panels to save valuable space. It is Compiz which enables you to move or resize windows, to switch workspaces, to switch windows easily and so on. The lose of the panels and panel space does come at a cost and I find that one is currently far more dependent on the keyboard and keyboard short cuts than in previous Ubuntu releases although Unity/Compiz is looking to satisfy touch screens much more.

Holding down Super now provides a list of keyboard Shortcuts - a real improvement in Precise

Many of the actions which have moved from a panel to a keystroke have actually been present for a long time through earlier versions of Compiz. The Super D shortcut to toggle revealing the desktop works almost the same in 10.04 WARNING: In Precise this is now Ctrl Super D as does Super W to expose all the active windows and Super S for Workspace Switching.

First we must load the Compiz Configuration Settings Manager so search for compizconfig-settings-manager in the Synaptic Package Manager and install it in a terminal by.

sudo apt-get install compizconfig-settings-manager

In 10.04 it will appear in System - Preferences and in 11.04 onwards in System Settings (drop down on far right top icon) -> Personal - in both cases as CompizConfig Settings Manager. This will reveal the full power and complexity of Compiz. Most of the functions and effects are via plugins and you will see each has a tick box to enable it. There are a few features which are built in and these are accessed under General -> General Options (which is the only icon lacking a tick box). This contains many of the basic key-bindings which glue the system together including Ctrl Super D for 'Show Desktop' which it took me ages to find.

Note - some of the simpler actions can be set up using Ubuntu Tweak or other such tools but the Compiz Settings Manager is far more powerful and flexible.

Enhancing Show Desktop - note change in Precise to Cntr Super D

Having talked about Ctrl Super D being 'bound' to the 'Show Desktop' action I will use this as the first example of an enhancement to Compiz for Unity. In the old days 'Show Desktop had a button on the left of the bottom panel - now we have to use Cntr Super D on the keyboard. However we can also bind to mouse gestures such as a rapid mouse movement to a corner or side. So now lets replace the button by a rapid mouse movement to the bottom left corner - a reasonably safe place. In standard desktops (non Unity) you need Normal Visual Effects enabled for this to work - this requires a medium power graphics board Right click on the desktop -> Desktop background -> Visual Effects tab.

Open Compiz Configuration Settings Manager -> General -> General Options -> Key Bindings tag and scroll down to Show Desktop where you will find there are two lines one with a keyboard symbol and the other with a screen symbol. The keyboard is set to Cntl Super D and the screen is disabled. Click on the disabled and a little window appears showing the 'hotspots' - click on the bottom left which will turn green and that's it. Now when you move the mouse quickly to the bottom left corner everything will disappear! Do it again and after a couple of seconds it will be back. It can be mixed with Cntl Super D. This is not something to do on a shared machine - the unexpected and sudden loss of all your windows after a mouse movement causes panic in the average user especially when there is no obvious way back.

Note - Ubuntu Tweak allows you to add a Display Desktop Button to the Launcher

Configuration the Unity Launcher using Compiz - Launcher Icon Size and prevent hiding of Launcher

This is set in the Unity Plugin in the Compiz Window manager which is reached from System Settings (now under the 'Logout' button) -> CompizConfig Settings Manager -> Desktop -> Ubuntu Unity Plugin -> Experimental -> Launcher Icon Size and set to 32 .

The Launcher can be kept fixed rather than being hidden by CompizConfig Settings Manager -> Desktop -> Ubuntu Unity Plugin -> Behaviour -> Hide Launcher and set to Never

The combination of smaller icons makes the use of Unity much quicker and easier, much more like the old panels.

Note - Ubuntu Tweak allows you to configure the Launcher under Precise

Changing the Number of Workspaces

Open CompizConfiguration Settings Manager -> General -> General Options -> Desktop Size and change Horizontal Virtual Size and Vertical Virtual Size (NOT Number of Desktops) to give the number and layout you want.

Note - Ubuntu Tweak allows you to configure the Workspaces under Precise

Enhancing the Window Picker (Super W)

The enhancement that transforms Unity for me is to the Super W action which uses the the Scale Plugin found under Windows in the CompizConfiguration Settings manager (CCSM). Here I have made 2 changes. Firstly under Key Bindings adding a TopRight 'gesture Initiate Window Picker for all Windows and ticked the box for Click desktop to Display Desktop.

We now need to enable two more Plugins. First enable Scale Addons found under Utility -> Appearance tab -> Window Title -> Window Title Display - Highlighted Window only. This displays the window title and workspace it is on when you hover over it in the Window Picker. The text display needs an addition Plugin enabled which is called Text and is found under Image Loading.

The Window Picker (Super W) displays all Windows on all Workspaces and now also works with a mouse gesture to top right and displays the Window Title and Workspace so it can be used instead of the Workspace Selection on the Unity Launcher and also to get to the desktop. you can get back from the desktop by Ctrl Super D or my gesture to bottom left.

Adding the Ring Switcher (Cntr Super Tab and Alt Super Tab) - needed changes for Precise as Super Tab was already used

If you switch Windows and use a lot of workspaces then you may want to enable the ring switcher plugin as an addition to the usual Window Switcher which is activated by Alt tab. It probably needs the Text Plugin. I have bound it to Cntr Super Tab for the current Workspace and Alt Super Tab for all workspaces with the addition of shifts for backward rotation. It looks very pretty but I think it is actually less easy to use unless you have several similar windows and need a bigger image and a clear title to distinguish them.

Adding Quicklist to Unity Launchers I - the hard way by editing files

It is possible to add items to the list of actions you have available when you right click on a Unity Launcher Icon. The default quicklist is just Quit, Keep in Launcher and the application or action although Places and LibraOffice Writer have some additional Quicklist items. See the best currently for specifications on the Unity Wiki . There an excellent article at AskUbuntu - A list of custom launcher quicklists for unity . The easy way is too use one of the Tweaking utilities but I believe it t is best to get an understanding of how to do it my hand before using the tools - you also need to know what you want.

So what sort of quicklist items will save more time in the medium term than they take to create? One obvious for anybody doing system work is the ability to open additional terminals. Another couple are to add opening the file manager in your documents folder/drive and to open the file browser running as root which enable one to do almost anything with system files. The final ones I would pick out are additions to thunderbird to open in the address book or via the profile manager - there are dozens more which people find useful at AskUbuntu - A list of custom launcher quicklists for unity.

Before you start to edit your Unity Launcher Items by hand you need to know about where the 'default' ones are stored and where the ones you have edited need to be stored to over-ride the defaults. Mostly you will find ones in the 'over-riding' folder already but sometimes you need to copy a fresh one in or you may wish to do so if you have messed up one so it does not work. Each of the launcher items is in a sensibly named file with the extension .desktop with the original/default for all users in /usr/share/applications/ and the modified versions which are user specific are in ~/.local/share/applications.

I am going to use a quicklist for 'Home Folder' as an example as it is well documented and some of the GUI Tweak tools do not currently work with. I have also added quicklist items that nobody has documented as far as I know for open nautilus as Root, Computer and Network as well as for my Data Drive.

Copy 'Home Folder' launcher file to your home directory if it is not already present:

cp /usr/share/applications/nautilus-home.desktop ~/.local/share/applications

Open the file for editing in gedit:

gedit ~/.local/share/applications/nautilus-home.desktop

Now a critical step which is missed from the current GUI tool and without which nothing is displayed - find the following line from the file:

OnlyShowIn=GNOME;

Replace the above line with:

OnlyShowIn=GNOME;Unity;

Or in the case of Oneiric there is an addition bug which causes an extra icon to appear in the Unity Launcher unless the OnlyShowIn= line is deleted or commented out completely

# OnlyShowIn=GNOME;Unity;

Now add this text to the bottom of the file, then close and save:

X-Ayatana-Desktop-Shortcuts=Videos;Documents;Music;Pictures;Downloads;Datadrive;Root;Computer;Network

[Videos Shortcut Group]
Name=Videos
Exec=nautilus Videos
TargetEnvironment=Unity

[Documents Shortcut Group]
Name=Documents
Exec=nautilus Documents
TargetEnvironment=Unity

[Music Shortcut Group]
Name=Music
Exec=nautilus Music
TargetEnvironment=Unity

[Pictures Shortcut Group]
Name=Pictures
Exec=nautilus Pictures
TargetEnvironment=Unity

[Downloads Shortcut Group]
Name=Downloads
Exec=nautilus Downloads
TargetEnvironment=Unity

[Datadrive Shortcut Group]
Exec=nautilus --no-desktop /media/DATA
Name=DATA
TargetEnvironment=Unity

[Root Shortcut Group]
Exec=gksudo nautilus /
Name=Open Nautilus as Root
TargetEnvironment=Unity

[Computer Shortcut Group]
Exec=nautilus --no-desktop computer:
Name=Computer
TargetEnvironment=Unity

[Network Shortcut Group]
Exec=nautilus --no-desktop network:
Name=Network
TargetEnvironment=Unity

Log out and log in again to see the changes - you will see nothing until you have logged out and in.

Tools to Tweak Ubuntu to get exactly the configuration you want

As Ubuntu has been developed the ability to configure it using built in utilities installed by default has been reduced. The new settings menus only contain a fraction of the facilities they used to and some of those such as the one covering users has been castrated. The excuse is that some of the changes which an unskilled user makes could seriously damage the functionality of the system. Some of the tools are still in the repositories and we have already covered how to install the Compiz Settings Manager and the Gnome and Unity Configuration managers gconf and dconf. There are a couple more utilities which are built into the repository system but one has to resort to using programs which can only be installed from PPAs. The good thing is that there are at least two very good and well tested Tweaking Utilities for Ubuntu but unfortunately there is no single one which will do everything we want and where facilities overlap there is always the risk that the different Tweaks may interact. Here we are mostly concerned with the Unity Desktop but some of the tools are more widely relevant.

The list of Tweaking Tools and other utilities to restore missing functionality I am using (or have used) follows:

Installing Tweaking Tools

The following few lines will install all the Tools that I use. First the PPAs are installed, then the configuration is updated for all the PPAs (a slow activity) followed by the installations. Some of the lines start with a # to make sure you make a conscious decision to install them! You should cut and paste the lines in turn into a terminal - make sure you get the whole line if you have a small screen and they are wrapped. You will have to answer with a few <Enters> and possibly an odd y <Enter> It is best to only install a PPAs once.

sudo add-apt-repository ppa:tualatrix/ppa #ubuntu-tweak
sudo add-apt-repository ppa:diesch/testing #Unity Settings unsettings
# sudo add-apt-repository ppa:danielrichter2007/grub-customizer #grub-customiser
sudo apt-get update
sudo apt-get install compizconfig-settings-manager gconf-editor dconf-tools ubuntu-tweak myunity unsettings
# sudo apt-get install gnome-tweak-tool grub-customiser

Configuration Settings you might want to 'Tweak'

Editing and Adding Quick Lists the easy way

Remove global Menu, overlay scrollbars and whitelist the systray so applications that use a notification area icon show up on the Unity panel

Change Window, Cursor, GTk and Icon Themes

Configure the Launcher: Size, Autohide etc

Show Desktop Icons for Trash, Computer, Mounted Drives etc and change number of Workspaces

Add 'Show Desktop' Icon to Launcher

Add Hotspots to Desktop Corners

Settings for Unity 2D

Ubuntu Tweak also handles most of Unity 2D settings other than reducing the width of the Unity launcher under Unity 2D (which I need for my Amilo D8830 which has weak graphics) but is not available for Unity 2D in any tool. But there is a way to change the Unity 2D launcher icon size: through a script thanks to Webupd8. To change the Unity 2D icon size, run the following commands in a terminal:

cd
wget http://webupd8.googlecode.com/files/script.py
chmod +x script.py
sudo ./script.py SIZE

In the last command above, replace "SIZE" with the desired size for the launcher icons, for example 32 . Then log out and log back in to Unity 2D.

Handling scripts using the Nautilus Right Click Menu - with the example of the very useful 'Browse as Root' to almost remove the need for using the terminal.

Gnome has the ability to add scripts to give addition actions to the right click menu. It looks for scripts in the ~/.gnome2/nautilus-scripts folder and new menu items appear automatically

This is now much simpler if you use one of the 'tweaking' programs called Ubuntu Tweak. I have cover installing it above

Ubuntu Tweak -> Admins -> Scripts (under Personal) and you will see a long list on the right hand side. Drag, for example' 'Browse as Root' to the left hand side and thats it. You can now close Ubuntu Tweak.

Now when you right click anything you will find a new item called Scripts on the menu which contains, in this example, Browse as Root which opens nautilus, the file browser, as Root.

There are lots of other useful scripts available that you can add to the list

Reset Unity Launcher icons completely

If you have made some serious mistakes and want to reset the Unity Launcher icons to their initial state, run the following command:

unity --reset-icons

Creating new Unity Launchers and Desktop Launchers

There is no direct way to create a new Desktop or Unity Launchers to, for example, run a script you have written - in the old days you could reach a screen to create them by right clicking the desktop. You can still open that screen for creating a launcher by running the following command if you have gnome-panel installed by.

apt-get install gnome-panel

This following creates a Unity Launcher:

gnome-desktop-item-edit ~/.local/share/applications/ --create-new

You can do the same on the desktop by:

gnome-desktop-item-edit ~/Desktop --create-new

You could of course close the circle by creating a custom launcher to launch a launcher creator or add it to the nautilus right click menu - I leave that exercise to the reader!

Fudge to allow temporary use of Gnome Panel

You can get your old fashioned gnome panels back on a temporary basis to enable you to, for example put a launcher on the desktop. Enter in a terminal:

gnome-panel

It will look a mess with the Gnome panels over the top of the Unity top panel but it will work for long enough for you to add some desktop application launchers from the Applications dropdown menu. You can exit by Ctrl C in the terminal.

 

Modifying Themes for Unity

I have had to change my themes from those used under Lucid and I also put the control icons back on the left side as I had modified this for Lucid - I am currently using Ambience customised with either the Tangerine or Tango Icons and a background picture of the QE2. These can be chosen using any of the main Tweaking tools such as Ubuntu Tweak as above. I understand you currently need to use either Ambiance or Radiance for the basic dark and light themes to get all the new benefits in the top panel. Other themes are being updated for Unity. The Icons sets I chose were not optimised for Ambiance and did not display the workspace switcher with a custom icon until I made the modification which follows.

Find a suitable icon - I used /usr/share/icons/Humanity/apps/48/gnome-panel-workspace-switcher.svg which is used in some of the Ubuntu themes

Copy and paste into /home/yourusername/.local/icons folder using a root browser and right click menus

gksudo nautilus /usr/share/icons/Humanity/apps/48

Tip - once the root browser is open then start typing the name and you will gradually reach it ready to copy.

Rename it to workspace-switcher.svg

Optional - change owner to yourusername before you leave root browser

You should now have a nice purple workspace switcher icon

Alternatives to changing to Unity

Natty 11.04 was be the last version of Ubuntu to have the alternative of the conventional Gnome Desktop although it is possible to add the new Gnome Shell. Lower performance machines without advanced 3d graphics are catered for by Unity-2d which has none of the benefits of Compiz. So what are the alternatives if you do not want a normal functional system rather than the Unity experience.

1. Use Xubuntu with XFCE desktop or Lubuntu with the LXCE desktop instead of Ubuntu with Unity.

A lot of influencial people including Linus Torvalds do not like the Gnome 3 and the new Gnome Shell or alternates like Unity. See http://news.softpedia.com/news/Linus-Torvalds-Drops-Gnome-3-for-Xfce-Calls-It-Crazy-215074.shtml (the original post at https://plus.google.com/106327083461132854143/posts/SbnL3KaVRtM was missing last time I looked) for comments on the way things are going from Linus. At the time they were using the steadily evolving XFCE window manager used in Xubuntu since 10.04.

I have tried Xubuntu for a while but I have now shifted to Lubuntu which has just become a fully supported official release and although Lubuntu 12.04 is not an LTS release they have promised 18 months support. It uses the LXCF desktop and has an even small footprint than Xubuntu and a more pleasing interface to me. I now have Lubuntu on all my lower powered machines including my two legacy machines a low powered laptop (500Mz 192Kbytes) and desktop (700Mhz and 392 Kbytes) which are now quite usable and useful machines. I can add in any standard Ubuntu program I require. Lubuntu has risen rapidly in popularity and now ranks well above Xubuntu.

2. Update the Long Term Support version 10.04 Lucid Lynx using PPAs

Install Firefox 12+ in Ubuntu Lucid Lynx 10.04

Lucid is a LTS version with at least 3 years support so it is still possible to continue to use it for another year if you already have it installed. Many of the programs are looking tired but most have PPAs with the latest versions. Precise uses the latest Firefox 12 and this is now available from the mozilla teams firefox-stable PPA.

The firefox-stable PPA which can be installed in Lucid by the following sequence of commands in a terminal:

sudo add-apt-repository ppa:mozillateam/firefox-stable
sudo apt-get update
sudo apt-get upgrade

This version is significantly improved but you may need to reconfigure your toolbars as items such as the + for a new tab may have gone. It is easiest to reset the toolbars to the default then start again when you have seen the changes. I have also moved the tabs back to their usual place. You may find that some of the Extensions need to be updated and some may not yet be compatible.

Install the latest Thunderbird in Lucid (LTS Version) from the thunderbird-stable PPA

The latest version of Thunderbird is version 12.0 which is available the mozilla teams thunderbird-stable PPA which can be installed in Lucid (and higher) by the following sequence of commands in a terminal:

sudo add-apt-repository ppa:mozillateam/thunderbird-stable
sudo apt-get update
sudo apt-get upgrade

The only problem that a few of my favourite extensions have either not been updated or do not work properly with natty. Sync Kolab needs the Nightly to be installed. Otherwise it seems to be a significant step forwards and I changed on all my machines as soon as the extensions were working. The other extension updates were all in place before 12.0 was released so this bodes well for the future.

Fixes for Firefox and Thunderbird Extension Updates

Firefox and Thunderbird have gone onto a regular version update calendar which means that every extension has to be updated every few months. If the extension is not updated to include the new version in the range of versions under which it will run it will be disabled. The changes from version to version are minor and may not effect most extensions. There are two ways round this problem:

Edit a file in the .xpi archive before you load it. I covered that in my Diary part 19 but the folowing is much simpler.

Add a new extension which enables you to run the extensions. This is intended for testing and reporting but gives a short term solution until the extensions are updated. To quote: "After installing the Add-on Compatibility Reporter, your incompatible extensions will become enabled for you to test whether they still work with the version of Firefox or Thunderbird that you're using. If you notice that one of your add-ons doesn't seem to be working the same way it did in previous versions of the application, just open the Add-ons Manager and click Compatibility next to that add-on to send a report to Mozilla." This is a slightly risky solution so make sure you back up your profile first. If it all goes pear shaped you can start Firefox/Thunderbird in Safe Mode to disable everything again by using a terminal command:

firefox -safe-mode
thunderbird -safe-mode

Search for "Add-on Compatibility Reporter" and install as usual from Tools -> Add-ons -> Drop down list to left of the search box after you have downloaded it. It is the same for Firefox and Thunderbird.

Install LibreOffice 3.5+ in Lucid Lynx using a PPA

LibreOffice is a fork of OpenOffice resulting from the games being played by Sun and is being increasingly used by all Linux distributions. It looks and feels almost identical and I have upgraded one of my machines to use it as there is a PPA with more up-to-date versions than the equivalent OpenOffice version in Lucid. This is again based on the procedures on Web UPD8 on how to install LibreOffice from a PPA

LibreOffice has an Ubuntu PPA so it's easy to install and stay up to date with the latest LibreOffice versions. The LibreOffice packages in this official Ubuntu PPA are backported from current releases so they come with all the patches/optimizations applied to LibreOffice for Ubuntu. Important note: You must remove OpenOffice so you cannot have both in the same time!

To remove OpenOffice, add the LibreOffice Ubuntu PPA and install it in Ubuntu 10.04 and higher, use the following commands in a terminal:

sudo apt-get remove openoffice*.*
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get install libreoffice
sudo apt-get install libreoffice-gnome
sudo apt-get install language-support-en

The last two commands integrate Libreoffice with the gnome desktop environment and replace the spell checker and the language support packages which were removed with OpenOffice (you can replace "-en" with your language in the final command).

The version of OpenOffice is currently 3.5 and the integration has a few problems so this is a good update to make to Lucid.

Instructions for installing the latest versions of Wine from the WineHQ PPA:

The WineHQ web site cautions that the packages are beta packages. This, they say, means they will periodically suffer from regressions, and as a result an update may break functionality in Wine. If the stable Wine version works for you, then you may not want to use these beta packages.

Run the following in a terminal:

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

Overall Conclusions

I now have Ubuntu Unity in use on both our netbooks and have no wish to go back - the extra usable space is worth the many hours of tweaking to me. They are however slowing down. The latest version is very resource hungry and I have backed off to Lubuntu 12.04 on our older laptops already.

Ubuntu should never have released Unity for mainstream Desktop machines, especially so early in the development cycle - it was barely a beta for Natty. I understand that they wished to get feedback and refine everything and that the Gnome developments meant a do nothing was not a viable option but a few months delay could have prevented the potential lose of many existing users at that point. It is still too early to know if they have succeeded in Precise - there were some improvements in Oneiric but also some extra bugs and few of the bugs above had actually been resolved - worse still Precise does not yet have a stable feel to it.

In any case I question the whole philosophy of space saving at the expense of the ease of use and feedback from panels at top and bottom of a screen for a desktop. Hardware is cheap - if you want the extra screen area then buy a bigger screen. The cost differential is a few tens of pounds for a bigger screen for a desktop and you have so much easier operation. Laptops are an open question but as the panels could be hidden easily in gnome - I think that is the way to go for the occasions when area is at a premium on a laptop.

So overall Unity is useful on a notebook but should be relegated to being a useful adjunct to the other tools on desktops and a better interface developed before all the users rebel.

Before You Leave

I would be very pleased if visitors could spare a little time to give me some feedback - it is the only way I know who has visited, if it is useful and how I should develop it's content and the techniques used. I would be delighted if you could send comments or just let me know you have visited by Sending a quick Message to me.

Home Pauline Howto Articles Uniquely NZ Small Firms Search
Copyright © Peter and Pauline Curtis
Layout revised: 11th June, 2015
Settings - opens in a new window or tab Link to W3C HTML5 Validator