Out of general laziness I’ve been using quite a lot of gnome on ubuntu instead of fluxbox. One of the little things I got used to on fluxbox is resizing windows dragging the right mouse button while holding the alt-button(another one is easy borderless windows for stuff like mplayer). Gnome can do this too, but only by clicking the middle mouse button (mouse wheel), I don’t even dare to get used to this to prevent accidental pastes. Unfortunately which button does what is unconfigurable with Gnome (I’ve been told Linus Torvalds has been ranting on Gnome for this recently), so telling it to resize on a right click is impossible. Read the rest of this entry »

Siemens gigaset USB adapter 108 on Edgy Eft

Posted by arj on November 16th, 2006. Posted under: Linux, Technical stuff

Mainly for my own future reference:

using this wireless adapter with the ndiswrapper in Ubuntu 6.10 makes the system freeze. However, at least revision 2104 from https://svn.sourceforge.net/svnroot/ndiswrapper/trunk/ndiswrapper works fine.

Vmware Server Console on Ubuntu 6.10 Edgy Eft hangs

Posted by arj on October 27th, 2006. Posted under: Linux, Technical stuff

After upgrading from ubuntu dapper to edgy everything seemed to be working fine, except for the vmware server console. This displayed the usual error message vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
After this error the program used to start just fine, but after the upgrade it didn’t do anything besides taking 99% of cpu time. Lots of pages mention troubles running Edgy inside a Vmware virtual machine, but not too many report this error.
http://www.debian-administration.org/users/emeitner/weblog/6
mentions a solution to this problem on a beta version of Edgy, and luckily it also works on the final version. So starting the console with LD_PRELOAD=/usr/lib/libdbus-1.so.3:$LD_PRELOAD vmware-server-console works just fine (and as mentioned in the thread on the vmware forums, removing the libpng12.so.0 from the vmware-server-console/lib directory got rid of the innocent error message about the version information also). If this is the only thing that broke with the upgrade, I’m a happy user.

Why adding patches to Solaris is so slow

Posted by arj on July 24th, 2006. Posted under: Solaris, Technical stuff

Installing patches on Solaris 10 seems to take ages. When I was installing a couple of them recently, an interesting process showed up when I used ps to see what it was upto exactly.

/usr/bin/wc -c /usr/jdk/instances/jdk1.5.0/jre/lib/rt.jar, apparently, rather than using the obvious way of asking the filesystem for the size of a certain file, the file is read and the bytes are counted. On other systems (freebsd, debian) wc cheats by just getting the file size from the system if only “-c” is given, but on solaris it obviously does not :)

There are probably plenty of other reasons why patching takes a long time, but this certainly doesn’t speed up things :)

Oh, and the patch fixing recent sendmail vulnerabilities also took the liberty of overwriting the config files with default ones :)

Resizing the aterm font size with your scrollwheel on ubuntu

Posted by arj on July 19th, 2006. Posted under: Technical stuff

Habbie made a nice patch for aterm 0.4.2 to change the font size with the mouse-wheel (http://blog.dataloss.nl/perma/aterm-scrollwheel-fontsize-support/). Aterm has since then reached version 1.0.0 already, but luckily the patch still applied cleanly. Building a patched Ubuntu package also went smoothly, replace 0.4.2 with 1.0.0 in the .patch file and ./debian/rules binary did the trick. For the lazy ones or the people that don’t want to install all the building crap (compilers, debian package creation software) here’s a package (note: if you don’t trust me, don’t download and install this, but build it yourself :) ). The files are here:
aterm_1.0.0-1scrollwheel-1_i386.deb, aterm-ml_1.0.0-1scrollwheel-1_i386.deb

Note that I only changed the version number a bit, so once the repositories carry something newer they probably will overwrite this package.

arj on solaris

Posted by arj on May 15th, 2006. Posted under: Solaris, Technical stuff

Because somehow (;)) search engines link here for search queries involving arj and solaris, I decided I might as well put something helpful up here.

The http://arj.sourceforge.net/ software compiled fine for me on solaris 10. That is, it produced a running binary, didn’t have any .arj files to test it on. With gcc it compiled “out of the box”, for the sun studio compiler (http://www.sun.com/software/products/studio/index.xml) some tweaks had to be done. Some gnu specific stuff had to be removed/replaced in the autoconf files (-G instead of -shared1, some stuff on strip’ing and -fPIC). To achieve this change the DLL and LD directives on solaris in gnu/configure.in. So CFLAGS="-DSUNOS -D_UNIX" should stay in place, DLL_CFLAGS and LD_STRIP set to "", and change DLL_FLAGS to not contain the GNUism -shared, DLL_FLAGS="-G" (patch here: http://blog.bz2.nl/files/arj-solaris-cc.patch).

Alternatively, if you just want to download a binary package, see the blastwave solaris package community for an older version of arj.

1) this caused the not immediately obvious error from ld that “-h” could not be specified together with some other option, cc tried to parse the -shared as -s -h -a -r -e -d

Reading UPDATING before updating netbsd-current

Posted by arj on April 8th, 2006. Posted under: Technical stuff

For future reference, if you get “This kernel requires the NetBSD boot loader” when booting NetBSD sparc64 (on a Ultra5 in my case) with a fresh (newer than 20060131 probably) kernel, you should’ve read /usr/src/UPDATING more carefully :)

They changed some stuff around, so you need to do

# cd src/sys/arch/sparc/stand/ofwboot
# make USETOOLS=never
# cp ofwboot /

before rebooting into your new kernel (also see the netbsd-sparc64 mailinglist). And yes this is documented in /usr/src/UPDATING, but the actual error wasn’t mentioned anywhere yet so here we go.

So what we learned today: actually do read UPDATING before updating :)

vlan adventures on linux

Posted by arj on February 7th, 2006. Posted under: Linux, Technical stuff

Deciding that eth2.42 (the default naming scheme for a 802.1q vlan interface) looked silly, I used /sbin/ip to give it a better name:

/sbin/ip link set dev eth2.42 name vlan42

After this, I noticed the vlan42 device showed up in /proc and sysctl with the tunable parameters like other interfaces; sysctl uses “.” as a delimiter so eth2.42 didn’t get listed. So not only my interfaces look nicer now, they can be tuned (mostly arp related stuff) now too! And there are other pieces of software too that don’t accept a “.” in an interface name, so this should help there as well.

portforwarding wickedness with linux and iptables

Posted by arj on February 7th, 2006. Posted under: Linux, Technical stuff

When I was trying to set up a sort of transparent proxy with linux and iptables I stumbled upon some interesting behavior by the linux tcp/ip stack and iptables.
Being used to regular forwards, I first tried iptables -t nat -I PREROUTING -p tcp --dport 3334 -j DNAT --to-destination 127.0.0.1:3333
This didnt quite work though, so I added an extra ip to an external interface and forwarded to that ip instead (the target ip had to be different from the regular ip on the interface, to distinguish between virtual hosts by apache). This approach worked, although needing an extra ip (albeit an RFC1918 one) didn’t feel quite right.

A while later someone tried to setup something similar, and the same problems were there. We found out that –REDIRECT (oh, the ipchains days come back to mind) should do just what we wanted; forward traffic to localhost. So binding an apache to the loopback interface seemed logical, but it turns out –REDIRECT doesn’t forward to localhost, but to “a local ip”, so you still need to bind to an ip on the receiving interface :(

So I guess it comes down to this: no forwarding to 127.0.0.1 (if you do know a way, let me know)

Oh, and if your program happens to listen on ipv6 as well, –REDIRECT somehow uses some magic to make it look like ipv6:
tcp6 0 0 ::ffff:10.10.10.10:22 ::ffff:10.10.10.3:63570 ESTABLISHED16962/sshd: [accept
Yes, that’s saying tcp6, and yes, I made a connection with ipv4 from 10.10.10.3 to 10.10.10.10, so under the hood it’s doing interesting things with the redirected traffic :)

Keep your metadata to yourself!

Posted by arj on December 12th, 2005. Posted under: Technical stuff

When I downloaded the google-ads plugin for wordpress, the zip also contained a directory called __MACOSX. So apparently the writer of this plugin (or at least the packager) was using OSX and simply added all the files in a certain directory. For people using OSX this stuff is usually not that visible and has its use I guess, but to me it’s just in the way and I have no use for it when I simply download a piece of software.
Luckily, this time it was only a file of 9 bytes, but a while ago I downloaded a zip containing pictures, and there the __MACOSX directory seemed to contain not only thumbnails for the pictures, but also full size copies. So the pictures seemed to be nicely packed in one file, but with a size overhead of about 100%, and the owner was completely unaware of this until we pointed out to him that the file he offered contained about 100 MiB of useless data.
In the mentioned cases no sensitive information was present, but it’s quite usual to have a lot of private stuff in the metadata. Not always as obvious as with a __MACOSX showing up when unzip’ing a file, but for example .doc files and to a lesser extent .pdf may contain a lot of information that’s nobody else’s business (editing time, full usernames, undo information (and yes that may also contain stuff you “deleted”)).
So please people, keep your metadata to yourself!

PS: The adsense-plugin was just an example for me to post this, I really like the plugin itself.