Home Pauline's Pages Howto Articles Uniquely NZ Small Firms Search
Height Padding
Ubuntu Unity - Evolution or Revolution
Experiences with Natty and Oneiric

Fun with Ubuntu Linux | The Road to Freedom - The Journey Starts |The Road to Freedom - Base Camp | Ubuntu All Together - Sharing, Networking, Backup, Synchronisation and Encryption | Ubuntu on the Lookout - Browsing, Email, Contacts, Calendars and Tasks| Ubuntu on the Move | Ubuntu on the Take | Ubuntu making Music | Ubuntu Unity - Evolution or Revolution | The MSI Wind U100 Netbook for Global Communications and Computing

This page is being updated to extend my experiences with the new Ubuntu Unity Desktop from Natty Narwhal 11.04 to Oneiric Ocelot 11.10

The Contents list reflects pretty much what I want and all the sections are written and linked for Natty and have been progressively checked and updated for Oneiric. This version was largely frozen at the point I started on Precise Pangolin 12.04 the new LTS issue.

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.

One of our MSI Wind U100 netbooks have been used as the guinea pigs for this and one was updated on the Internet first to 10.10 and then to 11.04. The upgrade to 10.10 froze and had to be restarted but fortunately picked up where it had left off from its cache and completed successfully. The next upgrade to 11.04 Natty went without incident and there seem to be no new hardware issues on the U100 although the previous power tweak still seems to be needed. The other had a fresh install and uses an ext4 file system and has now been updated by an internet Distribution Update to 11.10

The big question before starting is "Is it ever 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 is true of Natty where the Connection (network) Manager and Bluetooth support is 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. Once you have made the decision to go to Natty the distribution update to Oneiric seems logical.

Natty offers a choice of Desktop but it is threatened there will be no choices when it comes to 11.10 and the next LTS version 12.04. Change is inevitable because Gnome is also moving to a major new version with an enhanced desktop (Gnome Shell). This has 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 version of Ubuntu - it is more like an early beta release, without the promises of quick fixes. That said, after a month of hard work it is working quite well on our netbook, I rarely switch back to the Classic Desktop from Unity and I am thinking of upgrading the second of our Wind U100s.

Useful Enhancements in Ubuntu

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. Natty 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 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. Launcher
  2. Launcher Items
  3. Workspace Switcher
     -- Menu Bar --
  4. Window Title
  5. Application Menus
  6. Status Menus (Indicators)
    • Network Menu
    • Sound Menu
    • Messaging Menu
    • Clock
    • Me Menu
    • Session Menu
      others may be present
  7. Window Decoration
  8. Window Buttons
  9. Toolbar
  10. Status Bar
  11. Desktop
  12. Ubuntu Button (Home Button)

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 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!

Unity Keyboard and Mouse Shortcuts

Ones I find useful are coloured

Ones I found did not work at present are Grayed out

Keyboard

Launcher

Dash

Panel

Window Management

Window Placement

If you cycle through the same key Unity will cycle through different placement widths, so experiment by hitting the numkey multiple times:

Workspace Management

Screenshots

Mouse Tricks

Launcher

Window Management

 

Updated or changed default Applications

Firefox Versions from the 'proposed' update channel

Firefox and Thunderbird have gone onto a regular version update calendar which means that every extension has to be updated every few months. Firefox is now updated from version to version if the 'Proposed' update channel is enabled.

Firefox and Thunderbird Extension Updates

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. It seems that 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 so I will ignore it here.

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.

LibreOffice 3.x

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.

Enhanced Connection Manager

Mobile Broadband signal strength is shown in the Connection Manager

The signal strength is now displayed for the active mobile broadband connection in the connection manager icon in the Indicator Area. It has the same vertical bars format as a wifi connection. The display may depend on the theme in use so start with the basic Ambience theme.

Connections can be made to modems in standard phones via Bluetooth using the Connection Manager.

There is a new method of making a bluetooth connections to modems in phones which then appear in the Connection Manager. The new way is described in https://help.ubuntu.com/community/BluetoothDialup for 10.10 and is a big step forwards although it does not work for some 'tricky' phones like those running Windows mobile, but nor do any standard methods. The following tutorial assumes the Bluetooth problem in Natty has been fixed or you have fixed the errors as described below in Bluetooth Startup Bug.

When Bluetooth is enabled on, for example, my MSI Wind U100 a Bluetooth icon appears in the Indicator Applet in the top panel. Right Click the icon -> Preferences to see if you already have any Bluetooth connections set up from earlier versions as you need to clear them and set up the device (including 'pairing' again) to get to the new option to make a Dial Up Networking (DUN) connection to the modem in the phone in a way it will appear in Network Manager - this is alluded to in the reference above.

So delete any existing connections to the phone - Set Up the device again using the Set Up New Device button, work through the wizard to pair the phone and at the end it offers a tick box to add a DUN connection - this then takes you to wizard to add the APN etc and eventually the connection ends up in the Network Manager (In System Applet in top panel) but, be warned, you do not seem to be able to edit the settings so if they are wrong you have to start again by deleting the device etc.

 

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

Problem - Synaptic Package manager is no longer installed by default

This is easy to install either using the Ubuntu Software Center or a terminal

sudo apt-get install synaptic

The new Ubuntu Software Center is so unprofessional this is a must and all my descriptions below either use a terminal or the Synaptic Package Manager.

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 -> Key Sequence to Kill the Xserver and tick box for Control Alt Backspace. The sequence is the same for Oneiric but you have to look closely to find the links on the pages!

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.

These intermittent freezes could be a problem with my use of mousemu alongside unity which also makes use of the 'Super' key. They seem to have been reduced but not totally removed with the latest updates of Natty and Oneiric.

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 all 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 gnome-tweak-tool

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.

In Oceiric using 'all' results in an duplicate but impotent power manager icon showing up - a bug ( see https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/833397 ) which will hopefully be sorted soon.

Bluetooth Bugs

Most of the problems in this section are address in Oneiric Ocelot and higher but such problems have a habit of returning!

I found great difficulty in making a Bluetooth connection to my mobile phone on searching I found there is currently a problem with Bluetooth see https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/762964 and Bluetooth needs to be restarted after a Cold Boot, Restart, Suspend and Hibernate. This seems to be solved in Oneiric. There are further problems if you want to use Bluetooth to connect to a modem in mobile phone as the devices required are no longer automatically connected so programs such as gnome-ppp will no longer work.

Short-term Bug Fix to allow testing of Bluetooth - Restart Bluetooth in a terminal - not needed in Oneiric.

This is a simple way to allow one to test and use bluetooth but has the disadvantage that a command has to be entered and run in a terminal after every startup, reboot and when leaving suspend and hibernate. It may be an acceptable way to proceed for occasional use if one assumes the bug will be quickly fixed!

Open a terminal by Applications; Search for Terminal and in the terminal enter:

sudo /etc/init.d/bluetooth restart

Bug workaround - A Way to automatically start bluetooth - not needed in Oneiric and Precise

I have tried adding /etc/init/restart bluetooth to /etc/rc.local which is run after all other init scripts. This works most of the time at cold starts and restarts but does not work after a return from suspend - there must be a better or extra place to place it for Natty

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Addition to ensure bluetooth is restarted
/etc/init.d/bluetooth restart

exit 0

Bug workaround - A Way to restart BlueTooth after a Suspend or Hibernate - not needed in Oneiric and Precise ???

I have found out that the scripts which are run on Suspend, Hibernate, Resume and Thaw are in /etc/pm/sleep.d where I created a new file as root called 99_bluetooth-restart and gave it execute permissions. It can be created most easily by starting nautilus (the file navigator) and using right click menus for a new file and then to set the permissions by .right clicking -> Properties -> permissions and setting the execution tickbox

gksudo nautilus /etc/pm/sleep.d

Now we can edit the file by:

sudo gedit etc/pm/sleep.d/99_bluetooth-restart

The contents have to follow a strict format I copied from other files giving:

#!/bin/bash
#
#This is run automatically after returning from a suspend or hibernate
#It restarts Bluetooth
#
case "$1" in
thaw|resume)
/etc/init.d/bluetooth restart
;;
*)
;;
esac
exit

There is a brief explanation of the file format at http://ubuntuforums.org/showthread.php?t=1484156

The end result of the three modifications mean that Bluetooth is turned on correctly with the rfcomm bindings (Bluetooth Device creation) carried out for 95% of the time and an extra suspend and resume will enable it almost for certain!

Problem Area - Not all phone modems are detected by Network Manager and still require use of a dialler applications such a gnome-ppp

The new method of connecting a Bluetooth Modem enabled phone using the Bluetooth Manager and Network Manager described above does not work with fancy phones such as Windows Mobile Devices because it is unable to detect and obtain details of these phones (Windows Mobile phones do not follow the appropriate standards properly). You therefore need to use a connection application such as the excellent gnome-ppp which I have been using for many years.

I have found there is yet another problem with using Bluetooth through Gnome-PPP in that the rfcomm devices are not being created in Natty even when Bluetooth running correctly - it took me a while to remember that this is actually a problem I have met before and involving editing a system file in Lucid. I will reproduce the section from Ubuntu on the Move here for completeness:

Fix for a bug where the bluetooth modem (rfcomm) devices are not automatically created (Karmic -> Natty) - Oneiric and Precise seems to have been fixed

There is a bug (see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/416056) starting in Karmic and the rfcomm devices are not automatically started - so one sets up the configuration file rfcomm.conf but the rfcomm program is not run so the rfcomm devices are not created. You can check by looking in /dev to see if /dev/rfcomm0 is present. The obvious thing to do is to modify /etc/init.d/bluetooth to add rfcomm bind all at the end of the startup sequence and rfcomm release all at the start of the stop sequence. So, in a terminal open the file for editing by typing:

gksudo gedit /etc/init.d/bluetooth

Note that you should make any backup of the file /etc/init.d/bluetooth in a different folder as everything in the init.d folder is run at startup and you will end up doing everything twice in an unpredictable order.

The file /etc/init.d/bluetooth is slightly different from Lucid although the changes are similar and are shown below for Natty.

case "$1" in
start)
#currently this init script exists only because of what appears to be
#an egg and chicken problem
# bluetoothd normally starts up by udev rules. it needs dbus to function,
# but dbus doesn't start up until after udev finishes triggering
#
log_daemon_msg "Starting $DESC"

if [ ! -f /sbin/udevadm.upgrade ]; then
udevadm trigger --subsystem-match=bluetooth --action=add
log_progress_msg "bluetoothd"
fi

log_end_msg 0

# Additional code to automatically bind the devices set up in rfcomm.conf during startup
rfcomm bind all

;;
stop)
# Additional code to automatically release the devices set up in rfcomm.conf when bluetoth stopped
rfcomm release all

log_daemon_msg "Stopping $DESC"
pkill -TERM bluetoothd || true
log_progress_msg "bluetoothd"
log_end_msg 0
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;

Running Gnome-PPP under all versions of Ubuntu including 11.10 and 12.04

Gnome-PPP uses the system tray so the fix for the System tray has to carried out before one can run it.

Gnome-PPP - Modifications to PPP Options to prevent timeouts with Mobile Broadband Connections (all versions of Ubuntu including 11.10)

Some modifications are required in /etc/ppp/options as the default settings cause timeouts with some mobile connections. This is a general problem rather than one specific to natty which I have covered elsewhere but will reproduce for completeness.

These settings can not be changed via the Gnome-PPP GUI interface and I change them in the the 'master' pppd (I think that stands for ppp daemon) set up file which is /etc/ppp/options so the changes apply to all users. We can look at the current options which are set by:

sudo egrep -v '#|^ *$' /etc/ppp/options

It is desirable to make a backup before editing the /etc/ppp/options file so to make a copy and open a terminal:

sudo cp /etc/ppp/options /etc/ppp/options_bak
sudo gedit /etc/ppp/options

I normally make three changes to the file. The first two are essential for most GPRS connections and disable the sending and checking of the echo response sent to check the connection is alive - the echo is not implemented by most mobile service providers and the default result is that 4 echo response requests are sent at 30 second intervals and after the 4th failure to receive a response the connection is broken. If you are disconnected after 2 minutes that is the cause. The new values of 0 inhibit the sending and checking:

lcp-echo-failure 0
lcp-echo-interval 0

The third change is essential, as far as I know, for the Vodafone PCMCIA Connect Card but does not impact other connections significantly so I do it routinely so I do not forget. It involves disabling negotiation of Van Jacobson style IP header compression by un-commenting

-vj

I have also tried modifying the /etc/ppp/options file to add an extra delay before connection as I was sometimes not getting a correct DNS delivered using gnome-ppp with the Vodafone but it seems to have little benefit but you can try it but only if you have problems as it will slow down making all connections.

connect-delay 5000

Note the information in the /etc/ppp/options file does not recommend that changes are made in this file. The documentation ( man pppd ) says that if there is a file ~/.ppprc which is used for user default options which could be used instead of modifying /etc/ppp/options - I have not tried that method as the simple way works for me and gives me a working system. I have the attitude that "if its not broken don't fix it" and this way works for all users. The changes in /etc/ppp/options were not overwritten during a Distro Upgrade

Once all these fixes were complete I can use the T610, O2 XDA Exec and Palm to connect to the Internet via bluetooth just as I could on earlier versions of Ubuntu. There are a number of special techniques needed to use the XDA and Palm because they run Windows Mobile 5 which does not follow the 'rules'. This is why the new methods using network manager do not work - Windows Mobile Phone are not detected properly by Ubuntu Natty 11.04 but manual access via Gnome-PPP is fine.

Fix to AppArmor to use a Firefox Profile on a separate drive/partition under Ubuntu Natty 11.04 and higher

I have always used a separate partition/drive for my data as well as having a separate partition for my home folder. When I upgraded to Ubuntu 11.04 I found none of my profiles would run under Classic Ubuntu or Unity. They still ran perfectly when I used the 'straight' Firefox 4 firefox-mozilla-build from the Ubuntuzilla PPA but that did not integrate with the Unity so that was not a long term solution. The error message on trying to start Firefox was:

Firefox cannot use the profile "??????" because it is in use. To continue, close the running instance of Firefox or choose a different profile.

This message is apparently given if the profile is locked or if the profile can not be found. It is clearly not a stale lock file as it also occurred when I created a new profile so it would seem Firefox cannot find or has access blocked to the Profile.

I eventually narrowed the problem down even further and found my existing profiles would run in the default location ~/.mozilla/firefox or in a sub-folder below that location but nowhere else even via a symlink in ~/.mozilla/firefox. I could only create new profiles in the same locations. [ Click to reveal all the stages I then went through before finding the probable solution ]

The breakthrough came with a suggestion on AskUbuntu that I checked the AppArmor-Profile for Firefox. AppArmor ("Application Armor") is a security module for the Linux kernel designed to proactively protect the operating system and applications from external or internal threats, by enforcing good behaviour and preventing application flaws, even unknown ones, from being exploited. AppArmor security policies completely define what system resources individual applications can access, and with what privileges. AppArmor works by implementing security profiles (apparmor-profiles) that restricts the capabilities of protected programs. Ubuntu has included AppArmor since 7.10 but up till now the apparmor-profile for firefox has present but not enabled.

This looked a likely cause of my problems but it took a lot of searching and background work over many days before I came up a very short and easy long term solution. [ Click to reveal all the background, detailed commands and terminal output from configuring AppArmor. ]

The bottom line is that any local modifications required to the 'policies' used by apparmor for firefox can just be added to the file /etc/apparmor.d/local/usr.bin.firefox and will remain in force through any system and firefox upgrades . In my case I want to allow access to the folder Profiles on any fixed drive, USB drive or encrypted volume from Truecrypt mounted at /media and read access to the whole of those drives

Edit the file in a terminal by:

sudo gedit /etc/apparmor.d/local/usr.bin.firefox

The resulting file in my case was:

# Site-specific additions and overrides for usr.bin.firefox.
# For more details, please see /etc/apparmor.d/local/README.

# Additions made by Peter Curtis 16 May 2011 to access profiles
# on removable media,additional filesystems and encrypted volumes
# in folder Profiles and to have read access to everything.

/media/** r,
owner /media/*/Profiles/** wmk,

Firefox has so far worked exactly as expected and required under Ubuntu 11.04 and through a Distribution Upgrade to 11.10 since this addition to /etc/apparmor.d/local/usr.bin.firefox whilst enjoying a high degree of protection from AppArmor.

Workround for Problem - Sun Java is no longer available in the Official Ubuntu Repositories

Sun Java is no longer in the official repositories for Oeneric due to problems with licences but it is available from a private PPA so it can be installed by

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin

or you can install the latest OpenJDK Java 7 by

sudo apt-get install openjdk-7-jre

 

 

Wine is Corked - seems still the case in Oneiric - Precise is unknown

There seem to be several serious problems with use of Wine under Unity

Natty/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 set up to 100%

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

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 does 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 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 contains a line specifying a StartupWMClass=Wine and these lines all need to be deleted or commented out. 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.

I have now 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 now putting my input in there.

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.

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 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!

I have not used Oneiric enough to be sure the fix is appropriate on 11.10 or if it has been fixed.

Additional Problems with Wine 1.3.31 and Dreamweaver - does not seem to occur under Wine 1.4 in Precise

Pre Oneiric: I have found that some of my programs such as Dreamweaver crash frequently with the latest versions of Wine from the WineHQ Ubuntu PPA using both natty and oneiric. This is certainly the case with version 1.3.31 so I have backed off to the stable versions Wine 1.2.x where possible. I disabled the PPA using tthe Synaptic Package Manager -> Settings -> Repositories -> Other Software tab -> Untick Wine then Uninstalled wine, wine1.3, winetricks, wine-gecko and ttf-symbol-replacement then installed wine1.2, winetricks and wine1.2-gecko. Currently I am editing this using wine 1.2.3 and Ubuntu Natty 11.04 with Unity. That has seemed to solve the problems under 10.04 and 11.04.

Oneiric: The Wine 1.2.3 version did not work at all with Oneiric so I had to reload 1.3.28 which was the version in the standard Ubuntu repository rather than the WineHQ PPA and that seems OK. I will just have to make sure it does not update as far as 1.3.31.

 

New Firewire stack does not work with some old Pinnacle Capture Cards

There is a new firewire (IEEE1394) implementation in 11.04 and higher and the old one is no longer available. My Firewire card was detected but the whole machine locked as soon as I plugged in a device. It took me a while to find a solution and I had to capture video by running an earlier LiveCD. In the end I found this is a known problem and is mentioned in https://ieee1394.wiki.kernel.org/index.php/Juju-Migration and is a problem with some Pinnacle firewire cards and a few other less common interface controllers chips/cards. What fooled me was the kernel only panics when the Firewire device is pluged in and detected. I have therefore got another couple of old PCI Firewire cards out of the cupboard and they both work fine.

Preventing need for login password when returning from Suspend in Oneiric

It used to be possible to not have the screen lock on suspend while still having the option to manually lock the screen in the session menu in Lucid and Natty (Gnome 2). That is no longer possible and has been filed as a bug https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/871560 .

The following is only a workround because it disables screen locking system wide and one can no longer lock a screen manually when, for example, one has sensitive documents displayed.

Type the following command in terminal to inhibit the request for a login and password when returning from a suspend. Do NOT sudo it, it must be for the current user.

gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'

There is more on this problem and some useful introductory information on use of gsettings at http://ubuntuforums.org/showthread.php?p=11395502

Tips and Tricks to get the best from Unity

Modifying Themes for Unity - new tools need to be added for Precise.

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.

Under Oneicid you need to install an Advanced Settings program to get back to where you were with earlier versions and customise themes.

sudo apt-get install gnome-tweak-tool

I understand you currently need to use either Ambience or Radiace 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 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

 

A Netspeed AppIndicator for Ubuntu with Unity - tested under Oneicid and can be used under Precise but not via PPA

The most important missing facility I needed for Ubuntu 11.04 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

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 6 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.

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 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 10.04 it will appear in System - Preferences and in 11.04 in System Settings (bottom of 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 Super D for 'Show Desktop' which it took me ages to find.

Enhancing Show Desktop (Super D) - checked with Oneiric

Having talked about 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 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 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 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.

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

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.

Changing the Number of Workspaces - checked with Oneiric

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. There is a bug which can be exploited in Natty to hide the workspace switcher in that if the workspaces are in a row or column rather than a rectangle the Workspace Switcher is not displayed

Enhancing the Window Picker (Super W) - checked with Oneiric

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 Super D or my gesture to bottom left.

Adding the Ring Switcher (Super Tab) - checked with Oneiric

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 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. It probably needs the Text Plugin. If using it with many Workspaces then the Super Tab could be bound to All Windows and Workspaces instead of using Super Alt Tab every time.

Quicklists for Unity Launchers - checked for Oneiric but workround for new bug required after Distribution Upgrade - better ways using tweaking tools in Precise

This is well worth doing and makes the Unity Launcher much more powerful.

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 is a simple tool described on Webupd8 and an excellent article at AskUbuntu - A list of custom launcher quicklists for unity . The tool will be very useful but is currently not foolproof so it is best to get an understanding of how to do it my hand before using the tool.

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 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 the GUI tool does not currently work with it because an additional modification is needed. 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.

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

The previous section only extending existing 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. 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 - I leave that exercise to the reader!

Fudge to allow temporary use of Gnome Panel - works in Precise once gnome-panel is installed

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.

Some notes on upgrading to a mostly fresh install of Natty Narwhal 11.04 from Lucid Lynx 10.04

I described in the introduction how I upgraded one of my systems progressively from Ubuntu Jaunty 9.04 through to Natty 11.04, mostly with success but with a few heart stopping moments. This long upgrade path tends to leave a few loose ends behind and does not upgrade things like the type of file system - Natty has moved to the ext4 file system and the boot loader also does not get upgraded to Grub2 meaning you do not get the benefits of a faster boot-up.

The second machine was therefore given a fresh install of the operating system but I retained all the user information - in may case that is very easy as it is all in the Home folder and I have partitioned all my disk drives so /home is mounted on a separate partition: OK that still remains an ext3 file system but the gains in changing are small. The downside is that every extra program has to be reinstalled after which it picks up its user configuration and data automatically for all the users.

I have a script which I try to keep updated with all my programs to make re-loading them easy. It is broken down into short sections so when one is short of bandwidth one can just add what you need. I also keep a couple of folders where I keep copies of any of the system files I have edited which get overwritten in a clean install. I also keep copies of any programs that have been installed from .deb files - there are very few programs which are not in the repositories these days - Truecrypt and Picasa are the only two that come to mind now Adobe Acrobat and Google Earth are available through the Software Centre.

Another way of saving a lot of download time and money if you have several machines is to copy the cached archive of downloaded programs and updates from the first machine you update each time to the others. It is in /var/cache/apt/archives so you will need to use a root browser to find and copy them via, say a USB stick. When you come to install or update apt or the Synaptic Package Manager will find them. After six weeks I found I there were 618 mbytes of updates and extra programs I had loaded which was very worthwhile saving in downloads when operating mobile.

sudo nautilus /var/cache/apt/archives

The detailed procedures are all fairly well written up for Lucid and little has changed. In summary, I always back up the home folder regardless of what I plan to do using a command line program into a tar archive because that way all the symbolic links and permissions are retained. Then I install using a CD and choosing the partitioning option (now called other something!) which allows one to specify which partitions are reformatted and the mount points. One obviously leaves the partition holding the /home folder unformatted and just remounts it at /home. This time I chose to reformat the root partition / to be an ext4 file system which is the latest journaling (for error prevention) format. The installation seemed much quicker than usual.

I then manually mounted my ntfs partition which is/was shared with my dual booted windows system. That involves modifying /etc/fstab. From then on it was the usual loading of programs (using my loadstandardprograms-natty or loadstandardprograms-oneiric script) and following the procedures above to get round the various bugs and tune the system how I want. I used this page to do everything so it was a good cross check although I did copy all the .desktop files from the other machine and a few of the system files like /bluetooth/rfcomm . In fact all the bug fixes and configuration worked so it means the end results were not dependent on the earlier steps.

Alternatives to changing to Unity

Unless there is a huge user pressure Natty 11.04 will be the last version of Ubuntu to have the alternative of the conventional Gnome Desktop or the new Gnome Shell. But for now there are alternatives.

Natty - Choose the conventional Gnome Desktop instead of Unity Desktop

This can be done at login - once the user has been chosen a series of choices are available in a bottom panel including the desktop - the desktop choice is sticky. As far as I can tell so far the settings are largely independent in both although the Desktop remains the same. That option was planned to go with 11.10 unless the protests reach an even higher level - I found alternatives although well hidden! - click the little 'round' icon beside your name to change your default. The new Gnome Desktop/Panel is even worse than Unity.

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 https://plus.google.com/106327083461132854143/posts/SbnL3KaVRtM for comments on the way things are going from Linus. They are using the steadily evolving XFCE window manager used in Xubuntu 10.04. I now have that on my two legacy machines a low powered laptop (500Mz 192Kbytes) and desktop (700Mhz and 392 Kbytes) to assess as neither can/will run Unity happily. I have now shifted all my lower power machines to Lubuntu 12.04 which is a issue with 18 months support which has an even small footprint and a more pleasing interface to me. I then add back the facilities I require.

Update the Long Term Support version 10.04 Lucid Lynx using PPAs

Install Firefox 5/6/7+ in Ubuntu Lucid Lynx 10.04 (Long Term Support version)

Lucid is a LTS version with at least 3 years support so it is still possible to continue to use it. Many of the programs are looking tired but most have PPAs with the latest versions. Natty uses the latest Firefox 5 and this is now available from the mozilla teams firefox-stable PPA. Note you should not use Ubuntuzilla PPA with Natty as the versions there do not integrate with the Unity Desktop or AppArmor and you should remove the repository before upgrading.

The thunderbird-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 6.0 which is available the mozilla teams thunderbird-stable PPA which can be installed in Lucid (and Natty) 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 many of my favourite extensions have either not been updated or do not work properly with natty. At present QuickMoveButton is not updated to thunderbird 5.0 and many other did not cover 6.0. 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 extension updates were all in place before 7.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. It seems that the changes from version 5 to 6 and 7 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.4+ 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 3.2 and the integration has a few problems so this is possibly 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 tuning to me. They are however slowing down. The latest version is very resource hungry and I have backed off to Lubuntu 12.04 to avoid Unity on 4 of our machines already.

Ubuntu should never have released Unity so early in the development cycle - it was barely a beta rather than a release candidate for Natty. I understand that they wished to get feedback and refine everything once more with 11.10 before the Precise LTS version 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. It is 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.

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 laptops 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.

Fun with Ubuntu Linux | The Road to Freedom - The Journey Starts |The Road to Freedom - Base Camp | Ubuntu All Together - Sharing, Networking, Backup, Synchronisation and Encryption | Ubuntu on the Lookout - Browsing, Email, Contacts, Calendars and Tasks| Ubuntu on the Move | Ubuntu on the Take | Ubuntu making Music | Ubuntu Unity - Evolution or Revolution | The MSI Wind U100 Netbook for Global Communications and Computing

Copyright © Peter and Pauline Curtis
Content revised: 15th May, 2012
Valid HTML 4.01!