Make Mnemosyne save before system halt | TERM signal

At least version 1.2.2 of Mnemosyne does not save when it receives the TERM signal, when you shutdown / halt /stop your system. One way[1] to fix that is to run wmctrl first. The command line tool wmctrl may not be on your (Slackware) system, but is available through and can be installed in a few seconds.

Adding an alias to your ~/.bashrc file for halt is a simple way to utilize wmctrl before halt.
alias halt='wmctrl -c "Mnemosyne - default"; sudo /sbin/halt'[2]

1. I took the info about wmctrl from the user frabjous on this StackExchange superuser page. I'm sure there exist alternative solutions to this problem, maybe even on the page I just linked to.
2. According to frabjous the part between quotes can be a regular expression. I simply copied the output for Mnemosyne from wmctrl -l; you should check if it's the same on your system.
BTW by default Slackware can only be halted as root. If you like that, you should add the alias to the .bashrc file for root. To make your user be able to execute halt without fuss, you execute visudo as root (sudo) and add (type G and o) the line:
your-user-name ALL=(ALL) NOPASSWD: /sbin/halt
and save with ESC :wq.

Mon Feb 27 11:27:57 CET 2012 (on Slackware 13)