The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Category: Software

General-purpose computers doing something specific

  • How Not To Say Thank You

    Just got a nice thank-you email from the mumble organization after filling out a survey form…

    Thank you for taking the mumble Survey survey. Your input is very valuable to us in designing our program.
    <Delete or replace with a closing such as “Sincerely,”>
    <Delete or replace with an image of a signature>
    <Delete or replace with a text representation of a signature (e.g. “John Smith”), the title corresponding to signature (e.g. “President”), and the site name>

    OK, I appreciate their intent, but … it’s still a bit off-putting.

    Hint: always include yourself on the email list, perhaps as a BCC, when you’re setting up a new bulk response. Sometimes what you see on the proofreading screen isn’t what goes out over the wire.

    And I’m pretty sure that the “Survey survey” was put out by their Department of Redundancy Department…

  • Kmail to Evolution: Converting Maildir to Mbox

    A bit of searching produces this useful PHP routine, which almost worked. Two tweaks got it all the way there:

    • force the correct time zone
    • quote the write-mode parameter in fopen

    The changes, with line numbers in parens (line 347 was line 345 before the first change, OK?):

    76:  // force timezone
    77:  date_default_timezone_set("America/New_York");
    347: $this->mboxhnd = fopen($this->mboxfn,'w');
    

    After that, run the script as directed to convert the entire maildir tree in one fell swoop.

    cp -a /from-wherever/Mail/ /tmp
    cd /tmp
    php maildir2mbox.php Mail
    ll mboxfiles
    

    The output files appear in the mboxfiles directory adjacent to the top-level maildir directory. Don’t use the -e parameter, which would add a .mbox suffix to each file.

    Evolution’s import “feature” is a major pain, as you must import the converted files One. MBOX. File. At. A. Time. Sheesh.

    Rather than that, just slide the whole mboxfiles structure into place. Some case changes were in order for my setup, which may be due to historic considerations:

    • Drafts
    • Inbox
    • Outbox
    • sent-mail -> Sent
    • Spam (will become Junk in Evo)
    • Templates (not that I use any)

    Then put the mboxfiles directory somewhere on the NFS server and fiddle the Evolution directory structure:

    cp -ap mboxfiles /mnt/nfs-place/mail/
    cd ~/.evolution/mail
    mv local local.base
    ln -s /mnt/nfs-place/mail/ local
    

    Evolution will build all its indexes when it first sees the new files, so it’s all good.

  • XFCE vs Evolution vs Gnome Keyring

    So I thought I’d try Evolution, the Gnome email / calendar / messaging Borganism, which can allegedly support maildir files. Installation went swimmingly, but (at least at first glance) it can’t. More on this later.

    Evolution uses the Gnome keyring to store passwords, which is (of course) different from and incompatible with the KDE keyring. The principle seems to be that when you sign on / log in / whatever, the Gnome keyring’s login keyring automagically unlocks, giving Evolution access to the POP3 password used for your ISP. Except that didn’t work; Evolution uses the default keyring, not the login keyring.

    Evolution / Gnome evidently creates a default keyring entry by scraping up a password from somewhere unknown to me. The only way to clear it, at least in XFCE, without installing the entire mumble Gnome desktop, is to simply delete the keyring file… at which point, the keyring manager will ask you for a password and recreate the file.

    rm ~/.gnome2/keyrings/*

  • Arch Linux: Downgrading Clipman

    Come to find out that the new cut-n-paste handler in Inkscape 0.47 collides mightily with (among other things) Clipman 1.1.3, the xfce4 clipboard manager, as mentioned in bugs 487653 and 418242.

    Seeing as how I depend on  Clipman, the least-disruptive course of action seems to be downgrading it to 1.1.1, which required some fiddling with the Arch Build System.

    I have a build tree set up in /var/abs/local, so…

    cd /var/abs/local
    cp -r /var/abs/extra/xfce4-clipman-plugin/ .
    cd xfce4-clipman-plugin
    

    The PKGBUILD file tells us that source tarballs are available at

    source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/1.1/${pkgname}-${pkgver}.tar.bz2)
    md5sums=('2ba70c6bd710e2a18cba5add66d297dc')

    Go there, get the md5 sum for the 1.1.1 package, then edit the PKGBUILD to suit:

    pkgver=1.1.1
    ... snippage ...
    md5sums=('0884207cabd3a3a94c86b919bbf1617b')
    

    Remove the existing package, build & install the new / old one:

    sudo packman -R xfce4-clipman-plugin
    makepkg -s
    sudo pacman -U xfce4-clipman-plugin-1.1.1-1-i686.pkg.tar.xz
    

    Then edit /etc/pacman.conf to ensure Clipman remains obsolete:

    IgnorePkg   = xfce4-clipman-plugin
    

    Restart the panels:

    xfce4-panel -r
    

    And it seems to work just fine…

    Doc for this is pretty good: building custom ABS packages and downgrading packages. The trick was finding the backlevel versions, which stumped me until I dug into the PKGBUILD file.

    It’s worth nothing that this conflict isn’t unique to Arch Linux: the same problem is affecting other distros, too. What is unique to Arch is that it’ll distribute the fix earlier than anybody else, too, because as soon as the upstream versions change, they’re in the Arch repositories.

    Memo to Self: remember to un-wedge Clipman when Inkscape gets its act together. Fortunately, pacman reports which packages it’s ignoring.

  • Kmail: FAIL

    In the unlikely event you’re keeping track of this, slashing the total volume of email made Kmail much more competent: it hadn’t trashed an index file in, oh, weeks…

    Until it happened again.

    I don’t know that 30 days of email is magic, but 64 MB worked much better than 3 GB. The offending folder has all of 6 MB and 280 files, which puts a pathetic upper bound on Kmail’s good behavior.

    Anyhow, Kmail still screws up its indexes, but … it’s better than it was.

    You’d think this would be an important thing to get right, but the KDE apparat has far more important things to worry about. Eye candy, as nearly as I can tell.

    I use Kmail because it’s one of the few email readers that stores messages in maildir format. That’s important with large email collections, because mbox, the other choice, tucks all the messages into a single honkin’ big file (perhaps one file per folder). That doesn’t work well with a daily backup strategy, because each message changes the file and triggers a backup of the whole thing. Maildir format means backing up only the new messages, which makes far more sense.

    But, if this blank email thing continues, it’s time to move on…

  • OpenOffice: Not Spell-Checking URLs

    For some reason, the default character style automagically applied to URLs uses English… which means the spellchecker doggedly attempts to make sense out of that gibberish.

    Solution (at least for OOo 3.2):

    • F11 to get the Style and Formatting dialog up
    • Click Character Styles
    • Click Hierarchical in the lower drop-down list to see ’em all
    • Right-click Internet Link, select Modify
    • Select [None] in the Language drop-down list
    • OK your way back out

    There, now, wasn’t that easy?

    Oh, yeah, you’ll want to do that to all the templates you use to create blank documents, too.

  • Kmail: Copying Directory Structures and Some Files Therein

    As part of the Kmail blank email problem, I conjured up a new, shrunken maildir structure with just the most recent 30 days of email. However, I want to keep all the same folders, even if they have no current email messages, so my filters can sort the incoming mail properly.

    The sequence of events:

    • shut down Kmail!
    • move existing email directory out of the way
    • set up a new directory
    • copy the directory structure
    • copy the most recent 30 days of email
    • delete the existing index files

    That’s straightforward, at least after you figure it out. Took me a while to get it right, but here ya go…

    cd to the directory holding the Mail folder
    mv Mail Mail.base
    mkdir Mail
    cd Mail.base
    find . -type d -print0 | cpio --null -dmpv ../Mail
    find . -type f -mtime -30 -print0 | cpio --null -apdv ../Mail
    cd ../Mail
    find . -type f -name ".*index" -print0 | xargs -0 rm
    find . -type f -name ".*index.ids" -print0 | xargs -0 rm
    

    Then fire up Kmail and let it rebuild all the index files.

    You ought to try that out on a dummy version of your email, as something may have gotten clobbered in the transition from my terminal to your fingertips, OK?