May 18, 2008
filed at around evening time by DrScofield in: hacking, linux
technorati tags:
QR code for this entry · average time to read 1:16 minutes

since time immemorial (well, almost) i own a private epson 1260 scanner. a couple of weeks ago i — foolishly, as it turns out now — offered to my in-laws to copy all lake district articles out of our country walking collections. foolishly, because i realized that country walking must have their offices on one of those lonesome, remote fells: there are lots and lots and lots and lots of lake district articles and routes in country walking.

i started off with the gscan2pdf tool — really slow to start up, at that speed summer would be over before i had everything scanned in and converted to PDF. not good.

next try: kooka, KDE 3.5’s own scan tool — faster, but non-intuitive, you apparently have to rename and save each individual file. winter time before i’d be done.

i noticed, once again, that the epson 1260 does have a scan button (and a print and a mail and a web button) — if only that were working under linux. last time i checked for a tool (gazillion years ago), there was nothing, zilch, nix available to utilize that button. googling for plustek and scan button (the scan chipset inside the epson 1260 is a plustek chipset) this time did turn up something: scanbuttond! and even better: it’s available as a ubuntu package in hardy heron:

% apt-get install scanbuttond

installed the beast. following the instructions on the gentoo wiki gave me a working one-button-scan process! i modified the scan script slightly to deposit the fresh scan in my $HOME/tmp/scans/ directory.

converting a bunch of JPG images into a single PDF is also quite easy: you imagemagick’s convert command:1

% convert *.jpeg allinone.pdf

voila!


  1. if you haven’t installed that yet, it’s a simple

    % apt-get install imagemagick
    

    away. 

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
April 30, 2008
filed late at night by DrScofield in: from the grid, hacking, linux
technorati tags:
QR code for this entry · average time to read 0:45 minutes

just thought i’d let you participate in today’s adventure: triggered by ansgar commenting on ubuntu offering him to upgrade to ubuntu 8.04 “hardy heron” i though, “hmm, good idea, let’s do a quick update”…

…well, a couple of hours later i seemed to be back in business, hardy heron was installed on “my” x60 and i was just about do another OpenSim build — when i noticed that nant was seg faulting! now, wait a moment, it clearly was not supposed to do that. ok, can happen, what with new libs and all that. so, let’s walk on over to /usr/local/src/mono/nant-0.86b and do a re-install. should be easy, peasy…

…except it wasn’t: mono’s compiler mcs kept seg faulting as well! hmmm.

ok. let’s reinstall mono. following my own script i started the re-install — which crashed as well after about 5min of mucking around.

panic stations!

googling around it transpired that this would happen when running hardy heron with a custom compiled kernel of pre-2.6.24 vintage — which i was :-(

i’m happy to report that with 2.6.25 mono is running again :-)

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
March 27, 2008
filed just before lunchtime by DrScofield in: from the grid, linux
technorati tags:
QR code for this entry · average time to read 1:37 minutes

to run the most recent libsecondlife release you need to have at least mono 1.9 installed. the following step-by-step recipe applies to a ubuntu 7.10 system and you should be root:

installing pre-reqs

apt-get install build-essential bison gawk
apt-get install libglib2.0-dev
apt-get install libpng12-dev libx11-dev libfontconfig1-dev 
apt-get install libfreetype6-dev libjpeg62-dev libtiff4-dev 
apt-get install libungif4-dev libexif-dev libcairo2-dev
apt-get install libpango1.0-dev libgtk2.0-dev libglade2-dev
apt-get install libgnome2-dev libgnomecanvas2-dev libgnomeui-dev
apt-get install libgnomeprint2.2-dev libgnomeprintui2.2-dev 
apt-get install libpanel-applet2-dev libgtksourceview-dev
apt-get install libgtkhtml3.14-dev

installing libgdiplus

wget http://go-mono.com/sources/libgdiplus/libgdiplus-1.9.tar.bz2
tar xvf libgdiplus-1.9.tar.bz2
cd libgdiplus-1.9
./configure --prefix=/usr/local
make
make install

installing mono

wget http://go-mono.com/sources/mono/mono-1.9.tar.bz2
tar xvf mono-1.9.tar.bz2 
cd mono-1.9
./configure --prefix=/usr/local
make
make install

installing nant

wget http://switch.dl.sourceforge.net/sourceforge/nant/nant-0.86-beta1-src.tar.gz
tar xvf nant-0.86-beta1-src.tar.gz
cd nant-0.86-beta1
make install prefix=/usr/local

you now have the base setup, which is sufficient for building and running libsecondlife and opensim. the following packages are add-ons that are nice-to-have but not necessary-to-have. i do recommend installing the monodoc & mono-tools stuff, however — it makes live easier :-)

gtk-sharp

wget http://go-mono.com/sources/gtk-sharp210/gtk-sharp-2.10.4.tar.bz2
tar xvf gtk-sharp-2.10.4.tar.bz2
cd gtk-sharp-2.10.4
./configure --prefix=/usr/local
make
make install

gnome-sharp

wget http://go-mono.com/sources/gnome-sharp2/gnome-sharp-2.16.1.tar.gz
tar xvf gnome-sharp-2.16.1.tar.gz
cd gnome-sharp-2.16.1
./configure --prefix=/usr/local
make
make install

gtksourceview-sharp

wget http://go-mono.com/sources/gtksourceview-sharp2/gtksourceview-sharp-2.0-0.12.tar.bz2
tar xvf gtksourceview-sharp-2.0-0.12.tar.bz2
cd gtksourceview-sharp-2.0-0.12
./configure --prefix=/usr/local
make
make install

monodoc & mono-tools

to get the monodoc C# documentation viewer (recommended!) we need to install the monodoc package and the mono-tools package. monodoc itself needs to be installed inside the mono-1.9 source directory1 from above.

cd mono-1.9 # this is the source directory from the above
wget  http://go-mono.com/sources/monodoc/monodoc-1.9.zip
unzip monodoc-1.9.zip
cd monodoc-1.9
./configure --prefix=/usr/local
make
make install
cd ../..

next, install mono-tools:

wget http://go-mono.com/sources/mono-tools/mono-tools-1.9.tar.bz2
tar xvf mono-tools-1.9.tar.bz2
cd mono-tools-1.9
./configure --prefix=/usr/local
make
make install

configure will mumble about gecko-sharp.dll not being build, that’s ok, just ignore it.


  1. …otherwise, monodoc will not pick up the C# doc for the base assemblies. 

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
February 13, 2008
filed mid-morning by DrScofield in: hacking, linux, void
technorati tags:
QR code for this entry · average time to read 1:23 minutes

as you hopefully have not noticed (well, there was some downtime, but not more than usually afflicted by cablecom) i switched xyzzyxyzzy.net from gentoo to running ubuntu server 7.10 on monday.1 along with that came a reorganization of the web server directory layout — and i took the chance to clean up. pretty much everything is running again (and thx to having that complete backup of the mysql databases all blogs and photo blogs are back as well :-) — with the exception of the QR code stuff, which was not really generating QR codes for new posts anymore.

this had me baffled as all the path names and what have you were looking ok, permission were fine, the works. still no QR codes and the test image wouldn’t work either…i did manage to get it working, here’s a brief overview2 of what i did:

# install command line php5 so that we can poke at the php code manually, so to speak
% sudo apt-get install php5-cli

# qrcode lib lives in /usr/local/share/qrcode/qrcode_php0.50beta10
% cd /usr/local/share/qrcode/qrcode_php0.50beta10

# let's try invoking the sample.php via php5
% php5 sample.php
[...lots of error messages...]

those error messages revealed that i had forgotten to adjust QRCODE_DATA_PATH — for some strange reason, wp-qrcode doesn’t get that across from the wordpress configuration — fixing that path fixed the problem. sweat :-)

define ("QRCODE_DATA_PATH","/usr/local/share/qrcode/qrcode_php0.50beta10/qrcode_data");

  1. the state of gentoo currently is a sorry one. updating gentoo packages was — over the past year or so — increasingly becoming an adventure in circular dependencies, seemingly irresolvable cross-dependencies, dependencies on non-stable packages by stable ones, the whole monty of sys admin nightmare. i lost the lust for playing gentoo detective i’ve to admit, there are just too many things i’d rather do…sorry, gentoo folks. 

  2. yep, treating xyzzyxyzzy.net as a kind of brain extension here ;-) 

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
January 31, 2008
filed in the early evening by DrScofield in: hacking, linux
technorati tags:
QR code for this entry · average time to read 1:30 minutes

my X60 keyboard has those rather convenient “next page” and “previous page” keys (located just above and to the side of the cursor keys) which i’m using to switch to the next or previous tab in konsole and firefox:

  • adding support for that in konsole was rather easy: just use konsole’s “settings->configure shortcuts…” (go to next session/go to previous session),
  • adding support for it in firefox was still easy: get keyconfig and configure “f4kc_NextTab” on F20, and “f4kc_PrevTab” on F19

pidgin was not that easy. turns out key configurations are hard coded for stuff like the switching to next tab1

as i’m running ubuntu i wanted to use the existing ubuntu pidgin package and modify it for my purposes. i found a nice HOWTO at cyberciti describing how to rebuild a ubuntu (or debian package from source):

# if you've installed this stuff before, skip this step
% apt-get install build-essential fakeroot dpkg-dev     
% mkdir pidgin
% cd pidgin
% apt-get source pidgin
% apt-get build-dep pidgin
% dpkg-source -x pidgin_2.2.1-1ubuntu4.1.dsc
% cd pidgin-2.2.1
% # modify pidgin source
% dpkg-buildpackage -rfakeroot -b
% cd ..
% dpkg -i pidgin*.deb

and here’s the diff to apply to pidgin/gtkconv.c:

*** gtkconv.c.orig      2008-01-31 20:09:24.000000000 +0100
--- gtkconv.c   2008-01-31 20:10:46.000000000 +0100
***************
*** 1899,1904 ****
--- 1899,1919 ----
                                return TRUE;
                        }
                        break;
+               case GDK_F20:
+                       if (!pidgin_conv_window_get_gtkconv_at_index(win, curconv + 1))
+                               gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), 0);
+                       else
+                               gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), curconv + 1);
+                       return TRUE;
+                       break;
+
+               case GDK_F19:
+                       if (!pidgin_conv_window_get_gtkconv_at_index(win, curconv - 1))
+                               gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), -1);
+                       else
+                               gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), curconv - 1);
+                       return TRUE;
+                       break;
                }
        }
        return FALSE;

oh, and here’s my “$HOME/.xmodmaprc”:

keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 146 = XF86ScreenSaver
keycode 227 = Menu
keycode 249 = XF86ZoomIn
keycode 234 = F19
keycode 233 = F20

i’ve placed a little script in “$HOME/.kde/Autostart”:

#!/bin/bash
xmodmap $HOME/.xmodmaprc

to have those keybindings set up on login.


  1. …or the pidgin folks have done a tremendous job of obscuring the information of how to customize this… 

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
October 17, 2007
filed late at night by DrScofield in: from the grid, linux
technorati tags:
QR code for this entry · average time to read 0:07 minutes

just been looking at the definitive mobile phone project, the one to rule them all :-) and came across the following youtube clip:

not much to add…except:

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
September 28, 2007
filed in the early afternoon by DrScofield in: linux
technorati tags:
QR code for this entry · average time to read 1:27 minutes

while i’ve been using knetworkmanager and its side-kick kicker applet rather successfully on our private laptops (all running kubuntu now), it’s never been an option for my IBM laptop (both meanings of the words apply here :-) as we are using the IEEE8021X variant (with X.509 certificates) for controlling access to the internal network — something which knetworkmanager does not seem to support.

what i’ve been using is a pre-up script to start wpa_supplicant on my WLAN interface. that usually works ok — it usually does fail once i try to access a public WLAN or my private WLAN at home: then it becomes an elaborate dance of killing the ipw3945 daemon (the X60 has an intel ipw3945 WLAN card), unloading the ipw3945 module, waiting a bit, and reload the the ipw3945 module…followed by hoping that wpa_supplicant will pick up the current WLAN…which it very often does but then doesn’t get the DHCP lease…hmph :-(

my first attempt was to use debian’s wpa-roam feature (kubuntu being a debian based system): works nicely with the work network and our WPA/WPA2 setup at home — but fails to pickup public WLANs after a suspend–resume cycle :-(

next attempt (after trying all kinds of things…long story) is to use the managed approach in /etc/network/interfaces:

allow-hotplug wlan0
iface wlan0 inet manual
        wpa-driver wext

iface default inet dhcp

iface home inet dhcp
        wpa-ssid                homessid
        wpa-ap-scan             2
        wpa-scan-ssid           1
        wpa-psk                 secret
        wpa-proto               RSN
        wpa-key-mgmt            WPA-PSK
        wpa-pairwise            CCMP

iface otherhome inet dhcp
        wpa-ssid                otherhomessid
        wpa-ap-scan             2
        wpa-scan-ssid           1
        wpa-psk                 anothersecret
        wpa-key-mgmt            WPA-PSK
        wpa-pairwise            CCMP

iface work inet dhcp
        wpa-ssid                WORK
        wpa-ap-scan             2
        wpa-scan-ssid           1
        wpa-key-mgmt            IEEE8021X
        wpa-pairwise            TKIP
        wpa-group               WEP104
        wpa-eap                 TLS
        wpa-identity            identity@work.com
        wpa-ca-cert             /home/dirk/certificates/work-root-cert.pem
        wpa-client-cert         /home/dirk/certificates/dirk-cert.pem"
        wpa-private-key         /home/dirk/certificates/dirk-key.pem"
        wpa-private-key-passwd  yetanothersecret

iface public inet dhcp
        wpa-ssid                ""
        wpa-ap-scan             2
        wpa-scan-ssid           1
        wpa-key-mgmt            NONE

i’m making use of the logical interface concept of kubuntu/debian here. to activate the WLAN for at home use i’d do:

ifup wlan0=home

to shut it down again, a simple

ifdown wlan0

does the job. likewise for the other WLANs.

that finally does seem to do the trick. :-)

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.