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.
January 25, 2008
filed mid-afternoon by DrScofield in: from the grid, hacking
QR code for this entry · average time to read 0:43 minutes

want to run your own secondlife grid? not satisfied with that lousy 512m² plot in the middle of that sleazy, red-light district sim somewhere on a remote secondlife island on the LindenLab grid? ever dreamed of becoming a railway tycoon and running a railway company in secondlife — but couldn’t effort those 16 islands because you weren’t a wealthy railway tycoon in RL to begin with? how about that 4×4 sim grid with a couple islands and lots and lots and lots of sea to stage those regattas?

well, here’s your chance to become a grid master, a grid superlord — just 3 easy steps to start your own grid:

  • install mono & subversion (a simple apt-get install mono subversion on ubuntu boxes)
  • check out OpenSim:
        % svn co http://opensimulator.org/svn/opensim/trunk opensim
        % cd opensim
        % ./runprebuild.sh
        % nant
        % cd bin
        % mono ./OpenSim.exe
  • connect to your now running OpenGrid like so:
        % secondlife -loginuri http://127.0.0.1:9000

voila! your very own “grid” — admittedly not yet that 16 region grid i mention in the beginnig, but!, we are getting there :-)

coming up next: i want more regions!

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 23, 2008
filed at around evening time by DrScofield in: from the grid
technorati tags:
QR code for this entry · average time to read 0:17 minutes

just read florian jensen’s blog entry on “AOL adopting XMPP aka Jabber” — interesting! interesting for two reasons:

  1. XMPP is also the underlying protocol of my vu*gate project :-)
  2. it adds quite a bit of momentum to the jabber/XMPP “movement” — AOL is not a mom-and-pop instant messaging service

nice to see standards succeed :-)

of the big ones, that leaves MSN and, erm, sametime. hmm.

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.
filed mid-afternoon by DrScofield in: from the grid
technorati tags:
QR code for this entry · average time to read 0:37 minutes

this morning ansi and i were wondering how we could do XmlRpc calls to OpenSim. well, this is what we found out:

  • to have a reasonable XmlRpc experience™ you should enable the remote admin interface, to do so just add the following lines to your OpenSim.ini file:
        [RemoteAdmin]
        enabled = true
        access_password = secret
  • next open up your-editor-of-choice™1 and use the following piece of python code2

run and you should see on OpenSim’s region console:

[RADMIN] [01-23 04:17:10] Broadcasting: the answer is 42

and, of course, an alert popup in your SL viewer:

message from god


  1. yep, found the “™” key combination for my keyboard ;-) 

  2. i’m using a standalone OpenSim installation. 

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 3, 2008
filed mid-afternoon by DrScofield in: hacking, research
QR code for this entry · average time to read 0:32 minutes

SyntaxHighlighter is quite a nice wordpress plugin that provides syntax highlighting for a range of programming languages (among them my favorites python & C#). the problem is, in its original unadulterated form it doesn’t play with my favorite markup plugin php markdown extra at all :-(

after quite a bit of hacking, it transpires that one can make them play nicely with one another. the idea that i pursued was to change the [source:XXX] tag to < source lang=XXX> and have php markdown treat it the same as the < pre> tag.1

getting markdown extra to recognize the < source> tag is fairly easy2, i needed to change to read

next, in the syntax plugin, all occurrences of [source: are replaced by < source lang=.

i’ve created ZIP files of the modified SyntaxHighlighter and Markdown Extra plugins, share and enjoy.


  1. to prevent any of the parsers from jumping on the tags, i’ve inserted a space between ‘<’ and the tag name. 

  2. …once you figure it out, that is. 

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.
filed in the early afternoon by DrScofield in: from the grid, hacking
technorati tags:
QR code for this entry · average time to read 0:49 minutes

yesterday i updated the wordpress plugins on our d2h.net and xyzzyxyzzy.net blogs. once done, both blogs would not work anymore…duh! the updated geopress plugin was borked :-( — or so it seemed…

…it turned out that i had added code to the earlier version of geopress to do pretty printing of coordinates, and, of course, the update flushed that code down the drain. thanks to a regular backup running on our web server, however, that code was not gone forever. here are the functions that i added:

the_geo_coord() gets the coordinates via geopress’s the_coord() function and simply substitutes commas for spaces.

likewise,

takes geopress’s the_coord() and pretty-prints it as human readable “old-style” latitute–longitude coordinates. the_geo_coord_esc() finally, produces a URL escaped longitude–latitude coordinate for use inside a, well, URL:

just add those PHP functions to geopress/geopress.php, shake, stir, and save.

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.