• apt-cacher-import.pl fails to “rename” (move) .deb files during import

    Importing: apache2-mpm-worker_2.2.9-7ubuntu3_i386.deb
    Failed to rename apache2-mpm-worker_2.2.9-7ubuntu3_i386.deb. Try read-only (-r) or symlink (-s) options. at /usr/share/apt-cacher/apt-cacher-import.pl line 154.

    (I faked this by copying and pasting from ABC Science Forum, because I didn’t save any of the ones I actually saw.)

    For me the problem with apt-cacher-import.pl was that apparently Perl’s rename function can’t move files across devices, and that’s how my imports and cache laid on the disk. I solved this by using the -s parameter, which only makes symlinks. Another option would be to manually move the files onto the same device before importing. I suppose that’s why the /var/cache/apt-cacher/import directory is there.

  • Retaining Epiphany’s overloaded address bar while using Privoxy

    As per the comment in Privoxy’s ticket #2530592, I’ve set up a Privoxy rule to interpret dot-less domains as search terms. This emulates the search function built into Ephy, which breaks with Privoxy’s DNS error messages. In /etc/privoxy/user.action I now have:

    # Redirect dotless hostnames as search parameters to Scroogle
    
    {+redirect{s@^http://([^\\.]*)/$@https://ssl.scroogle.org/cgi-bin/nbbw.cgi?Gw=$1@}}
  • How to separate every other comment within a wp_list_comments callback function

    Just upgraded one of my themes (the only one I’m still using that I can truly say I’ve created myself) to finally utilize WordPress 2.7’s new comment listing function. This made separating actual comments from pings a breeze compared to what it used to be.

    The only slight problem was with porting the old separation of every other comment with a different class; since I needed to use a custom callback to retain the old look, I couldn’t utilize the automated classification done by wp_list_comments(). In the end all it took was these three lines added to my callback function:

    global $comment_alt;
    $oddcomment = $comment_alt % 2 ? 'alt' : '';
    $comment_alt++;

    With these in place I could now bring in the <li> tag from the old template without any further tweaking:

    <li id="comment-<?php comment_ID() ?>"
    class="<?php echo $oddcomment?>">
  • Dreaming of an easier free software translation process

    Translating free software is way harder than it should be, IMO. I wish all the strings were in a wiki, so that I could just go and fix things such as typos as I pick them up. Everything would be live and coordinated (between upstream and distros), without needing to find out which project exactly is it that I need to fix the issue in, let alone getting acquainted with whatever system has been set up for for accepting the translations in this particular project. I think it’s a fairly straightforward technical problem just crying out for a solution to be implemented. Although, as usual, not one that I personally would have the competence to produce. (And as such, I could be dead wrong about the straightforwardness of it, even.)

  • One down, one to go

    One of my long-time peeves, Rhythmbox’s redundant notification icon bug was closed just last weekend, yay! Here’s to hoping that the last application still mis-using my notification area, Empathy, will see its corresponding issue also closed soon.

  • Uutinen: Ubuntu 9.04 (Jaunty Jackalope) julkaistu

    Ubuntu 9.04, koodinimeltään Jaunty Jackalope, on julkaistu, ja on nyt ladattavissa Ubuntu Suomen sivuilta. Tietoa uusista ominaisuuksista sekä muita lisätietoja tuoreesta jakeluversiosta löytyy esimerkiksi julkaisumuistiosta.

    Itse olen käyttänyt virtuaalikoneessa Jauntya jo sen varhaisista testijulkaisuista (Alpha) lähtien Intrepid Ibexin rinnalla. Omasta mielestäni Jauntyn paras ja tärkein uudistus on sen aiempaa huomattavasti nopeampi käynnistyminen. Ulkoasupuolella huomattavin uudistus lienee aiempaa tummasävyisempi kirjautumisruutu, joka miellyttää ainakin minun silmääni. Myös ilmoitusalueelta nousevat ponnahdusikkunat ovat nyt aiempaa siloitellumpia.

    Intelin piirisarjoilla varustettujen pikkukannettavien käyttäjät saattavat lukemani mukaan pettyä Jauntyn suorituskykyyn: ainakin Phoronixin mukaan uusi grafiikka-ajuri tekee Jauntysta lähes käyttökelvottoman pikkukannettavilla, mutta tätä en ole omakohtaisesti voinut varmistaa, koska minulla ei ole sellaista kannettavaa.

    Yksi konepellin alla tapahtuneista muutoksista, jotka voivat vaikuttaa myös käyttökokemukseen, on se, ettei Ctrl + Alt + Backspace -näppäinyhdistelmällä voi enää lähtökohtaisesti resetoida ikkunointiympäristöä. Mikäli niin haluaa tehdä, voi kuitenkin asentaa dontzap-paketin, minkä jälkeen näppäinyhdistelmän voi ottaa käyttöön komentoriviltä.

    Jatkossa tämän blogin merkinnät perustuvat Jaunty Jackalopen käyttöön ainakin seuraavan version (jonka koodinimi on Karmic Koala) julkaisuun saakka.

  • Fetch and sequentially store webcam images at intervals, v. 0.01

    #!/bin/bash
    if [ $# -lt 2  ] ; then
      echo foo
      exit 1
    fi
    
    if [ $1 -eq $1 2> /dev/null ]; then
      while true
      do
        wget "$2" -O `date +%s`.jpg
        sleep $1
      done
    else
      echo bar
      exit 1
    fi
  • Victims of Akismet's false positives shouldn't be left in the cold

    Every now and then Akismet falsely identifies an innocent comment as spam. From the commenter’s perspective this results in their comment vanishing into thin air. In reality that’s not the case, as the comment can be recovered from Akismet’s queue, but there’s no way for the commenter to know this. I’m a little uneasy with the idea of my commenters left thinking their contribution has gone to waste, so I’d like to give them a hint of what has happened. Additionally, I could provide them with an email link, prompting them to contact me about the misidentification so I can fix it.

    The trouble is, once a comment is marked spam by Akismet, there’s apparently no way to react to it in the comments template, as there is to comments ending up in the traditional moderation system. The code fetching the comments for the comments template is in the comments_template() function at comment-template.php. There’s a comment marked ‘@todo’ to use API instead of SELECTs, followed by three queries. I suspect the todo refers to the fact that as it is, there’s no way to tap into those queries short from editing them directly by hacking the file. Some people, myself included, would rather not do that because of the way it inconveniences upgrades.

    Until a clean way to tap into the way comments are fetched, or better yet, the functionality I’m after being integrated directly into Akismet, I guess I’ll have to do with a big sign saying if your comment seems to have vanished, read this. Then I’ll link it to a page explaining how to contact me about the misidentification, and show it to every commenter beside the comment form. It’s ugly, but still better than giving them the impression my comment box is just a big black hole.

  • Pinning KNewsTicker down to bottom of screen with DevilsPie

    This is on a 1280 × 1024 desktop, with the bottom panel remaining below (not behind) the ticker:

    (if (is (window_name) "News Ticker") (begin (pin) (above)
    (undecorate) (skip_tasklist) (geometry "1280x20+0-0")))

    The ‘xwininfo’ command is useful in getting the coordinates.

    Note that this makes shutting the ticker down impossible, apart from issuing a ‘kill’ command to do it.

  • Gallup FAIL

    Gallupissa kysyttiin maitotuotteiden käytöstä ruuanvalmistuksessa.

    Gallup: kaksi saraketta, ohjeistus puhuu kolmesta

    Vastasin parhaan kykyni mukaan eli ohjeesta huolimatta siten, että kerroin käyttäväni tavallisia maitotuotteita sekä itselleni että vieraille tekemissäni ruuissa, rastittamalla molempien sarakkeiden ylimmät vaihtoehdot.

    Tämän vastaukseni perusteella kysytty seuraava kysymys oli: mistä syystä et käytä maitotuotteita ruuanvalmistukseen?

    Jostain syystä tällä kertaa gallupin lopussa ei ollut palautteenantomahdollisuutta. Ehkä ne ovat kyllästyneet palautteisiini.