January 31st, 2010
I noticed that firefox did *something* when clicking the middle mouse button without hovering a link. I finally found out what it did and how to disable it:
http://aymanh.com/archives/2006/01/27/firefox-and-middle-click-clipboard-url
So setting middlemouse.contentLoadURL to false keeps firefox from trying to load the current clipboard content.
Posted in Uncategorized | No Comments »
May 31st, 2009
Yesterday I got a new mouse. A Logitech G5. Being a nice mouse overall it has a small little flaw: clicking the mouse wheel is not that easy because you can click it in three ways. Down and from left and right.
As I frequently use the middle mouse button I was not happy (because it often misinterpreted a click for a wiggle-left). As a geek I thought: wiggling the mouse wheel to the left is even easier than clicking on it. I would no longer have to lift my finger off the left mouse button. The question was: How can I remap this 7th mouse button?
After some research I found it was very easy to remap the button.
First you have to correctly configure the mouse in your Xorg configuration file:
Section "InputDevice"
Identifier "Logitech G5"
Driver "evdev"
Option "CorePointer"
Option "Device" "/dev/input/by-id/usb-Logitech_USB_Gaming_Mouse-event-mouse"
Option "ZAxisMapping" "invert"
Option "Emulate3Buttons" "false"
Option "Buttons" "9"
Option "Resolution" "800"
EndSection
(My thanks go to chuck)
From there it took a bit more research to learn that I can use xmodmap to easily remap the mouse buttons:
xmodmap -e "pointer = 1 7 3 4 5 6 2 8 9"
Remaps button 7 into the poistion of button 2 ( mouse- wheel-click). For more information visit the very good tutorial by HP.
Now I just had to put the “pointer = 1 7 3 4 5 6 2 8 9″ part into a file into my home directory (surprisingly called .Xmodmap) and let Fluxbox execute it at startup.
Now I just have to get used to other mice not worknig like that ;-)
Posted in Uncategorized | No Comments »
February 5th, 2009
Every now and again I had the problem of matching postal codes and countries. I often wondered if there is a system to (austrian) postal codes and finally found a table that says how to map a postal code to a country.
I encoded it into a simple PHP function – maybe it is useful :-)
plz2bl.php
Posted in programming | No Comments »
November 16th, 2008
For a long time I searched for a way to connect two monitors to an NVIDIA graphic card without using the proprietary nvidia driver (mainly because I wanted to try use OpenBSD and 64bit FreeBSD).
Somehow I never read nv’s (the free Xorg driver) man page – until today. And there it is, clear as crystal:
Option "Dualhead" "boolean"
Enables simple VBE-based dual head mode. This sets the same resolution on both outputs and lays them out
side-by-side. The screens will be panned together as one big metamode if the virtual desktop is larger than both
screens combined.
So I just had to change my Xorg config from:
Section "Device"
Identifier "Card0"
Driver "nvidia"
Option "TwinView"
EndSection
to
Section "Device"
Identifier "Card0"
Driver "nv"
Option "Dualhead"
EndSection
So simple!
Tags: nvidia, xorg
Posted in operating_systems | No Comments »
July 11th, 2008
I just stumbled on a very good article by Ken Thompson on computer security:
Reflections on Trusting Trust
In this article Ken shows how easy it is to alter a compiler to compromise all binaries created with it. Although 24 years old this article is a very interesting read.
Tags: operating_systems, security
Posted in operating_systems | No Comments »
July 10th, 2008
The more I used it, the more unhappy I became with the us-intl keyboard layout. Especially all the dead keys (keys that may modify the following key e.g. ” + a to write ä) made typing tiresome. Always typing a space after double quotes is really not suited for programming.
I found a good tutorial on writing your own Xorg keyboard layouts:
Creating custom keyboard layouts for X11 using XKB
Using these instructions I created a us_de layout, that uses the us layout and bind alt + a/u/o/s to the german umlauts ä/ü/ö/ß.
To install the file, just copy it to /etc/X11/xkb/symbols/ and edit your /etc/X11/xorg.conf (or type setxkbmap -layout us_de -variant basic into a shell): us_de
Tags: keyboard, operating_systems, X11
Posted in operating_systems | No Comments »
March 4th, 2008
I just tried to get cups working and had the following problem:
I have a Lexmark Optra E+ parallel port printer and usually cups shows the parallel port as Device: on the second configuration screen. Only this time cups did not recognize the parallel port. lptest > /dev/lpt0 worked fine, just cups could not see the parallel port.
After about half an hour I finally found the solution:
# ls -l /dev/lpt0
crw——- 1 root wheel 0, 57 Mar 4 20:00 /dev/lpt0
The rights on /dev/lpt0 were not set correctly. After changing them, everything worked fine:
# chmod 666 /dev/lpt0
# ls -l /dev/lpt0
crw-rw-rw- 1 root wheel 0, 57 Mar 4 20:00 /dev/lpt0
Tags: cups, freebsd
Posted in operating_systems | No Comments »
March 4th, 2008
When I compiled audacious without dbus support yesterday I did not know it would break all application options (i.e. entering audacious -f on a shell skips to the next track) . Today I read a bit in the audacious sources and found that it has to be compiled with dbus support in order to work.
Tags: audacious, dbus, freebsd
Posted in freebsd, operating_systems | No Comments »
March 4th, 2008
Today I configured k3b on FreeBSD. The building from ports works fine (although it took almost all morning. But then again k3b depends on most of KDE ;-)).
Turns out all I had to do was to enable the ATAPI/CAM Driver: link
Tags: freebsd, k3b
Posted in freebsd, operating_systems | No Comments »
March 2nd, 2008
I just started to try out FreeBSD 7.0 (I am very impressed so far) and ran into huge problems installing my favorite window manager ion3 . Apparently the main developer had some trouble with various distribution maintainers and forbade then to ship ion (link).
After some try and error (and a pointer in the right direction by Markus) I finally figured out how to tweak the system.mk to make ion3 compile.
I had to change the following things:
- install to $(HOME)/ion (you have to create this directory first)
- comment DL_LIBS=-ldl (as this lib seems to be part of the FreeBSD libc anyway)
- Set the path for lua 5.1
- uncomment DEFINES =+ -DCF_NO_LOCALE -DCF_NO_GETTEXT
Attached: system.mk
Tags: freebsd, ion3
Posted in freebsd, operating_systems | No Comments »