Posts Tagged ‘Linux Mint Maya’

Fixing mailto-mutt in Linux Mint Maya 2

November 18th, 2012 subogero Comments off

Antonio Radici, mutt’s Debian maintainer kindly replied and asked me to open a Debian bug for fixing the mailto-mutt vs MATE issue. I nearly did it, but decided to do some further testing before. I already had three virtual machines installed: Xubuntu, Linux Mint Maya Xfce and Linux Mint Maya KDE. It turned out that the simplistic mailto-mutt implementation worked perfectly on all.

The reason? Their native terminal emulator either passes the rest of the command line after “-e” to the command called (konsole) or, if not, they come with a wrapper that does just that (gnome-terminal.wrapper, xfce4-terminal.wrapper). The only one missing this wrapper was mate-terminal.

So I wrote another email to Antonio, calling off the new Debian bug, which restored his optimistic outlook on life, the universe and everything. And I set out to write the wrapper. My first shot was a shell script to replace “-e” with “-x”:

while [ "$1" ]; do
  [ $param = '-e' ] && param='-x'
  args="$args $param"
exec mate-terminal $args

Seasoned Unix veterans have already noticed it. Noobs will immediately and enthusiastically learn it: This wrapper works beautifully. Until you pass a parameter that contains spaces, that is.

The shell is a cool programming language, but it has this sometimes irritating habit of messing with and interpreting your special characters, instead of leaving them alone. Fortunately the late Dennis Ritchie invented a language called C, which includes the brilliant concept of the zero-terminated C-strings. Many people hate them, others adore them. But no one can deny the fact that they don’t mess with special characters:

#include <unistd.h>
#include <string.h>
int main(int argc, char *argv[])
    int i;
    argv[0] = "/usr/bin/mate-terminal";
    for (i = 1; i < argc; ++i) {
        if (strncmp(argv[i], "-e", 3) == 0) {
            argv[i] = "-x";
    execv(argv[0], argv);
    return 1; /* if exec returns, it's an error, baby */

Finally, I submitted the code into a new issue on the github page of mate-terminal.

Fixing mailto-mutt in Linux Mint Maya

November 6th, 2012 subogero Comments off

I tried Linux Mint Maya KDE over the weekend in a virtual machine. It came after a brief tour of the Xfce edition. The latter does not really let me set a small and tasty window title bar without editing pixmaps of the window decoration. KDE in general is extremely configurable, apart from the size and colour of the… yes, the window decoration theme. But it left a good impression. Except that some KDE apps look so cluttered and tasteless compared to their Gnome2 counterparts. Step forward Ktorrent.

Switching back to the real machine’s MATE was such a relief. So I decided to debug my main niggle with this half-baked DE: the disfunctional “Email Link…” in Firefox, which just brings up Mutt in normal mode, instead of composing a new mail in it. Same for clicking mailto links anywhere.

First configure Firefox mailto: handling. Edit, Preferences, Applications, mailto. “Mutt (default)” does not work as intended. So I set it to the recommended /usr/lib/mutt/mailto-mutt which is just a wrapper to start mutt in a new terminal:

exec x-terminal-emulator -e mutt "$@"

It did not work either. I just checked, x-terminal-emulator is just a symlink to a symlink to /usr/bin/mate-terminal.

Next step: check whether Firefox really sends the mailto parameters to mailto-mutt. So I replaced it with a one-liner to copy the argument list into a log file.

echo "$@" > ~/mailto.log

That worked fine, the proper mailto URI was copied to the log file.

So it must be either the mate-terminal or the mutt invocation. I tried it manually without a new terminal first:

mutt `cat mailto.log`

Everything fine, mutt starts in email-compose mode. So it’s the mate-terminal, then:

mate-terminal -e mutt `cat mailto.log`

There you go! The mailto URI from the log file was now ignored. It turns out the -e option ignores the rest of the command line, it just takes one argument. Should have used -x instead, or quote the whole thing. Not that mate-terminal has a manual page. I looked it up in that of gnome-terminal on Ubuntu 10.04. Anyway, here it is:

mate-terminal -e "mutt `cat mailto.log`"

works fine. So the fix to mailto-mutt is this, watch the opening quote:

exec x-terminal-emulator -e "mutt $@"

Then, even though I don’t believe society exists at all, I tried to do the civil thing towards the so-called community and tracked down the origins of the bug.

/usr/lib/mutt/mailto-mutt is part of the mutt package, version 1.5.21-5ubuntu2.
The original Debian package 1.5.21-5 has an identical mailto-mutt.

The only Debian bug about mailto-mutt is #576313 which contains an interesting observation:

On top of that, mailto-mutt doesn't handle body specifications properly.
  /usr/lib/mutt/mailto-mutt 'mailto:test?body=test'
doesn't do anything, but
  mutt 'mailto:test?body=test'
works just fine.

The “upstream tarball” (mutt-1.5.21.orig.tar.gz) contains no mailto-mutt whatsoever. So it’s a Debian bug. I emailed the maintainer about the bug and the fix.

It seems few people have time to fix real usability bugs in these chaotic years of the Linux desktop. And why? Because the brilliant GNOME Usability people decided to discontinue Gnome 2, the best desktop environment ever. It’s so incredible that it hurts.

Inferiority Complex Considered Harmful

September 12th, 2012 subogero Comments off

Recently, I’ve upgraded the HP 874W power station to Linux Mint Maya, 64-bit, MATE edition.

It’s pretty stable, the performance is brutal, and it has very new packages out of the box, like VIM 7.3 (I’m looking at you Debian Squeeze). But the Gnome2-MATE conversion is still a work in progress. A few things are still broken, like the power button brings up the shut-down dialogue for exactly zero seconds and, unfortunately, Compiz does not work out of the box.

It took me two evenings to play with the Configuration Editor (gconf-editor), the Configuration Editor (mateconf-editor) and CCSM to reach a state, where Compiz places, decorates, wobbles and peeps through windows in the desired fashion, and the virtual desktops are spinning and exposing as in the old times. Except, there is no way to start the old hierarchical menu with Alt-F1. So I’m forced to use the chaotic MintMenu. By now my readers have figured out, correctly, that I’m a keyboard-guy.

So Ubuntu Lucid Lynx will stay on the ultra-portable ASUS UL20A for at least another year. This OS is the symbol of the golden era of the Linux desktop, 2010. Dark clouds were already gathering on the horizon, but here, down on Earth, everything looked rosy and happy. The Linux desktop was so good that Apple and Microsoft could not help copying it at an astonishing rate. Full screen for ALL apps for the first time in Mac OS X Lion, anyone?

But while we, proud users, were showing off semi-transparent rotating desktop cubes to the Apple fanboys in the neighbourhood, William Jon McCann had a feeling of terrible insecurity. He, as the lead designer of Gnome3, felt that the Linux desktop was crap and something new, more apple-ish was required. At the same time Miguel de Icaza, the founder of Gnome, had already been a closeted Mac OS X user, waiting for the great coming-out moment. Allegedly, his sound was not working and he could not play videos on Linux. I’m at a complete loss here…

But anyway, Gnome3 was born, Gnome2 was discontinued, Ubuntu defaulted to Unity, and everybody else got real angry. There is a silver lining in the clouds though, thanks to Linux Mint, but it’s still a long way. But what caused this mayhem?

It’s called inferiority complex.

It’s harmful.

No, the desktop is not going away, and no, OS X and Windows were not better than the Linux desktop, and no, goodness is not measured by market share. These gentlemen were hankering after the wrong things from the Apple world. They wanted to copy looks and features and gardens and walls. They should have noticed something else:


It’s the ability to notice that you’re good at something. The first Mac OS from 1984 and the present OS X basically look the same. They stuck with their interface even in the valley of the shadow of death. Their user interface is still the same, while they have changed the internals to Unix. The same is true for the Linux kernel. The external interfaces never change. Linus’ bash binary from 1991 still runs.

Miguel de Icaza thinks Linus Torvalds is an arrogant low-level kernel guy. But the fact that you’ve been a guilt-afflicted closeted Mac-fag, does not mean that someone else with a healthy dose of self-confidence is arrogant. In fact Linus Torvalds is an extremely humble person. He goes to great lengths to protect his users. Yes, on the surface you see the “shoot-yourself-before-you-reproduce” and the “you-are-full-of-BS”, but the comforting self-mockery is always there, and it’s all for the users’ sake.

On the Gnome side there is McCann’s polished and politically correct corporate lingo, which in fact is full of ignorance, insecurity and bullshit. And they could not care less for their existing users. But it’s Linus’ fault, of course.

Go to therapy, get rid of your inferiority complex and start using mplayer.