Home Pauline Howto Articles Uniquely NZ Small Firms Search
Adding Spice to Ubuntu
Mint and Cinnamon

Index

Contents

This page is currently largely presented as a 'Diary' in Chronological order of my experiences using Cinnamon to replace the Unity Desktop Manager in a existing Ubuntu 12.04 Precise instalation. There is also a preliminary look at Linux Mint 15 Olivia based on Ubuntu 13.04 Raring with emphasis on using Bluetooth.

Introduction

Ubuntu Linux Related Pages and some background to their preparation.

This series of pages was started six years ago and since then a number of topics have been split off into more specialised pages. This page and the pages split off from it are primarily a how I did it story with a lot of detailed information. There are now some additional how you should do it pages for the newcomer. I have covered these topics in many places already but for completeness you can [ Click here to expand to show the full set of Ubuntu related pages and the background to their writing  ]

Background to this page on Cinnamon and Mint

This is the story of how I added Cinnamon to an existing Ubuntu system and is still largely directed more towards people who are already using Ubuntu Unity but want to return to a more productive classic style of desktop by using Cinnamon. It is possible to install Cinnamon with impacting on Ubuntu Unity as Mint, of which it is an integral part, is only a flavour of the basic Ubuntu like Lubuntu, Kubuntu, Xubuntu etc., albeit an unofficial flavour. Both are built on Gnome 3, neither like the way Gnome is developing and have taken slightly different paths to minimise the impact on the user. Because of common base it is possible to choose at the time you login between an Ubuntu Unity, Lubuntu or a Cinnamon Desktop and different users can make different choices. There are few caveats to multi desktop operation: Cinnamon needs a modern graphics card like Ubuntu so you may find older systems running Lubuntu can not run Cinnamon. Both Ubuntu and Cinnamon have some inbuilt optimisation of the interfacing with programs such as Dropbox so you may have to make choices where you have the optimisation and I cover that area latter in this page. I have also looked at moving closer to Mint and have changer the Desktop Manager (Greeter) which handles the initial login from LightDM used by Ubuntu to MDM used by Mint. All these changes only require the addition of some extra PPAs (Repositories) to allow everything to be installed. I may look at bringing in some of the Mint Maya PPAs so I can also replace some of the Ubuntu Utilities such as the Update Manager and Software Centre at which point it will be difficult to tell what the underlying system was. In summary this is a page for experienced existing users of Ubuntu who want to experiment and probably switch back to a productive conventional desktop - new users would do better to start with Mint although even they will find a number of areas of interest once they gain some experience.

An Introduction to Cinnamon (and a bit about Mint)

Cinnamon

Cinnamon is the new Desktop Managers developed for Mint which can also be used with Ubuntu in place of Unity and with Lubuntu and Xubuntu. It provides a very sophisticated conventional desktop which has been very well received and once more makes Ubuntu a sensible proposition. It builds on Gnome 3.x but has a muchbetter interface and the Mint - Cinnamon combination has been voted 2012's best Linux desktop by ZDNET . In another Article on ZDNET Mint features as top choice with Ubuntu now down to number 3 . Mint has more than Cinnamon in its favour as it offers a much fuller set of facilities and immediately usability than Ubuntu in particular for media applications. However the Cinnamon interface is the clincher for most people and it can be overlaid very easily on a standard Ubuntu install and be chosen as an alternative to Unity chosen at login - no reboot is needed to switch, only to log out and back in so it is very quick. I have find I have never gone back to Unity to do any work since loading Cinnamon and have added it to all the machines which have the hardware capable of running it.

Cinnamon, which reminds one of the good old days of GNOME 2.x, is built on Muffin (a compositing window manager which has grown out of Clutter/Mutter) and Gnome 3 but is more attractive and with better features including extensive customisation and drag and drop support in the panel and menu. It is trivially easy to add menu items to the desktop, panel and 'favourites' as well as a right-click on the menu to use the menu editor to change edit the main menu itself. It gives me great control over my desktop. Another great advantage over Gnome 2 is Cinnamon/Muffin's Expo mode which seems more useful than the one provided via Compiz in Unity. Expo gives you great control over your workspaces and one can choose how many workspaces to use and drag and drop applications to each workspace - very powerful but also easy to use and I find I am now making much more use of workspaces. Even with the default 'Window List' on the bottom panel multitasking once more becomes practical, something which was scarely possible with Unity.

The panel (Cinnamon Version 1.6 and 1.8) is now entirely implemented by Applets so you can not only customise and reposition all the usual facilities but you can replace them with alternate versions. There are, for example, at least 5 different main menus with different degrees of complexity including the 'Mint' style as well as the new Cinnamon Menu and other layouts and the normal 'Window List' can be replaced by what I regard as a major (if not killer app) which allows one to see popups of each program group which are open with the full Window previewed in the background as you hover over each one. This cures the major problem I have with Unity and that is switching programs especially when I have several instances or windows open especially those running under Wine which often show up with incorrect attributions.

Now there must be a catch! The only real catch I have found is that good 3D acceleration is required for Cinnamon to run so it is not a solution for all machines over 5 years old but Unity and Gnome 3 do not run properly on such machines either! In those cases Lubuntu is still the way forwards and is still better and more productive than Ubuntu Unity - or you could try the Mate flavour of Mint. I have however, with a bit of work, got Cinnamon running on an Amilo D8830 laptop with a ATI Radeon RV250 graphics card which must be nearly ten years old and on a Toshiba L20 Satellite Pro which is 6 years old.

Installing Cinnamon in Ubuntu and Lubuntu 12.04 Precise and higher

Cinnamon is easily installed in Ubuntu 12.04 (and 12.10 but not tested by me yet) by adding a PPA at https://launchpad.net/~gwendal-lebihan-dev/+archive/cinnamon-stable. This and Cinnamon can be installed along with some desirable libraries by this single line pasted into and run in a terminal:

sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable && sudo apt-get update && sudo apt-get install cinnamon muffin gir1.2-gjsdbus-1.0
It will ask to install a number of other new packages and that is it. You do not even need to reboot, just to log out and log back - you select which desktop by clicking on the little orange icon at the top left above the username and password boxes if you are using the standard Ubuntu 'Greeter'. The theme and set up may not be perfect but you will probably never switch back to Unity!

Cinnamon Keyboard Shortcuts

I have found a number of useful keyboard shortcuts which do not seem to be very well documented:

Super Key -> Menu

Ctrl Alt Up -> 'Expo' Applet which displays workspaces and Windows and allows drag and drop of Windows between Workspaces - a very useful productivity tool which can be configured to your preferences

Ctrl Alt Down -> 'Scale' Applet which displays currently open Windows - a very effective window switcher which can be configured to your preferences

Ctrl Alt Left -> next workspace to left

Ctrl Alt Right -> next workspace to right

Alt Tab -> Window Switcher - allows you to tab through open windows with previews which you can configure

Ctrl Alt t -> Launch Terminal

Ctrl Alt Del -> Logout screen with cancel option.

Ctrl Alt Backspace -> Immediate Logout

You can find many other preset options by looking in Cinnamon Settings -> Keyboard -> Keyboard Shortcuts and you can also set up your own custom shortcuts

Cinnamon Themes

Cinnamon offers many alternative themes which can be easily installed from http://cinnamon-spices.linuxmint.com/themes

I a initial used Minty and learnt a lot by making a minor modification to change the background colour of the popup boxes for the Cinnamon Menu and other Applet menus in the .css fill associated with the theme which can be edited by:

sudo gedit /usr/share/themes/Minty/cinnamon/cinnamon.css

the changed sections are:


/* ===================================================================
* PopupMenu (popupMenu.js)
* Changes made to give a Dark Green Background with reduced transparency
* ===================================================================*/

.popup-menu-boxpointer {
-arrow-border-radius: 3px;
-arrow-background-color: rgba(0,47,0,0.95);
-arrow-border-width: 1px;
-arrow-border-color: rgba(255,255,255,0.1);
-arrow-base: 21px;
-arrow-rise: 10px;
-boxpointer-gap: 3px;
}

 

/* ===================================================================
* Menu (menu.js)
* Changes to give a very dark green background to the favorites list in menus
* ===================================================================*/

.menu-favorites-box {
background-color: rgba(0,23,0,0.95);
border: 1px solid rgba(255,255,255,0.1);
margin: auto;
padding: 3px;
border-radius: 3px;
}

See also the section below on the Amilo

If the them is not in the PPA you can download an archive file and extract the file to the themes directory i.e. "~/.themes/" or "/usr/share/themes/" and then use Cinnamon Settings to choose the theme.

Themes suitable for Cinnamon 2.2 and 2.4

I have now standardised on a Theme called Void which has a silver coloured panel which extends from right and left. It can be downloaded from the themes page of Settings and is fine without further changes.

I also loaded the Ambiance and Radiance Colours Suite which I found through WebUpd8 and the latest write up is at lhttp://www.webupd8.org/2014/09/ambiance-radiance-colors-themes-updated.html This gives an excellent choice of Colours for the Window Borders and Controls which are slightly better than those from Mint-X which would normally be used with Void. I am using Ambiance-Green for both. There is a matching icon set Humanity-Colours but this is not complete so I am continuing to use Mint-X for the icons until this is sorted

The Colour Suites can be installed via a PPA in a terminal by:

sudo add-apt-repository ppa:ravefinity-project/ppa && sudo apt-get update && sudo apt-get install humanity-colors ambiance-colors radiance-colors

Overall the set-up on the Cinnamon Settings -> Themes:

Window Borders: Ambiance-Green
Controls: Ambiance-Green
Icons: Mint-X
Mouse Pointer: DMZ-White
Desktop: Void

This gives a very pleasing dark theme - I have matched it with used if Personal Slate themes in Firefox and Thunderbird

Restoring Dropbox Icons to coloured defaults (advanced users of Cinnamon, Unity and Lubuntu) - may not be problem in Mint 17

The standard themes used by Cinnamon, Unity and Lubuntu change the Dropbox icon in the panel to dark grey colour and it is very difficult to see when Syncing is required or taking place. It is possible to find the icons for the theme you are using or the defaults that it reaches and to disable them forcing Dropbox to use its own defauts which are blue with a green tick when everything is in sync. See http://www.omgubuntu.co.uk/2010/08/dropbox-icons-now-respect-your-global-theme-no-more-manually-replacing-them . First you have to search for the icons to disable - I found them in /usr/share/icons/elementary/panel/22 for Lubuntu and /usr/share/icons/Humanity-Colours-Green/apps/22 for the theme I have chosen for Cinnamon. On other machines I have found them in many other icon themes. The icons all start with dropboxstatus and are type .svg or sometimes .png.

It is best to do a search for the icins and you may wish to install catfish which is a very fast file search program

sudo apt-get install catfish

sudo nautilus /usr/share/icons/ # modify to reach the required directory and disable the icons

I renamed them to have a .svg-default ending one then needs to update the icon cache and stop and restart dropbox to see the changes - below is an example for the humanity-colours-green icon theme

sudo update-icon-caches /usr/share/icons/Humanity-Colours-Green/apps/22
dropbox stop
dropbox start

This may not be permanent as the changes could well be overwritten if the theme is updated so you may wish to copy the modified theme to ~/.local/share/icons/.... which is checked before /usr/share/icons/.... and will not be overwritten as it is in your home folder.

Cinnamon Spices (Applets)

The ability to utilise applets is a major strength of Cinnamon. There are a huge range of Applets which are stable and under development at http://cinnamon-spices.linuxmint.com/applets. They are simply installed by downloading an archive and extracting the folder containing the applet to the ~/ .local -> share->cinnamon->applets folder

Applet - Window List with App Grouping

This is arguably the icing on the cake which has made use Cinnamon my main Desktop instead of Unity. It is not in the list available from Cinnamon Settings until it has been installed by downloading an archive from http://cinnamon-spices.linuxmint.com/applets and extracting the folder containing the applet to the ~/ .local -> share->cinnamon->applets folder

This applet is used to replace the standard 'Window List' which shows the programs which are running in the bottom panel by an advanced version where all the instances (Windows of a program) are grouped and when you hover over the group a popup or series of popup appear showing each of the Windows. When you move the cursor over one of these previews it is highlighted and the Full size window is previewed behind it - clicking opens it and you also have an option to close the window. There are many additional options available including just displaying the Icon with a number superimposed showing the number of associated windows on the panel - this means that you can have large numbers of program groups in use even on a small screen. It has transformed my netbook and has taken one well ahead of where Ubuntu reached before the disasterous move to Unity. This is currently the second most highly rated and popular Cinnamon Applet following only behind the weather application which I have also added on my desktop machine:

Weather Applet

This is more complex to install but there are full instructions in the zip file you download from http://cinnamon-spices.linuxmint.com/applets/view/17 This is by far the most popular of the applets available. There are no automatic updates and currently the pressure seems to be in error.

Steps include extracting the folder from the archive to the desktop, running the install.sh script by double clicking -> run in terminal and one also needs to add two extra dependencies by:

apt-get install gettext libglib2.0-bin

You then need to find the code for your location from http://edg3.co.uk/snippets/weather-location-codes/ - examples are Reading is UKXX0117 and Guernsey is UKXX0065

Bug in version 1.7.1

It is imposible to launch the settings window in version 1.7.1 as it is not found - it seems it is in the ~/.local/share/cinnamon/applets/weather@mockturtl/cinnamon-weather-settings and executable but not in an execution path. I have worked round this by coping to a folder which is in the path in my case namely ~/bin . This may be a temporary problem otherwise I may need to do something more permanent.

Expo Applet

This is available without having to be downloaded and is the ideal way to switch workspaces and programs and also allows you to drag programs between workspaces and name the workspaces. You can already access Expo by Ctrl Alt Up (and Scale by Ctrl Alt Down)

Network Speed Monitor 0.2 Applet - No longer available use NUMA

A simple Cinnamon Applet to display current network speed which can be downloaded from the Cinnamon Spices web site at http://cinnamon-spices.linuxmint.com/applets/view/18 as a zip file.

This applet requires this library gir1.2-gtop-2.0 to be installed. On Mint/Ubuntu it can be installed with this command:

sudo apt-get install gir1.2-gtop-2.0

Then Download the Zip file from from http://cinnamon-spices.linuxmint.com/applets/view/18 and extract the folder "netspeed@adec" from within its folder structure to "~/.local/share/cinnamon/applets/"

You can then enable the applet by right clicking in an empty part of the Panel -> Add Applets to the Panel as usual

The applet automatically monitors the first active network interface found at Cinnamon startup. You can change the monitored interface clicking on the applet. Seems to work well with Wired and Wireless broadband links and currently with dongles and bluetooth which often use a direct ppp rather than through network manager. It does seem to over-read by about 2x and I edited the .js file to divide the result by 2 although I could not find a coding error causing this. An iritating feature is that the display does not have a constant width. It does not display even the total traffic.

Network Traffic Monitor (NTM) Applet

This is a general monitor for Linux which has been tested with Ubuntu http://netramon.sourceforge.net/eng/index.html has full instructions and a .deb to download. Seems to work well with a broadband link but yet to be tested with dongles and bluetooth.

28th October 2012

Desktops for the future - Ubuntu Quantal 12.10 with Unity versus Cinnamon or Lubuntu or is it Mint?

The latest version of Ubuntu is now available and it is time to make some choices about the future. There are various reasons why many 'advanced' users do not like Unity or the new Gnome 3 desktops. I find Unity makes running multiple programs difficult, in particular when one needs multiple instances of the same program open and to switch between them - examples are working with several documents open or even a number of terminals. Windows Programs running under Wine (Wine Is Not and Emulator) have been a particular problem with inconsistent behaviour and identification of the program which is displayed in the Launcher. Hopefully this has been improved in the latest Ubuntu 12.10 Quantal.

I have spent some time in the past looking at Lubuntu (based on the LXDE desktop) for my older and less powerful machines and more recently the Cinnamon Desktop which has been developed for Linux Mint but can be installed in parallel in Ubuntu distributions with the option of choosing ones desktop manager every time one logs in. That seems a very attractive way forwards for recent machines with powerful 3d graphics - in fact that is a requirement for running Unity and Gnome 3 in any case.

I also have one older machine which falls into an intermediate class which will run the Gnome 3 desktop and Mint 13 Mayo with Cinnamon 1.4 but not the current Cinnaman 1.6 where the rendering of transparency behind menus is faulty.

I carried out most of my experimentation using LiveUSBs with 'persistence' so I have been able to install some extra programs and updates to, for example, see if Wine programs are handled better. Some of my findings so far are:

Lubuntu 12.10 is very little different to 12.04 with only a number of marginal improvements. It is fast and uses very limited resources but has few of the bells and whistles although it is very usable even for running multiple programs and instances of programs. It is now easier to set up desktop 'launchers' for programs which was a previous shortfall. The only remaining serious shortfall I can see is the lack of a fully functional Trash can (Wastabasket) on the desktop but I can live with that. It has gained a default search facility in Catfish. It is the obvious choice at present for machines without the comprehensive 3d graphics to run a compositing desktop manager or with under 512 Mbytes of memory.

Ubuntu 12.10 Quantal seems to have improved the handling of Wine programs judging from the LiveUSB and is going to be worth testing in the future.

Conclusions at that time

End result in 2014

Mint 17 on all machines capable of supporting it - Lubunty 14.04 on the rest

November 2 2012

Cinamon on an Amilo D8830 with ATI Radeon RV250 (Mobility 9000) video card.

I have had a few problems making Cinnamon, or probably more correctly muffin, display correctly on the ATI Radeon RV250 (Mobility 9000) video card fitted in the Amilo D8830. The card is fully supported by the Radeon Drivers but does not satisfy the requirements test for the Unity desktop where it is detected as having on OpenGL version 1.3 support whilst glxinfo seems to indicate 1.4. glxgears also runs smoothly at a reasonable speed showing the 3d accelerations is good. The problems manifest themselves in a completely consistent problem in the rendering of transparency in many of the Cinnamon menu items and a flickering during transitions.

Largely by trial and error I noticed that the 'Favorites' area of the Main Menu Applet rendered correctly whilst the 'Applications', 'Recent' and 'Places' was almost transparent. I found that changing the style-class which matched in three places from menu-applications-box to menu-favorites-box changed the rendering to of those areas of the pop up menu to be acceptable.

Having located the problem the better alternative was to then to modify the styles in the theme instead so the styles for Favorites, Applications and Places were identical.

This did not solve the problem for all the other applets but a change in .css for the Date Applet Section sorted - it was then only the problem to work back to discover the common areas where the css could be changed and eventually it turned out that two more changes gave an almost complete solution for all the Applets I tested.

The problem with flickering was then solved by commenting out every line with a transition-duration which was easy as they all seemed to be set to 100 so a global edit could be used.

At this point I copied and renamed the theme folder so I had a theme which I could use and one which would not be overwritten by any updates that came along.

In detail the modifications change the background colour of the popup boxes and force the changes on the Amilo of the Cinnamon Menu and other Applet menus by changes in the .css fill associated with the theme by:

sudo gedit /usr/share/themes/Minty/cinnamon/cinnamon.css

and editing so after editing the two changed sections are now:


/* ===================================================================
* PopupMenu (popupMenu.js)
* Changes made to give a Dark Green Background
* and force it for all menu backgrounds as required for early graphics cards

* ===================================================================*/

.popup-menu-boxpointer {
-arrow-border-radius: 3px;
-arrow-background-color: rgba(0,47,0,0.95);
-arrow-border-width: 1px;
-arrow-border-color: rgba(255,255,255,0.1);
-arrow-base: 21px;
-arrow-rise: 10px;
-boxpointer-gap: 3px;
}

.popup-menu {
background-color: rgba(0,47,0,0.95);
border: 1px solid rgba(255,255,255,0.1);
min-width: 100px;
}

.popup-submenu-menu-item:open {
background-color: transparent;
}

.popup-sub-menu {
background-color: rgba(0,47,0,0.95);
}


/* ===================================================================
* Menu (menu.js)
* Changes to give a very dark green background to the favorites list in menus
* ===================================================================*/

.menu-favorites-box {
background-color: rgba(0,23,0,0.95);
border: 1px solid rgba(255,255,255,0.1);
margin: auto;
padding: 3px;
border-radius: 3px;
}

In addition the file had a global edit to reduce flickering on early graphics cards by commenting out every occurance of transition-duration: 100; like this:

/* transition-duration: 100; */

These hand crafted solutions are obviously not a usual way to proceed but have already got be to a state where the Amilo is perfectly usable and should give me another 2.5 years as Ubuntu 12.04 is a LTS version.

Uninstalling Nautilus when you have Nemo - what to do about programs that are 'hard-wired' to Nautilus

Nautilus is replaced by Nemo as file manager (and Desktop Display Manager) when one is using Cinnamon. This works well most of the time but on occasion the system seems to get confused and uses nautilus as the file manager for the desktop. This means all the icons move round and one loses many of the useful right click functions and if you open a folder it opens using Nautilus. The only way get round this is to uninstall nautilus.

Unfortunately I have some scripts and many cut and paste terminal strings which reference nautilus directly which is an inconveniece which can be reduced by the use of an alias. There are also a few programs including the important Truecrypt where references to Nautilus are hard coded in - when you mount a drive it is very convenient to have it open in a file manganager window and if nautilus is not present you just get erro messages when you mount the drive. The answer is to rename and replace the nautilus binary file by a script which calls nemo and passes all the parameter strings across - nemo is a close fork of nautilus so the parameters are identical. The binary is called nautilus and lives in /usr/bin so one uninstalls nautilus and replaces it with a little file which needs to be owned by root and with execute permissions and contains.

#!/bin/bash
exec nemo $1 $2 $3 $4
exit 0

Use this in a terminal to get to the folder to rename nautilus and add the replacement script using right click menus:

sudo nautilus /usr/bin

13th November 2012

Updating Lubuntu to Linux Mint 13 "Maya" and 14 “Nadia” Cinnamon Editions

I have been experimenting with Linux Mint as I needed to reinstall on my old Toshiba L20 Pro laptop. I had been running it with Cinnamon loaded over Lubuntu but it all went to pieces when I did an upgrade to Lubuntu 12.10 - it would sometimes keep running for long periods under Lubuntu but would quickly lock up when using Cinnamon. I have the same problem on another machine I have updated to Lubuntu 12.10 which will only work with a new user name I created. I have downloaded the .iso files for Maya and the brand new Nadia RC (Release Candidate). I set these up on USB sticks with 'persistence' using UNetBootIn so I could update the Maya fully and and to use Cinnamon 1.6 with Nemo. The update to Cinnamon 1.6 did not seem to go smoothly on the LiveUSB on the Toshiba with old graphics but went well on a newer machine and I could then run the LiveUSB without problems on the Toshiba. Likewise the LiveUSB Nadia initially fell back to a 2d mode but could then be changed to Cinnamon and both did not seem to have any issues with freezing.

Even after these apparently succesful tests I still had a bad feeling about Ubuntu 12.10 based systems with old ATI graphics cards so I have currently loaded Maya onto the Toshiba retaining the /home folder intact as it was a different partition. The advanced partitioner is well hidden and has a very small link so beware. It is rather different to the Ubuntu install at the partitioning point and you have to edit each partition to set up or clear formating which must only be done on root ( / ) folder if you want to retain all your settings, desktop etc.

15th November 2012

The Mint Display Manager (MDM)

The Mint Display manager is a fork of the Gnome Display Manager and likewise handles the initial login screen. It is easy to install this in Ubuntu - if GDM is in use it will completely replace it but other managers such as Lightbox will still be available and you can choose to return at a latter stage. There is a slight catch in removing GDM on Ubutu 12.10 and higher as the latest Gnome Shell depends on GDM and will also be removed - no problem if you only use Ubuntu but a problem if you sometimes switch to Gnome Shell. If you do not understand that you do not have any worries either.

The latest MDM is available in one of the Webupd8 repositories (PPAs) - see http://www.webupd8.org/2012/11/how-to-install-latest-mdm-display.html and can be installed in Ubuntu Precise or Quantal by:

sudo add-apt-repository ppa:nilarimogard/webupd8 && sudo apt-get update && sudo apt-get install mdm mint-mdm-themes
When installing MDM the first time you'll be prompted to select the default display manager during the install - choose MDM. Once MDM has been installed, restart your computer - do not just try a logout as the machine may well hang up as it is one of the few times an installation can not be completed on a running machine.

If later on you want to switch back to LightDM, GDM or so on, the selection box can be reached again by:

sudo dpkg-reconfigure mdm

and select the display manager you want to use and again restart the machine before attempting a logout.

Once tha machine has been restarted a new Menu item will appear and you can customize MDM by launching "Login window" from the main menu or Dash if you are using Unity. There are options to change the theme and many other customizations are possible. You have the choice of a login themes with username and passwords in a single box or a screen with a selection of login names with associated images. You can set up an automatic login with or without a time delay and many other configuration options.

15th November 2012

Forcing Mint Maya to update to the latest versions of Cinnamon, Nemo and MDM using PPAs (apt-pinning)

I thought it would be simple to get the latest version of MDM into Maya to replace the less capable one in the Maya repositories. The changes to MDM are is the second most import area of upgrades in Nadia from Maya - in particular I wanted to have a user list and the potential for a automatic login after a period of time on some of the machines which do not need to be secure.

Unfortunately just adding the more up-to-date repository not work in Mint Maya and I also noticed that the Romeo repository was nothing like so up to date for Cinnamon and Nemo as the PPA I am using for the Ubuntu systems.

The latest versions of MDM are available in one of the webupd8 PPAs see http://www.webupd8.org/2012/11/how-to-install-latest-mdm-display.html which can be installed in Ubuntu by

sudo add-apt-repository ppa:nilarimogard/webupd8 && sudo apt-get update && sudo apt-get install mdm mint-mdm-themes

unfortunately this did not work in Mint and I also noticed that the Romeo repository was nothing like so up to date for Cinnamon and Nemo as the PPA I am using for the Ubuntu systems and installed by:

sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable && sudo apt-get update

On looking into it further I found that Mint does not always pick or even display the latest version as it always gives priority to versions in its own Repositories over those in Ubuntu Repositories and both over those in PPAs. This is arguably very sensible as it ensures that normal users get the most stable core system regardless of what PPAs they add.

On search the internet I discovered the mechanism Mint uses is in a configuration file for apt namely /etc/apt/preferences . See http://forums.linuxmint.com/viewtopic.php?f=90&t=103054&hilit=maya+freezes&start=520 for the source of my idea. The mechanism is called apt-pinning and references such as http://wiki.debian.org/AptPreferences#A.2BAC8-etc.2BAC8-apt.2BAC8-sources.list are full of caveats and warnings so what follows should be used with care and the you should look carefully at the upgrades that are offered and only select those you intended and needed and then disable the PPAs/Repositories you are forcing to a higher priority or remove the changes to /etc/apt/preferences when you have got what you need. That said the particular examples are probably OK but watch that other PPAs to the ones you intend do not also match.  

First lets have a look at the /etc/apt/preferences file which is added by Mint - a normal Ubuntu system does not have one. This has already been edited by adding the lines in red at the end.

Package: *
Pin: release o=linuxmint
Pin-Priority: 700

Package: *
Pin: origin packages.linuxmint.com
Pin-Priority: 700

Package: *
Pin: release o=Ubuntu
Pin-Priority: 500

Package: *
Pin: origin ppa.launchpad.net
Pin-Priority: 700

The changes give the same pin priority to the PPAs from ppa.launchpad.net (Both PPAs we want to use are at ppa.launchpad.net) as those from Mint so that apt will now choose the the most up-to-date instead of those in the Mint repositories. You need to be aware that it will 'uprate' the priority of all PPAs at ppa.launchpad.net that you have added so beware - it is not easy to go back to older packages. This also a case where it is more important than usual to make a backup first as one is play in an area where you might not even reach a graphical login screen if it goes wrong!

This enabled me to update to the latest versions of Cinnamon and Nemo which was important as there were many updates coming during the Release Candidate phase and also to try out the latest MDM greeter screens. This has probably given me 90% of the System improvements and hopefully a more stable system without risking using the new upstream 3.5 kernel used in Nadia and Ubuntu 12.10 with my older video cards. It also give me choices of applications to update - LibreOffice would be a benefit but the latest Rhythmbox is definitely a backward step with less facilities and a cramped display.

17th November 2012

Howto Terminate Unresponsive Programs in Mint and Cinnamon which also work in Ubuntu

When one is experimenting with new software there is always a risk of programs freezing. Xkill is a tool for terminating misbehaving or unresponsive programs and is part of the X11 utilities pre-installed in Ubuntu and Linux Mint . One can easily add a shortcut key to launch xkill with the steps below.

  1. xkillGo to Menu > Preferences > Keyboard.
  2. Under the Shortcuts tab, click the "+" button to create a custom shortcut.
  3. Enter xkill to both the Name and Command boxes and click the Apply button.
  4. Click on Disabled at the xkill row in the Keyboard Shortcuts window (Disabled is then changed to New shortcut...).
  5. Press a new key combination, e.g. Ctrl+Alt+X (New shortcut... is then changed to Ctrl+Alt+X).

Xkill is ready for use. Press the above key combination to turn the cursor to an X-sign, move the X-sign and drop it into a program interface to terminate the unresponsive program, or cancel the X-sign with a right-click.

Restarting Cinnamon

One sometimes finds that the panel has an unexpected appearance after moving icons arround or loading new applets - this can usually be sorted out by restarting Cinnamon. There are many ways to do this:

  1. Right click on the empty section of the panel -> Troubleshoot -> Restart Cinnamon
  2. Alt F2 brngs up a 'Run Box' and enter r and return
  3. Add a specific applet to the panel - there is one in the PPAs above.

Re-starting a Linux Mint or Cinnamon System without Rebooting

The Ctrl+Alt+Delete shortcut key in Linux Mint brings you a menu to log out of your system.

The Ctrl+Alt+Backspace shortcut key in Linux Mint and Cinnamon immediately takes you back to a log-in screen without the need to reboot the system - this often works with a frozen system.

When all else fails (Almost any Linux)

If you have really made a big mistake or are using beta software it is possible to freeze a system, often this is because one has lost commincation and it is best to shut down the file system in an orderly manner rather than just press reset even with the advanced file sytems in Linux. This is a technique which needs good dexterity but usually works.

Hold down ALT and SysR (may be Print Screen on your keyboard) together then add R, E, I, S, U and B in sequence - this needs long fingers or an assistant but does shut down the file systems and reboots cleanly. There is some explanation in the Free Software Magazine at How to close down GNU/Linux safely after a system freeze with the SysRq key . I often leave out the E and I

Auto Mount Drives at System Startup using the Storage Device Manager (pysdm)

Linux Mint is capable of reading and writing files stored on Windows formatted partitions, but partitions must be 'mounted' before they can be accessed each time you start up the system. I have usually edited the fstab file directl to do this but this is an alternative mechanism to set up the auto mounting of the drives or partitions. This depends on a program called pysdm which should be installed in Linux Mint but if it is not available, go to the Synaptic Package Manager and search for pysdm and install it, then log out and back in the system or restart.

In case you wish to remove the auto-mount of a certain drive or partition, you can once again use Storage Device Manager to change the setting.

Note: If you need to identify the disk partitions use Menu -> Disk Utility or sudo blkid in a terminal

Remove the Overlay Scrollbars when Cinnamon has been installed over Ubuntu Unity

The overlay scrollbars seem to be randomly applied when one has loaded Cinnamon into an Ubuntu Unity system and I like to get rid of them. I have found that the various tweaking tools are not fool proof so the following two methods can be used to get rid of the tools bars.

Method 1: There are several well documented proceedures but the easiest is just to remove the two packages that produce them namely overlay-scrollbar liboverlay-scrollbar. The latest Ubuntu systems have a version number associated with liboverlay-scrollbar and my 12.04 system has liboverlay-scrollbar-0.2-0 and liboverlay-scrollbar3-0.2-0 The best way to remove them is to use the Synaptic Package Manager and search for scrollbar or you can try

sudo apt-get remove overlay-scrollbar liboverlay-scrollbar*

Make sure the * on the end is copied - it gets lost if you use a middle click paste.

Method 2: A second method is to create a file /etc/X11/Xsession.d/99disable-overlay-scrollbars and add a single line to it containing export LIBOVERLAY_SCROLLBAR=0 . The file needs to be created as root and have execute permissions set. This can be done by the following command in a terminal:

echo export LIBOVERLAY_SCROLLBAR=0 | sudo tee -a /etc/X11/Xsession.d/99disable-overlay-scrollbars

You may find that the sliders are missing the stepper buttons at the end of the bars because they have been disabled in the Ambiance theme. I have not tried the following suggestion from http://askubuntu.com/questions/34214/how-do-i-disable-overlay-scrollbars but it looks worth a try and should cover a single user. Backup the files first

To re-enable them in the Ambiance theme, put the following in the ~/.gtkrc-2.0 file:

style "default" {
engine "murrine" {
stepperstyle = 0
}
}

and the following into the file ~/.config/gtk-3.0/gtk.css:

.scrollbar {
-GtkScrollbar-has-backward-stepper: 1;
-GtkScrollbar-has-forward-stepper: 1;
}


18th November 2012

Bugs, Features and Fixes

The Jupiter Power Manager and Cinnamon - fix for white bar alongside the icon

The Jupiter 0.1.6 applet icon ddoes not always draw correctly in the Cinnamon System Tray and has a white bar at the side. The way that seems to fix this on many machines is to introduce a delay when starting Jupiter to allow the Cinnamon toolbar to be available before Jupiter starts. This can be done by Menu -> Startup Applications and editing the Jupiter startup so the Command is changed from /usr/bin/jupiter to sh -c "sleep 5; exec /usr/bin/jupiter". This should also be done for the Jupiter Restore – from /usr/lib/jupiter/scripts/jupiter to sh -c "sleep 5; exec /usr/lib/jupiter/scripts/jupiter".

Quirks in the Cinnaman 1.6 Main Menu - much improved in Cinnamon 1.8

The main problem with the menu is that it can take several seconds to appear the first time after a restart or Login but is much faster subsequent times although far from instantaneous.

On further investigation I discovered on my MSI Wind U100 that a the menu speed on a 'fresh install' of Mint 13 Maya was Much faster than on my existing Ubuntu 12.04 based system which had been updated progressively by Distribution Upgrades from 11.04 but with a home folder which had been preserved from 9.04 or earlier which also has a lot of old WINE programs. I used a Unetbootin LiveUSB with Mint 13 Maya with persistence so I could get to Cinnamon 1.6 by enabling the Romeo repository. Even using a LiveUSB the menu delay was scarcely noticeable on the first call whilst it is could be up to 10 seconds on the 'dirty' system. The differences would certainly explain why some see a major problem whilst others see it as largely cured. I checked again with Mint 14 which was also very fast. Eventually I also got an Ubuntu 12.10 system on a LiveUSB with Cinnamon 1.6 installed and it was almost as fast as Mint based systems despite having quite a lot of extra/duplicated system applications.

I have now succeeded in speeding up my operational Ubuntu based system by removing everything I could from ~/.local/share/applications which had a total of over 120 .desktop files. These were mostly from Wine programs - every Windows program seems to generate a large number of extra menu entries for help files, uninstall links and various other associated utilities. Some programs like Word 2003 had over ten extra programs. I initially used the menu editor to hide the programs which did reduce the delays but it seemed better to make a copy of the folder and then empty it of everything other than the main launcher for each program.

I then started to use the Menu editor to 'hide' any other applications which were unused when using Cinnamon. Use of the menu editor (accessed by right clicking the menu applet on the toolbar) showed another problem. Most of the Wine programs had been put in the Other Category and the Wine application list only had the launchers from the Wine Application itself and none from programs installed by Wine. This is because Cinnamon uses the Categories from the .desktop files and the category is not set by Wine when programs are installed. This did not seem to be the case with the old Gnome 2.6 menus where Wine programs were correctly attributed - I do not know the mechanism used to generate those menus. I only have a small number of important progrms running under Wine so I hand edited the launchers (.desktop files) in~/.local/share/applications to have a line containing:

Categories=Wine;

The final ; is probably redundant as it is used as a separator if several Catagories are set however most of the launcher files seem to have it.

The end results in power on demand mode are averaged stopwatch timings of 2.25 seconds initial menu delay reduced to 1.35 seconds for subsequent openings. My reaction times need to be removed from both so a reasonable estimate is 1.6 seconds initial delay and .7 seconds subsequently. This is fast enough that you can hit the menu key and immediately start typing a program you are searching for without any loss of key strokes.

Cinnamon 1.8 is much faster and removes the need for my work arounds on all but the slowest of legacy machines.

More about Menus and Launchers

Regardless of the speed issue on the Cinnamon menu it is useful to have a basic understanding of how a program is launched and how the a Menu attributes the launchers to categories.

When you see a 'launcher' on the desktop or as a menu item you are actually seeing the representation of a Desktop Entry File which ends in .desktop. Most desktop managers hide the details from you and you can not open them for editing directly (Lubuntu/LXDE is the exception) but you can open them from within gedit and you will find they all follow a standard format. When a program is installed it places a launcher (.desktop file) in one of a few well defined places. Programs which are accessible to all users have a launcher (.desktop) file in /usr/share/applications or sometimes in /usr/local/share/applications (zygrib is the only program I know of which uses /usr/local/share/applications). Programs which are unique to a user such as wine (Wine Is Not an Emulator) place their launchers in ~/.local/share/applications - in the case of wine they are in subfolders like ~/.local/share/applications/wine/Programs/programfolder. The launchers in ~/.local/share/applications take priority when the menus are created so the safest way to modify a launcher is to copy it from /usr/share/applications to ~/.local/share/applications and edit it there.

Note that in many systems the menus are only created at login time so modifications are not apparent until a logout and re-login has taken place. Cinnamon does not have this restriction but the regular rebuilding does lead to a perceptible delay on slow systems, in particular the first time the menus are used after a restart or a change in the menu contents.

The full format for a Desktop EntrySpecified in http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html but only a few of the entries are mandatory and their names are self explanitory. So lets look at a typical .desktop file for Catfish, a file searching program where I have put in red the Mandatory entries. The entries in orange are also usually present - Comment gives a tooltip, Icon does what it says, Terminal specifies whether to run in a terminal so normally false or left out, Note that in this case all the programs and icons etc are in the path which is searched - if you are creating your own it is safest to specify the full path for the executable (and icon if you want to avoid it changing with the theme). Categories is used by programs which build menus and contains a list of Catagories in which it can appear. NoDisplay true means "this application exists, but don't display it in the menus". This can be useful to e.g. associate this application with MIME types, so that it gets launched from a file manager (or other apps), without having a menu entry for it. StartupNotify is more complex and invokes a mechanism allowing a desktop environment to track application startup, to provide user feedback and other features (probably leave out if you are creating your own unless you are absolutely sure of what you are doing! StartupWMClass is often not specified and the defaults used - if specified it is used to help in correct attribution of running applications to Window Lists in a panel. The OnlyShowIn and NotShowIn again do not not often appear but can be useful if you have a system which has the option of using both the Unity and Cinnamon Desktop managers to taylor the menus to only show the settings and other tools appropriate to each desktop environment - only one can be present.

[Desktop Entry]
Version=1.0
Type=Application
Name=Catfish
Exec=catfish

Comment=File search
Icon=catfish

Terminal=false
Categories=GTK;Utility;Filesystem;
NoDisplay=false
StartupNotify=true
StartupWMClass=catfish
OnlyShowIn=GNOME;Unity;

The specifications also allow for extra items to be added which are specific to particular desktop managers and you may find extra entries for 'quicklists' in a system which was installed with Unity as the desktop manager - these are usually started by entries with an x prefix and should be ignored by other managers but who knows!

In Ubuntu and its derivatives a right click -> properties shows a box which shows a subset of the information in the launcher file and the same goes for the Properties function with the Cinnamon Menu Editor

Mulled Wine - The use of WINE (Wine Is Not an Emulator) with Cinnamon

To follow check my latest Diary Pages in case I am drafting it

Workround for Automatically starting Skype with Cinnamon

Skype intergrates fully with the System Tray in the Cinnamon desktop provided that it is started the first time after login after the Panel and System Tray are alive. On slow systems it may be necessary to add a delay in the sequence if you start it automatically from 'Startup Applications'. Replace skype by sh -c "sleep 20; exec /usr/bin/skype" to introduce a delay of 20 seconds which should be adequate on any machine.

Update: Cinnamon 1.8 has arrived

The latest version of Cinnamon (1.8) came out at the start of May 2013 and has many enhancements, in particular in Nemo. The Menu delay has been reduced - it is still noticable but tolerable on my old netbook but is no problem on normal laptops and desktops. Some of the other changes are:

Missing Features Wishlist

So many good features have been put back into Cinnamon and Nemo that had been dropped during the Gnome downsizing that it seems churlish to make a wish list. However:

  1. A really good Network Traffic Monitor applet for mobile operations - there are several available but none are perfect and the favoured applet the Network Speed Monitor does not currently work with bluetooth connections or Mobile Broadband USB sticks
  2. A file previewer integrated into Nemo like Sushi was with Nautilus or one based on Glodus.
  3. More Facilies built into the Menu Editor including an advanced facility to Edit Desktop Launchers (by extending the GUI or by opening Gedit). This has been largely addressed in Cinnamon 1.8

 

Cinnamon Development

I have been working towards some involvement and have made a number of postings reporting very bugs and inputs into other discussions in Github during the period when Cinnamon 1.6 was being updated to 1.8. If you want to live dangerously you can install a PPA (repository) containing the nightly versions of Cinnamon and associated programs (Muffin, Nemo etc). I have it on one of my machines so I can see the latest state of play on enhancements and bug fixes. I also intend to write up more about getting a branch of the cinnamon development on my machine - check my latest Diary Page . If you want to try the latest versions at your own risk - it is unstable - then:

sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-nightly
sudo apt-get update
sudo apt-get install muffin cinnamon

Before doing this I would recommend that you ensure you have an escape route in case you get into trouble. When you log in there is usually a choice of desktop managers available so make sure you have one that works so you can reload the standard version of Cinnamon. On some of my machines it is Ubuntu Unity and others it is Lubuntu and others may be available - what you have is not important as long as you can run the Synaptic Package Manager and a terminal.

25th May 2013

Mint 15 Olivia Release candidate with Cinnamon 1.8

I have been running Mint 15 as a LiveUSB with persistence which gives me 4 gbytes available for extras in the root and the home folders which is plenty to try out various essential features, load updates and programs etc. Overall it is much better than the Ubuntu 12.04 with Cinnamon 1.8 system I am running and is much faster in producing menus and has an overall quick feel despite being on a USB stick. One of the first areas I looked at was bluetooth as I need it to transfer music to my boat hifi when on the move and to communicate with my phones for internet access. In doing so I have identified a serious problem in one area which is very important to me which is using my mobile phone(s) to give internet access via a bluetooth connection. My phones are on pay as you go Text and Web tariffs which provide me with 500 mbytes and 300 txts a month when I top them by £10 which is accessible for use on the computer if I use their built in bluetooth modems. This was therefore one of the first areas I investigated. The recent versions of ubuntu have had very easy access to bluetooth including creation of connections which appear in the network manager. Unfortunately this mechanism has a bug which locks Ubuntu 13.04 systems using the Linux 3.8.0 3.8.1 and 3.8.2 kernels to panic and lock the machine up. This also true for Mint which is derived from Ubuntu. I have there decided to include a long section detailing the problem and an alternative method of connection based on the Gnome-PPP program which I have been using extensively for 7 years - how time passes! The following is largely based round the write-up in Ubuntu Linux on the Move and will be used to update it in due course.

Bluetooth with Mint 15 Olivia, Cinnamon 1.8 and Ubuntu 13.04

I use Bluetooth to connect to two main classes of devices - phones to give mobile internet access using the data allowances available with many phone tarriffs, and, more recently, to connect to an bluetooth audio receiver (BTR006) to allow me to play music through the hifi system at home and on the boat without trailing cables. I have previously written about various ways of connecting to phones such as the Sony Ericsson T610, typical of older phones, The XDA Pro and Palm Treo typical of Windows Mobile Phones and more recently the Blackberry Bold 9700. The latest Bluetooth software should make connection of most devices very easy and, in theory, you can make a dial up connection to Bluetooth enable phones which is intergrated into the network manager in a few clicks of the mouse. In practice it often turns out to be more difficult than that and the best or only way to make a dial up internet connection is still to use an old piece of software called Gnome-PPP.

Bluetooth Basics and Pairing under the Cinnamon Desktop

Bluetooth is an excellent way to send contacts and files between machines and also allows the modem in one device to be used by another. Before you can do this the various devices must be 'paired' - this means that you set up a 'PIN' on both to give a secure communication without anybody else being able to hijack the connection which is important when one is a computer or mobile phone. The other security feature is that once paired you stop your devices being 'discovered' by other peoples machines which are searching for devices with Bluetooth (BT) turned on. This all sounds a bit complex and it does take a little while the first time.

When a Bluetooth dongle is inserted or a built in Bluetooth device is turned on a Bluetooth icon appears in the panel or system tray in most systems - in Cinnamon this is an applet which is normally installed by default but it if it does not appear you may need to add the Bluetooth Applet.

The first activity is to pair the Phone or Mobile Device to the computer. The way Bluetooth is paired varies a little between devices but in general it is initiated from the computer end but the device often has to be placed into the correct mode first. In the case of the Blackberry it is 'Listen' for a device to find me, on other devices it may be called 'Discoverable' and normally the mode is timed out after 2 minutes if pairing does not take place.

Using a BTR006 BlueTooth audio Receiver

Let us take a typical example of an audio device - an audio device does not need very high security so typically they have a preset PIN which is often 0000 but need to be made receptive to pairing for a short time. In the case of the BTR006 which is an audio input device to connect to hifi etc through a 3.5mm jack there is a single button and led to control it. Holding the button for 3-5 seconds turns it on. Holding for 10 seconds puts it into a special pairing mode where it is discoverable and it responds with a PIN of 0000 for 2 minutes. Pairing is now very simple - clicking on the Bluetooth Applet gives a menu which includes Set up a New Device which takes one to a Wizard where the second screen searches for and displays all unpaired devices and you highlight the BTR006 and on the PIN options one selects fixed and 0000 and continue and that is all that is needed. From now on the device will automatically be connected when the computer and BTR006 are turned on and within range. You will see a double blue flash every 5 seconds on the BTR006 in that case rather than the single flashes when it is just turned on and it will show up as an alternative audio device which you can select instead of the audio output or built in speakers.

Making a Dial Up connection on a Bluetooth Enabled Phone

1. Pairing a phone to the computer

In this case the pairing is more complicated as better security is required than offered by a fixed PIN and this has to be entered on both the computer and the phone. Again it is most easily initiated from the computer end and the wizard offers an automatic setting which generates a 6 figure random PIN. The phone end first has to be switched into 'discoverable mode' (this will vary from phone to phone) and then you will get a screen on the phone where you enter the PIN which is generated on the computer.

At this point the wizard will confirm the phone has been paired and offer a box you can tick to make a dial up connection - ticking this will enter a further series of screens where the phone will be checked and you provide information on the mobile operator to allow the connection to be set up ( and ultimately be available in network manager) or you can enter the name of the connection and the APN to manually complete the set up. Once made the connection settings can not be edited or deleted so if you get them wrong you have to unpair the phone and start again or make an additional manual set up with a different name. This set up method providing entries into the network manager worked well with my T610 with earlier versions of Ubuntu <13.04) but there is a catastrophic bug at present (May 2013) which kills the machine when you disconnect so we are back to Gnome-PPP until it is cured.

PPP Bug in Kernel 3.8.0 used in Ubuntu 13.04 Raring and Mint 15 Olivia

There is currently a serious bug affecting Ubuntu 13.04 and hence Mint 15 reported as "Kernel Panic in 3.8.0, 3.8.1 & 3.8.2 when diconnecting from network manager, using ppp0 to connect to net" on launchpad. This causes a kernel panic and a complete lockup of the machine which can only be cleared by a hardware reset (hold power button down until machine restarts) when one disconnects a bluetooth mobile phone connection to the internet. The connection MUST be disconnected at the phone end to avoid this.

2. Finding the Bluetooth address and Dial Up networking Channel in your phone

Once you have Paired the phone and the computer you need to find out several pieces of information to enable you to set up the connection to the modem in the phone so you can set up a configuration file which is used by the system to set up what looks like a local serial device and can be used by other programs to connect to the phone. You can scan the Bluetooth connections looking for Dial Up Network (DUN) connections (modems) in the phones by typing the following strings in a terminal, in this example both my T610 phone and the XDA have been paired and are with range.

hcitool scan
sdptool search DUN

which gives an output like this for with both my T610 Phone and O2 XDA Exec paired and turned on:

pcurtis@satellite:~$ hcitool scan
Scanning ...
00:12:37:C6:81:31 XDA
00:0E:07:2C:E8:82 T610
pcurtis@satellite:~$ sdptool search DUN
Inquiring ...
Searching for DUN on 00:12:37:C6:81:31 ...
Service Name: Dial-up Networking
Service RecHandle: 0x10003
Service Class ID List:
"Dialup Networking" (0x1103)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 4
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100
Searching for DUN on 00:0E:07:2C:E8:82 ...
Service Name: Dial-up Networking
Service RecHandle: 0x10000
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100

pcurtis@satellite:~$

3. Creating the Bluetooth Phone Dial-Up Network Devices via the /etc/bluetooth/rfcomm.conf file

We now have to create a system (script) file which is used to create the serial devices that appear in /dev which can then be used via Modem connection programs such as Gnome-PPP to make a serial bluetooth connection to the modems built into the phones. The important pieces of information in this file are the addresses of the bluetooth devices and the channel numbers for the DUN connections. The bind command tells the system to create the devices automatically when the sytem starts and the script file is run as part of the bluetooth initilisation.

It is safest to make a copy then edit the existing 'default' example /etc/bluetooth/rfcomm.conf file. You will need to have root priviledges to edit the file so in a terminal do:

gksudo gedit /etc/bluetooth/rfcomm.conf

The following is the contents of my file which contains the configuration information for all my phones namely a T610, an o2 XDA Exec, a Palm Treo and the Blackberry Bold 9700.

# RFCOMM configuration file /etc/bluetooth/rfcomm.conf

rfcomm0 {
bind yes;
# Bluetooth address of T610
device 00:0E:07:2C:E8:82 ;
# RFCOMM channel for the T610
channel 1;
# Description of the connection
comment "T610 Dial-up Networking via Bluetooth";
}

rfcomm1 {
bind yes;
# Bluetooth address of XDA
device 00:12:D2:8E:A1:08 ;
# RFCOMM channel for the XDA
channel 4;
# Description of the connection
comment "XDA Dial-up Networking via Bluetooth";
}

rfcomm2 {
bind yes;
# Bluetooth address of Treo
device 00:12:D1:B2:CC:9B ;
# RFCOMM channel for the Treo
channel 3;
# Description of the connection
comment "Treo Dial-up Networking via Bluetooth";
}

rfcomm3 {
bind yes;
# Bluetooth address of Blackberry
device F4:0B:93:FC:33:D0 ;
# RFCOMM channel for the Blackberry
channel 1;
# Description of the connection
comment "Blackberry Dial-up Networking via Bluetooth";
}


Remember when testing that whenever you change a configuration file such as the above which you are going to use you must reboot the machine or restart the relevant sub-system which runs the script file, in this case by:

sudo service bluetooth restart

The end result of this stage is that we have created a number of extra serial devices that appear in /dev which can be used via Modem connection programs such as Gnome-PPP to make a serial bluetooth connection to the modems built into the phones. The commands are a superset of the commands sent to old fashioned serial modems for telephone dial up going back 20 years or more. Gnome-PPP was created for such modems but is still perfectly able to handle the latest phones although it will need a little setting up.

4. Setting the permissions to allow users modem access to the Internet.

Many of the modem related activities need administrative privileges. When you install Ubuntu or its derivatives such as Mint, the first user is automatically added to the admin group, allowing that user to make changes as the super user (root) by typing in their password and a number of other important groups - groups are the mechanism used to provide/limit the privileges of users. Not all versions automatically provide the privileges to use modems or connect to the internet via a modem even to the first user and it is best to check. If you have several users on the machine it is useful to know how to give them the ability to use sudo as well as the modem related privileges. This can be done using the Users and Groups which is within System Settings - type groups into the search dialog in the Menu in Cinnamon or the Dash in Ubuntu Unity.

First click Advanced Settings and unlock with your password and highlight your user name and click on the User Privileges Tab check the box that says "Administer the System " which adds you to the admin group and also tick 'Connect to Internet using a Modem' which adds you to the dip group and 'Use Modems' which adds you to the dialout group. These changes do not come into effect immediately and you need to restart or logout and back in as the same user.

However under Mint the settings via Users has been castrated and you can no longer set up or change individual Groups so it is back to the terminal. You can check the groups you are in (and get some other useful information), in a terminal, by typing:

id

The output from id on my system which works with gnome-PPP looks like:

pcurtis@vortex-ubuntu:~$ id
uid=1000(pcurtis) gid=1000(pcurtis) groups=4(adm),20(dialout),21(fax),24(cdrom),
25(floppy), 26(tape),29(audio),30(dip),44(video),46(plugdev), 104(fuse),
105(lpadmin),112(netdev),119(admin),122(sambashare),1000(pcurtis)
pcurtis@vortex-ubuntu:~$

The following two commands will add YOURUSERNAME to the dip and dialup groups which are required to use gnome-PPP:

sudo adduser $LOGNAME dip
sudo adduser $LOGNAME dialout

$LOGNAME is replaced by the name you used to login. If you need other users to have access you will need to replace it with their username and repeat - make sure the usernames are correct, otherwise you will create them! Remember to restart to activate these changes and check again with id

An alternative is to add the normal "Users and Groups" GUI by installing gnome-system-tools by running in a terminl:

sudo apt-get install gnome-system-tools

and restart the system then either run it from the menus, or in a terminal with:

users-admin

Note this does not need sudo

5. Changes required in /etc/ppp/options to prevent the connection timing out.

Some other options need to be set for many mobile network connections to prevent them timing out with some operators. These are not possible via the 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 have made 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 - this is a hang over from modems using a telephone line to identify disconnection but 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 for the Vodafone PCMCIA Connect Card but does not impact other mobile connections so I do it routinely. It involves disabling negotiation of Van Jacobson style IP header compression by un-commenting

-vj

6. Installing Gnome-PPP - additional steps in Mint 14 Nadia and 15 Olivia

GnomePPP is not installed by default but it is present within the default installation of Linux Mint. Your Linux Mint system comes with a local repository which is disabled by default. You can enable it by using the "Software Sources" tool from the menu. This repository contains GnomePPP as well as a collection of drivers. You can then search for and install using the Synaptic Package Manager or the Software Center.

7. Change permissions on two files ( /etc/ppp/pap-secrets and /etc/ppp/chap-secrets )

If you want to save the username and password in gnome-ppp they are saved in /etc/ppp/pap-secrets and etc/ppp/chap-secrets and you need to give read and write access to them from group dip - if you do not then you will get an warning message in the connection log. In most cases this does not matter as the username and password are not actually used or checked by most mobile internet providers - they know who you are from the SIM which is already registered before you can access data. Even so it is best to set these permissions. I use a root file browser which is started in a terminal in Ubuntu by:

gksudo nautilus

or in Mint/Cinnamon by

gksudo nemo

You then navigate to folder /etc/ppp and right click on pap-secrets -> Properties -> Permissions tab then select dip from the drop down menu for Group and and then select read and write under Access. Repeat for chap-secrets. The annoying warning messages should now disappear.

In Mint/Cinnamon you do not have to use a terminal as you can navigate to the folder and on the right click menu is the option to Open as Root - another step forwards in Cinnamon over Unity!

A third alternative which is good if you are happy with using the termal is to do:

sudo chgrp -v dip /etc/ppp/*ap-secrets && sudo chmod -v 770 /etc/ppp/*ap-secrets

8. Gather information on GPRS/3G access for your Mobile Telephone and tariff

GPRS, EDGE and 3G access on a mobile phone does not involve use of a normal telephone number but uses a special code in place of the number to access internal 'registers' in the phone which contain information on the connection such as the APN (Access Point Node), login name, password and possibly an IP and a DNS address. Each phone will be slightly different but in general they will contain a set of registers sufficient to hold the configuration settings for about 8 connections (sometimes described as accounts or profiles in the manufacturers literature). Each of these will have a CID (connection ID) associated which identifies which one is to be used.   A special code is sent to the phone instead of the usual access number.  The number used is *99***X# where X is the single digit CID number referred to above. The default connection (CID 1) is almost always used and can also be accessed by *99#. 

The usual way to set up a phone used as a modem is for the APN to be loaded using a modem initialisation string before the connection is initiated. There are also other  options which can be set up for a GPRS/EDGE/3G PPP protocol connection (the usual standard).

9. Configuring Gnome-PPP

Gnome-PPP has the ability to send a number of modem inititialisation strings before 'dialing' the connection. It can also set up various protocols and useful options, for example, waiting for a dialing tone before dialling and setting up automatic or manual DNS (Domain Name Servers). The main configuration of Gnome-PPP is done by a GUI interface and is all fairly obvious especially if you are making a simple land-line Dial-Up connection. The only thing missing with gnome-ppp is help. It uses its own configuration file $HOME/.wvdial.conf which it is reported can have additions despite the warnings not to modify by hand. 

Coming on to mobile phones you need to set up the APN via an initialisation string option on the second tab of the Setup Screen, and then use a special code in place of the phone number. Using Vodafone UK PrePay on the T610 as an example the Initialisation string 2 is set to load the APN into the the default CID 1:

Init 3 AT+CGDCONT=1,"IP","pp.vodafone.co.uk"

and the phone code used is

*99#

For other providers replace the pp.vodafone.co.uk with their APN (eg Vodafone UK Contract is internet, Guernsey Wave is pepper and Vodafone NZ is www.vodafone.net.nz)

In general the username and passwords are not checked but for most phones something needs to be present - check with your provider. I use web and web with vodafone. There are more details on my Global Communications and Computing page

My typical settings on the Setup screens for gnome-ppp are:


Summary of setting up to use a Bluetooth Modem in a Phone using Gnome-PPP with check list.

The whole process I have described above looks very complex but I have been following my instructions above on every machine I have over six years. It probably takes about 15-30 minutes the first time. The main steps are:

  1. Pair the computer and phone - uses Bluetooth entry in System Settings directly or via the icon in the panel.
  2. Get details of the Bluetooth device (Address and Channel number for Modem) - uses two terminal commands.
  3. Create or edit a file /etc/bluetooth/rfcomm.conf which the system uses to create the devices to access the modems by bluetooth ( /dev/rfcomm0 etc ) using above Addresses and Channel Numbers found above. Editing as root needed of two lines for each phone.
  4. Give yourself as user the permissions to use modems and access the internet via a modem ie you need to add yourself to dip and dialout groups. Two terminal commands in Mint or using a GUI in Ubuntu.
  5. Change a system file ( /etc/ppp/options ) in three places to prevent timeouts after 2 minutes on Mobile phone connections and remove header compression. Edit as root.
  6. Install Gnome-PPP - needs an extra repository enabling in Mint.
  7. Change permissions on two files ( /etc/ppp/pap-secrets and /etc/ppp/chap-secrets ) so they are writable by the DIP group - not essential in most cases but prevents a warning in the log file. Easiest way is to run nautilus or nemo as root.
  8. Gather information on GPRS/3G access for your Mobile Telephone and tariff - you must have the APN and sometimes a username and password is also required.
  9. Configure Gnome-PPP in a GUI with three subsettings screens.

I hope the above shows it is not an impossible task and the skills needed which are a basic understanding of linux, its file system, the terminal and use of sudo to work on system files.

UPDATE December 2013 - Bluetooth Dial up Networking does not work on Mint 16 Petra.

I have started using Mint 16 Petra on my new Defiant Mini Laptop. The bluetooth Applet is new in Cinnamon 16 in that it is now in the Cinnamon Settings but closely based on what went before with gnome-control-center. It works fine for pairing a bluetooth audio receiver which enable me to pass audio to the hifi on the boat or house without wires and the Audio receiver then worked as expected.

I then tried to set up for a Bluetooth Dial up networking Cconnection. Pairing two different phones went fine but when I got to the final stage the inbuilt mechanism to add a DUN connection at the end of the Bluetooth wizard times out. I then went through all the above proceedures to use gnome-ppp and again it was impossible to make a connection. Eventually I went back and tested Mint 15 Olivia and that worked fine on the Defiant both using the inbuilt mechanisms through the network manager and also through gnome-ppp. I normally use gnome-ppp as there has been a well documented bug which can cause a kernel panic when one breaks on of the connections made using the network manager.

Theproblem here seems to be a different but real bug which has so far not been reported so I have filed a bug report at https://github.com/linuxmint/cinnamon-bluetooth/issues/5. This is not a problem with the Defiant but one which I believe affects every machine running Mint Petra and probably Ubuntu Saucy. I suspect few people 'tether' using bluetooth these days although I know at least one sailor who haules his bluetooth connected phone up the mast to get a good data connection at sea. I have since then checked tethering using an Ubuntu 13.10 Saucy LiveUSB and the bug is present there as far as I can tell making it is an issue of Gnome or Ubuntu rather than specific to any modifications made in Mint16 Petra.

Update 14th January 2014 - very crude workround for BT DUN bug

I have done some more investigation and it looks as if the changes which have been made mean that the Bluetooth connections which are made automatically are not being checked to make sure they are completed before gnome-ppp or the network manager are attempting to use them. If one watches the bluetooth settings screen one can see that it takes a couple of seconds for the connection to be made after gnome-ppp starts to connect by which time gnome-ppp has produced the error messages. If that is the case a way round would be to start a bluetooth (serial) connection to the phone manually and then run gnome-ppp to make the internet connection. I have tried that using a higher value for the rfcomm device (say /dev/rfcomm5) to avoid any conflict with the bindings set up in /etc/bluetooth/rfcomm.conf. This seems to work. In my case I started the connection in a terminal by:

sudo rfcomm connect /dev/rfcomm5 00:0E:07:2C:E8:82 1

You will have to use your own bluetooth device address and channel for DUN connections which can be found as above by using the following commands:

hcitool scan
sdptool search DUN

The connection can be broken by ^C in the terminal window, or if you have closed the terminal by:

sudo rfcomm release /dev/rfcomm5
If you look in the file manager you can see the device ( /etc/rfcomm5 ) being created and removed.

Further intenet searches found http://comments.gmane.org/gmane.linux.bluez.kernel/42303 which seems to refer to a similar problem on Arch Linux with Bluez 5.13 and has a suggested kernel patch so hopefully this will eventually be solved within the kernel - how long this will take to be backported is another story! In the meantime this is all very inconvenient especially as the connection needs root permissions so a simple script to automate it will not work.

28th May 2013

Enhanced Network Speed Applet for Cinnamon

This is one of the most important Applets for me as it enables me to monitor my Internet Connection when mobile and see how much data I am using and if there is any unexpected activity as well as finding out the speed of the connections. It however had one shortfall for me in that it only monitors connections which have been made by the Cinnamon Network Manager. It generates the list of connections in the popup menu from those known to the Network Manager which is fine for most people using modern hardware. Unfortunately some of the latest hardware lacks drivers which network Manager recognises such as USB mobile Broadband Dongles. At present one can not make bluetooth connections to mobile phones through the Network Manager under Ubuntu 13.04 Raring or Cinnamon 15 Olivia as there is a serious bug known bug in the Linux Kernel they use (3.8.0) which leads to a Kernel Panic when you disconnect and the only way out seems to be to hold the power button down with loss of all data you are working on.

Under these circumstances there is still a role for using software such as Gnome-PPP to make connections for Bluetooth Modems and USB Mobile Broadband dongles and using the manufacturers connection software and a need to the Network Speed Applet to be able to monitor, in particular, ppp0 connections (Point to Point Protocol). In some cases the interfaces detected by the Network Manager are not monitored correctly by the current Network Speed Monitor. My USB mobile internet dongle is shown as using ttyUSB0 but data is not shown as flowing whilst other users have Dongles Working - many dongle use two USB ports and an incorrect one may be shown in Network Manager and it may be better to monitor ppp0 directly.

I have therefore been looking at the code of the Applet and have identified the areas that need to be changed to allow one to monitor the ppp0 interface even when the connection has been made independently of the Network Manager. This involved changing the checks to make sure that saved interfaces were connected when the Applet is started to ignore the ppp0 interface where it is likely to be connected and disconnected on demand and to add a new menu item to be able to monitor it regardless of how it was connected.

I have also added the ability to start the Gnome System Monitor from the menu.

The changed sections of the file follow - the ability to start the System Monitor is a matter of choice and can be left out:

let lastUsedInterface = this.settings.lastUsedInterface;
// Following line has an extra condition for ppp0
if(this.isInterfaceAvailable(lastUsedInterface) || lastUsedInterface == "ppp0") {
this.setMonitoredInterface(lastUsedInterface);
}

buildContextMenu: function() {
this._applet_context_menu.removeAll();
this._applet_context_menu.addMenuItem(new PopupMenu.PopupMenuItem("Select a network manager interface to be monitored:", { reactive: false }));

let interfaces = this.getInterfaces();
if(interfaces!=null) {
for(let i=0; i<interfaces.length; i++) {
let name = interfaces[i].get_iface();
let menuitem = new PopupMenu.PopupMenuItem(name);
menuitem.connect('activate', Lang.bind(this, function() {
this.settings.lastUsedInterface = name;
this.saveSettings();
this.setMonitoredInterface(name);
}));
this._applet_context_menu.addMenuItem(menuitem);
}
}
// Extra Code for ppp0 starts
this._applet_context_menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this._applet_context_menu.addMenuItem(new PopupMenu.PopupMenuItem("Select an independent interface to be monitored:", { reactive: false }));
let name = "ppp0";
let menuitem = new PopupMenu.PopupMenuItem(name);
menuitem.connect('activate', Lang.bind(this, function() {
this.settings.lastUsedInterface = name;
this.saveSettings();
this.setMonitoredInterface(name);
}));
this._applet_context_menu.addMenuItem(menuitem)
// Extra Code for ppp0 ends

this._applet_context_menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
let menuitem = new PopupMenu.PopupMenuItem("Settings");
menuitem.connect('activate', Lang.bind(this, this.openSettings));
this._applet_context_menu.addMenuItem(menuitem);
// Extra code for System Monitor starts
this._applet_context_menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
let menuitem = new PopupMenu.PopupMenuItem("System Monitor");
menuitem.connect('activate', Lang.bind(this, function(event) {
GLib.spawn_command_line_async('gnome-system-monitor');
}));
this._applet_context_menu.addMenuItem(menuitem);
// Extra Code for System Monitor ends

},

Unfortunately the tabbed indentation has been lost in the above but the insertions should be clear.

The resulting menu looks like this:

Screen Shot Screen Shot

You can see the expected ethernet (eth0) and wireless lan (wlano) connections. The other connections handled by the Network Manager are USB mobile broadband dongle (ttyUSB0) and two bluetooth connections to modems in mobile phones FB:0B:93:FC:33:D0 and 00:0E:07:2C:E8:82 which can not currently be used in Linux Kernel 3.8.0 based systems. The new section has ppp0 primarily for use with modem connections made using Gnome-PPP but other connections could be added. This test was using Cinnamon 1.8.2 over Ubuntu 12.04 with a modified Minty theme. The Bluetooth and Gnome-PPP (two screens) icons can be seen in the panel.

My original plan was to contribute these changes to adreadec, the writer of this essential piece of software but on 22nd May he stated he was discontinuing the project and that any developer who wants to fork it and continue development was welcome! I do not have the skills to do more than fiddle in the margins and I hope that when he realises how respected and essential his contribution is he will relent, otherwise I hope that it will be taken on by the Cinnamon team as a core Applet or one of the team personally.

June 2013

NUMA Network Usage Monitor with Alerts

I finally faced up to the fact that if I wanted a good monitoring applet I would have to do it myself and have now written an extensive applet and this is covered in full in the new page More Spices for Cinnamon - Applet Development along with some other useful applets.

December 2013

Later versions of Mint - 17.1 Rebecca with Cinnamon 2.4

I am using this on my new Chillblast Defiant Mini Laptop with Optimus Technology and that currently is the best source of updated information on Mint 17 untill I bring the upates back to this page. Overall it is a vast improvement.

Before You Leave

I would be very pleased if visitors could spare a little time to give us some feedback - it is the only way we know who has visited the site, if it is useful and how we 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.

Home Pauline Howto Articles Uniquely NZ Small Firms Search
Copyright © Peter and Pauline Curtis
Layout revised: 30th May, 2015
Link to W3C HTML5 Validator