GNOME `Alt+Shift` and `Alt+Shift+Tab`

After installing Debian Jessie with GNOME 3.14, I noticed an annoying bug: when I tried to switch windows using Alt+Tab, it worked as it should, but when I tried to switch in reverse order using Alt+Shift+Tab, it did not work. I quickly figured out that the problem lies in the frequently used shortcut Alt+Shift for switching keyboard layouts. Indeed, when I tried cycling through windows, I switched keyboard layouts instead.

The gist of the solution was found after some searching on Stack Exchange, albeit it needs some adjustment for newer versions of GNOME: start GNOME Tweak Tool and select Typing from the Tweaks menu. Under “Miscellaneous compatibility options,” select “Shift cancels Caps Lock.”

alt-shift

This fixed the issue for me, without any side effects. I don’t need to use Shift-Alt instead of Alt-Shift as suggested in the original solution, and the Shift key does not cancel Caps Lock, as may be suggested by this option.

Update 2020-06-08: In GNOME 3.36, the relevant setting appears under Keyboard & Mouse -> Additional Layout Options -> Miscellaneous compatibility options.

Creating Menu Entries for Calibre

I recently installed Calibre using their binary installer for Linux and found that it doesn’t come with .desktop files, so Calibre doesn’t appear in the GNOME menu. To remedy this, I installed the following desktop files in ~/.local/share/applications/ (modified from the Debian Sid package):

[Desktop Entry]
Type=Application
Name=E-Book Viewer
Comment=E-Book Viewer
TryExec=/home/user/.local/calibre/ebook-viewer
Exec=/home/user/.local/calibre/ebook-viewer %F
Icon=/home/user/.local/calibre/resources/images/viewer.png
MimeType=application/x-mobipocket-ebook;application/epub+zip;
Categories=Office;Graphics;Viewer;

and

[Desktop Entry]
Type=Application
Name=Calibre
GenericName=E-book library management
GenericName[de]=E-Book Bibliotheksverwaltung
Comment=E-book library management
Comment[es]=aplicación para la gestión de libros electrónicos
Comment[de]=E-Book Bibliotheksverwaltung
TryExec=/home/user/.local/calibre/calibre
Exec=/home/user/.local/calibre/calibre %f
Icon=/home/user/.local/calibre/resources/images/lt.png
Categories=Office;Database;FileTools;Viewer;Qt;
MimeType=x-content/ebook-reader;

You may need to adjust the paths for TryExec, Exec, and Icon to match where you installed Calibre.

Enabling Compose Key in GNOME 3.4

For some reason, I couldn’t easily find how to enable the Compose key in GNOME 3.4. None of the references I found matched the actual menus and dialogs that I saw on my system, including the official GNOME help pages. So I decided to document it here for my future reference.

  1. Go to System Settings->Keyboard Layout.
  2. Select the Layouts tab and click Options.
  3. Under Compose key position, select the key you want to use as the Compose key.

Wikipedia has a nice table summarizing the Compose key sequences.

Opening mobi and epub Files in Ubuntu

You can do it with Calibre, specifically with the ebook-viewer program that comes with it. However, for some reason, the packagers didn’t ship a desktop file to accompany it, so you can’t just double-click on ebooks and have them open correctly. This can be corrected by placing an ebook-viewer.desktop file in ~/.local/share/applications:

[Desktop Entry]
Version=1.0
Name=Ebook Viewer
Comment=Display .epub files and other e-book formats
Type=Application
Terminal=false
Icon=calibre
Exec=ebook-viewer %f
StartupWMClass=ebook-viewer
MimeType=application/x-mobipocket-ebook;application/epub+zip;
Categories=Graphics;Viewer;

GNOME_COMPILE_WARNINGS(maximum) – Syntax Error in configure

I’m still encountering migration issues from Gentoo to Ubuntu. Apparently, Gentoo is much more user-friendly than Ubuntu when it comes to compiling packages. In Gentoo, you’ve got almost all the major dependencies you need. In Ubuntu, on the other hand, you need to hunt them down. It’s much easier with the main ones, as they are listed. But there are some small ones that are harder to track. I came across the following error while trying to compile gitg, a GUI for Git, today:

./configure: line 14447: syntax error near unexpected token `maximum'
./configure: line 14447: `GNOME_COMPILE_WARNINGS(maximum)'

After a not-so-short investigation, I found out I was missing gnome-common.

sudo apt-get install gnome-common

Why can’t there be one distribution that is user-friendly like Ubuntu and, at the same time, developer-friendly like Gentoo?

Importing CSV to Evolution

I’ve decided to try GNOME on a new machine that I’ve got, and as part of the move I’ve switched to Evolution (from Kontact). I had some contacts stored in a spreadsheet, which I’ve tried to import as CSV to Evolution.

Apparently, unlike Kontact, Evolution won’t ask you what every column means. It would just assume that the CSV is in some weird scheme. If you try to import the CSV, it would force the scheme on your CSV even if it looks completely different. The result: a complete mess of the fields in each contact.

I didn’t find a reference for how Evolution expects its CSVs to look, and I didn’t want to analyze that either. So finally, I’ve set up a virtual machine, loaded it with the openSUSE KDE live CD, imported the CSV into Kontact, and exported it as VCard, which I imported to Evolution.

I believe that the current CSV import in Evolution just causes user frustration, as it doesn’t act as expected.

Other weird problems I’ve encountered in Evolution, which I didn’t solve yet:

  1. Evolution gives me “Could not remove address book” when I try to delete an existing address book. After restarting the program, I’ve succeeded in deleting some of them, but not all of them.
  2. When I imported the VCard from Kontact, the contacts appeared in every address book (except one) and also appeared magically in new address books I’ve created. The contacts in each of the address books seem to be linked together. When I’ve tried to delete them from one address book, they’ve disappeared from the rest as well.

If you know how to solve these issues, I would really like to hear.