Fixing minor (compiz) window-manager issues in Ubuntu’s Unity desktop without logging out

I’m currently using Ubuntu 12.04, the Unity desktop and the compiz window-manager.  If you notice that some of your applications stop “behaving normally” on your Ubuntu Unity desktop, it might be the fault of the compiz window manager.    I will use the phrase “behaving normally” loosely to include any of the following symptoms.

  • The nautilus menubar does not appear when the nautilus window has the focus
  • Right-clicking a file in nautilus does not bring up the usual pop-up window
  • The volume control pop-up stops working in totem movie player when selected
  • In nautilus Paste-into-folder is unexpectedly greyed out but still works 

I could go on, but generally the symptoms involve the loss of pop-up windows and menubars.

I have fixed many of these issues by doing Alt+F2, and typing:

compiz –replace

Or if you have a terminal open, then run:

compiz –replace &

I hope you find this useful.  It doesn’t require you to logout/logon and your apps continue to run.

Advertisements

[Solved] Unity desktop and nautilus not recognizing the Calibre application for .mobi and .epub files

Calibre is a great application for managing your ebook collections.  It recognizes many different ebook formats.  I use it as a reader for .mobi, and .epub files.

After installing calibre on my Ubuntu 12.04 box, I was annoyed to find that nautilus on the Unity desktop did not associate the calibre application with .mobi and .epub files.  In other words, when I tried to open a .mobi file, nautilus didn’t know what application to launch.  Furthermore, nautilus no longer gives you the option to right-click a file and add a custom application to handle it.  You are forced to use a static list of already known applications.

Solution 1:

There appears to be an error in the desktop launcher file for calibre.  Edit the file /usr/share/applications/calibre.desktop.

Change

Exec=calibre

To be

Exec=’/usr/bin/calibre’ %f

and save.

Now nautilus should give you the option of selecting calibre from the list of applications.  Right click on a .mobi or .epub file and select properties.  Select the “Open with” tab and select the calibre application and click either “add” or “set as default”.

Solution 2 (creating a gnome desktop launcher) :

I’m going to show you how to create a desktop “launcher” with the basic contents required.  You can modify the name and contents as needed to suit other applications and file formats.

Create a file named calibre.desktop in your home folder under ~/.local/share/applications/ (to make this available to all uses, you would copy this file to /usr/share/applications)

Add the following to that file and save.

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=’/usr/bin/calibre’ %f
Name=calibre
Comment=e-book manager and reader
NoDisplay=true
Name[en_US]=calibre

Now go back to nautilus and right click on any .mobi or .epub file and select properties.  Click the “Open with” tab.  Select show other applications.  You should now see calibre in the list.  Select calibre and click “set as default”.

You are done.  Nautilus should now recognize calibre as the default application for opening .epub or .mobi files.

Further reading:

 

solved: starting conky on startup under unity (Ubuntu 12.04)

I had issues when starting conky as a startup application under the unity desktop (Ubuntu 12.04 LTS).  The problem is that conky would start in a window that was on top of everything else, rather than on the desktop underneath everything else.

 

The problem seems to be a timing issue.  I solved this by delaying the start of conky by a few seconds.  Use the -p option when starting conky to set a pause before actually starting conky.  I chose 10 seconds, you can play around with it and find whats works best for you.

Go to the unity dashboard and open Startup Applications, add conky and set a pause using -p.  This should start conky automatically whenever unity starts, and allow time for conky to start correctly on the desktop.

 

Ubuntu 11.10: Unity Desktop Poll