Claws Mail with GMail
July 20, 2009 on 8:42 am | In Linux | 1 CommentWhy Claws Mail?
I’ve been suffering more and more recently on my old Thinkpad maxed out at 1GB of RAM. Also I’ve been feeling the need to use a real mail client after a few
months of having two GMail windows open (work + personal). Trusty old
Thunderbird uses 40+MB of RAM on this machine for three IMAP accounts, using a couple of crucial extensions. 40MB is a large chunk of my precious memory, considering that I’m already using two instances of Firefox (one for browsing, one for web development). If the memory usage hits 1GB then everything grinds for a couple of minutes (swap is so evil on laptops!) until I can kill one of those Firefoxes, so all of my apps have to justify themselves against low memory alternatives. Claws uses about 6MB, so I’m using it for now.
Using Claws Mail with GMail
Claws is remarkably capable as a GMail IMAP client these days. Naturally it supports IMAP over SSL and SMTP over SSL with TLS, which is required for GMail. It also has two features which Thunderbird only supports through extensions or about:config magic settings:
- You can set Trash to be [Gmail]/Trash.
- You can set up a shortcut key to archive emails. This isn’t obvious so here’s how:
- Create a label in Gmail called ‘archived’. This is just a label where you can put stuff so it isn’t in the inbox (“inbox” in Gmail is just a label too)
- Go to Configuration/Actions.
- Add a new action with Menu Name “Archive” and command as a filter action.
- Edit filter action, set Action = Move, and Destination = archived
- Save the action. You should now have the action available in the menu under Tools/Actions/Archive and can check that it works.
- Now, to set a shortcut key, go to Configuration/Preferences/Other/Miscellaneous and set “Enable customisable keyboard shortcuts”. Then go to Tools/Actions, and with the “archive” action highlighted press ‘Y’ to set the keyboard shortcut.
Other settings:
Tell Claws not to save sent mail, because using Google’s SMTP puts a copy in your sent folder anyway.
Set [Gmail]/Sent Mail to type ‘outbox’ and you can delete the other ‘Sent’ folder, plus you get a nice icon on the sent mail folder. You can do the same with Drafts and Trash.
Broken en_ZA locale in Ubuntu Jaunty
July 16, 2009 on 1:08 pm | In Linux | No CommentsI’m dealing with a lot of documents with the language set to English (South African) this year, and in OpenOffice on Jaunty there’s always a ton of perfectly cromulent words which being flagged as mispelled. On the command line I see an error like this:
Failure loading aff file /usr/share/myspell/dicts/en_ZA.aff
I do have all the relevant packages installed, so it seems like Jaunty has installed a affixes file for myspell that can’t actually be used by OpenOffice at least.
The fix is to download the myspell en_ZA files from here http://downloads.translate.org.za/spellchecker/
Backup the original files
cd /usr/share/myspell/dicts/sudo mv en_ZA.aff en_ZA.aff.bak
Unzip the file from translate.org.za, and copy it to /usr/share/myspell/dicts/en_ZA.aff, and do the same for en_ZA.dic
That should give you a working spellchecker in OpenOffice.org
Picflick 1.2
June 15, 2009 on 5:08 am | In Code, Linux | No CommentsQuick update to picflick, fixing a $PATH bug in picflick_starter and using ‘nice’ when resizing the images.
Picflick Update
February 3, 2009 on 3:07 pm | In Linux | 2 CommentsHere’s an update to ‘picflick’ the Picasa-to-Flickr uploader for Linux.
The changes are mainly simplification and documentation. I had found that my picflick setup broke when I upgraded my Ubuntu version over the holidays, and the previous setup wasn’t showing me why. The new version runs everything in a terminal and skips all the other pointless notification methods (libnotify, text-to-speech and beeping!!) What was I thinking?
Get it at picflick.
picflick: Picasa To Flickr Export on Linux
December 9, 2008 on 2:40 pm | In Code, Linux | 7 CommentsI’ve adapted the pragmatic-looking picasa2flickr Picasa plugin to work in Picasa 3 on Linux. Instead of feeding the Picasa files to a graphical Flickr uploader, it uploads them automatically using a perl utility called ‘flickr_upload’. Hopefully one or two people will find this useful.
Find it at picflick.
Weird problems with ‘curl -d’ and lighttpd
November 6, 2008 on 12:41 am | In Linux | 1 CommentI’m trying to test a Google Checkout response handler for a project I’m working on. Rather than putting through sandbox orders I’m just trying to post a message using Curl but for some reason POSTing anything longer than about a kilobyte just doesn’t show up at the server, running lighttpd 1.4. Enabling some debugging showed that curl is sending an HTTP 100 header.
User-Agent: curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1
Host: asap
Accept: */*
Content-Length: 1116
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue
There’s a bug in lighttpd 1.4 which means that this ‘Expect’ header is not handled properly. It won’t be fixed in v1.4 either.
The quick workaround for this bug is to call curl with the option “-H ‘Expect: ‘” to disable the header.
By the way, I also didn’t know how to post a file of data with curl – the answer is
curl -d ‘@file.xml’
Rsync backups with secure ssh key
May 13, 2008 on 9:54 pm | In Linux | No CommentsAfter today’s Debian/Ubuntu OpenSSH fiasco I decided to tighten security in my backup system. I added a single-purpose SSH key which only allows access to rsync on the backup source hosts.
The main logic in the program is the same as my earlier attempt, although I added a check that the machine I am about to rsync from is the right one (this would fail due to ssh keys anyway). The ping check I previously did before starting a backup was insufficient if my laptop was on my home LAN, where NAT gave it the same IP address as my home gateway machine.
The other new part is the ssh authentication improvement. In order to use that, you need to create a single purpose ssh key on the backup server:
’ssh-keygen -t dsa’ and save to $HOME/.ssh/rsyncThen edit the public part of the key (~/.ssh/rsync.pub) to limit the commands that can be run with this key. You would add this to the front of the key, with no spaces (the whole key should be on one line too):
no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,command=”/home/user/local/bin/secure-rsync.sh
This comes before the ssh-dss with a space before ssh-dss.
You will need to install this key in ~/.ssh/authorized_keys on the backup source machines, and also on those machines install the ‘secure-rsync’ wrapper. The secure rsync wrapper is from Barry O’Donovan, who has a thorough page explaining a very similar (but better!) backup system. The path in the public ssh key should correspond to this file. All this wrapper does is check that the command is a safe rsync command and start rsync:
#!/bin/sh
case "$SSH_ORIGINAL_COMMAND" in
*\&* | *\;* | *\|*)
echo "Access denied"
;;
rsync\ --server*)
$SSH_ORIGINAL_COMMAND
;;
hostname)
$SSH_ORIGINAL_COMMAND
;;
*)
echo "Access denied"
;;
esac
Then you can use the ‘mybackup’ script to run the backups, with a simple config file that is explained in the script comments.
Building ROOT for Debian Lenny (testing)
May 13, 2008 on 8:42 pm | In Linux, Physics, ROOT | No CommentsDebian Lenny is currently the ‘testing’ version, but it is pretty stable and that’s what my workstation runs at work. However the annoying bug I had before with libroot-python-dev is still present (short version: the package wants (python < 2.5) but the version that ships with Lenny and Ubuntu Hardy is 2.5.)
Anyway, the easiest way around it is to build the packages from source. So add this to your sources.list
# Apt ROOT distribution.
deb http://mirror.phy.bnl.gov/debian-root/ unstable main contrib
deb-src http://mirror.phy.bnl.gov/debian-root/ unstable main contrib
Then do these commands
- mkdir temp/root/
- cd temp/root
- apt-get source libroot-python-dev (this downloads the source)
- cd root-system-5.17.07
Now we come up against another problem. The maxdb packages aren’t available in Lenny (I’m not sure why they were removed) but the source packages depend on them, so you’ll need to work around that. If the packages weren’t broken, you could do apt-get build-dep libroot-plugin-python. Instead, you can get the list of packages you need from debian/control. Here’s the dependencies:
Now you have to edit the Debian control files to remove the maxdb dependencies.
Edit debian/rules, and
- Delete the ‘–enable-maxdb‘ line. (You can’t comment it out in place, but you could move it down a few lines and comment it out there)
- Comment out lines 35-45, just leaving ‘SAPDB = –disable-sapdb‘
Edit debian/control to remove the dependency on libsqlod-dev in the first stanza and delete the entire root-plugin-maxdb stanza.
mv debian/root-plugin-maxdb.install debian/root-plugin-maxdb.install.bakIf you like, you can edit debian/changelog and give it a new version number. The version extension must contain a digit, e.g.
root-system (5.17.07-1-ultrahigh1) unstable; urgency=low
Avoid this gotcha: I’d symlinked /usr/bin/gfortran to /usr/bin/gfortran4.3 for another project. ROOT’s config/Makefile.linux checks that gcc and gfortran are the same version, so I had to undo that symlink.
Build the packages:
dpk-buildbackage -rfakeroot
My build failed with this error but all of the packages seem to be there (including root-plugin-asimage, so I don’t know what it’s complaining about):
dpkg-genchanges -b >../root-system_5.17.07-1-ultrahigh1_i386.changes
dpkg-genchanges: binary-only upload – not including any source code
dpkg-genchanges: failure: cannot fstat file ../root-plugin-asimage_5.17.07-1-ultrahigh_i386.deb: No such file or directory
dpkg-buildpackage: failure: dpkg-genchanges gave error exit status 2
And if you are too lazy to build the packages and you trust me (why would you!), you can download my packages which should install OK.
Voice Over IP on Hardy
May 8, 2008 on 6:56 pm | In Linux, Voice Over IP | 1 CommentIn a separate post I talk about how Pulseaudio has broken some proprietary applications on Ubuntu Hardy. What’s worse is that many of the open source voice over IP clients (SIP, in particular) are broken on Hardy, which is a shame since Pulseaudio has been in the works for a while now and most major distributions are shipping it by default these days.
Here’s a list of the SIP clients that I have tried.
Ekiga: Just doesn’t do any sound in the call when using ALSA-via-pulseaudio (a real shame since this is the most GNOME-flavoured app and I’d really expect it to work on Ubuntu).
Gizmo: Ringing/Dialling noises work if you set ‘paplay %s’ in the “Use command to play sounds” option. Audio in call is missing when using ALSA-via-pulseaudio. Won’t start with OSS using padsp.
OpenWengo: This is barely maintained at the moment, it’s sad. And it’s tied into the Wengo side of things which seems to have fallen by the wayside (incoming SIP via voip.wengo.fr doesn’t work). I’d like to see the client return, open to multiple VOIP providers since it’s pretty solid software. But the microphone doesn’t seem to work in calls with pulseaudio at the moment!
Twinkle: Confusing interface, but it does work. Set it to use OSS for audio input and output, set the ringing to use ALSA default device (which is pulseaudio) and start the program with ‘padsp twinkle’. Not ideal since you lose a lot of the benefits of Pulseaudio, but at least it works. Wish we had v1.2 in Hardy which figures out which network to use automatically – at the moment I need to restart the program if I move from wired to wireless.
Empathy: Cool idea but SIP support isn’t really ready yet. The SIP configuration dialog is insufficient, it doesn’t offer all the fields you need to login to something like voxalot.com or FWD. Actually, that’s not Empathy’s fault but the “Mission Control” configuration app. Also, I’d like to get an audio ringing sound for incoming calls, and I can’t add SIP contacts via the main interface (it silently fails). I think Empathy is basically alpha software so I’m looking forward to these issues getting fixed – it has the promise of being the ultimate IM/SIP/Video client for GNOME.
Linphone: Works pretty well! Use the default ALSA device (which is pulse) and you can take/recieve calls and the ringer works. Great! I have a few issues with the interface: I’d love to see a tray icon and better visual ringing notification, but this is a solid app that actually works. Good stuff.
Pulseaudio problems on Hardy
May 8, 2008 on 6:54 pm | In Linux | No CommentsSo Ubuntu 8.04 (Hardy) came out, and it rocks a lot. By default it enables the pulseaudio sound server, which also rocks but has caused a few of the ‘usual suspect’ proprietary apps to fail even more than usual.
Skype
First: Skype. Skype is the bane of my existence, and judging from the way their developers rail against change on the forums, Linux users like me are the bane of theirs. No sooner had they fixed their three-year avoidance of ALSA than we all move to a new system and theirs breaks. Well, actuallyour new system was supposed to work fine with ALSA apps, except they seem to have used ALSA in a weird way, which means that when you redirect your ALSA input and output to pulseaudio, Skype just ignores it and tries to access your hardware directly. Which breaks, because pulseaudio is using your hardware.
One fix proffered on the Ubuntu forums is to make pusleaudio use ALSA’s dmix, that way your pulse apps will have this chain app->pulse->dmix->hardware,whilst broken apps like Skype can be set to use app->dmix->hardware. And this fix does make Skype work OK… but it messes up everything else like audio players because pulse-over-dmix is crappy and uses all your CPU.
So here’s my fix for broken apps, and no, it’s not ideal. Guess what? It never will be while Skype is broken!
Run the Hardy stock setup with ALSA-over-pulse, but manually run pasuspender when you need to take/make a call. I have this script which is called from a button on my panel which I press.
#!/bin/sh
# temporarily pause pulseaudio so I can use Skype or whatever
pasuspender — /usr/bin/zenity –info –text “Click OK to resume Pulseaudio”
Works OK, although you won’t hear Skype ringing.
Flash
Next up, Flash. Flash on Linux just sucks, absolutely. In Hardy, as of this moment, if you install the library that allows Flash to do audio output over pulseaudio, the Flash will crash every time you do something unusual like, say, open a frickin’ hilarious YouTube video, your browser will crash. Awesome huh! In fact, you can alleviate this by installing nspluginwrapper, in which case you will just have a gray square instead of your YouTube video. Also awesome.
My workaround for this is… just hit refresh a billion times until Flash stops sucking and plays the stupid video. It’s some sort of race condition between Flash and libflashsupport, at least that’s what the Pulseaudio developers claim. Lame!
Every Voice-over-IP App, ever
WTF guys! We all knew Pulse was coming for over a year… so why is it so hard to find a SIP client that works in Hardy? Check out my other post for listings of what’s broken about the different clients. Short answer: Linphone works well, Twinkle can be coaxed into working.
Powered by WordPress with theme based on
Pool by
Borja Fernandez.
Feeds: Entries and
comments.
Valid XHTML and
CSS.
^Top^
Page required 24 queries and took 0.225 seconds.