Sunday, May 4, 2008

Linux: Connecting projector without X restart

Because projector usually have a different resolution then high resolution laptop LCDs one has to change the resultion of the X Server after connecting the projector. This used to require an X server restart. With RandR 1.2 this is possible without. It does not work with Xgl though. Thus to use compiz with it one has to use Aiglx (which in turn requires to change the video plug-ins). One can set the resolution either with xrandr or more comfortable with krandrtray under KDE.

Thinkpad T61 Hotkeys for OpenSuse 10.3

To get the hotkeys working for the T61 under OpenSuse 10.3 I added to /usr/lib/hotkey-setup/thinkpad_hotkey_handler for switching on off the toupad:
4104) HOTKEY="Fn+F8"
/usr/bin/synclient TouchpadOff=$[! `/usr/bin/synclient -l|grep TouchpadOff|/usr/bin/awk '{print $3}'`]
ACTION="toggle touchpad"
;;

for changing the screen brighness:
4112) HOTKEY="Fn+Home"
ACTION="brighter display"
echo up > /proc/acpi/ibm/brightness
;;
4113) HOTKEY="Fn+End"
ACTION="darker display"
echo down > /proc/acpi/ibm/brightness
;;

and to suspend when closing the lid:
20481) HOTKEY="close lid"
ACTION="suspend"
powersave -u
;;

International character without dead keys

For typing international characters the US-International keyboard layout is very convenient. The disadvantage is that the so called dead keys are very inconvenient for programming where a lot of keys ', `, " are used. Thus I created a variant which uses the second Alt as the US international but does not use the dead keys. This way I do not have to switch between standard US for programming and US international for internal text.

For any Unix with X you create this variant by adding to /usr/share/X11/xkb/symbols the following:

> partial alphanumeric_keys
> xkb_symbols "intl-nodeadkeys" {
>
> name[Group1]= "U.S. English - International (without dead keys)";
>
> include "us(basic)"
>
> // Alphanumeric section
> key { [ grave, asciitilde,dead_grave, dead_tilde ] };
> key { [ 1, exclam, exclamdown, onesuperior ] };
> key { [ 2, at, twosuperior, dead_doubleacute ] };
> key { [ 3, numbersign, threesuperior, dead_macron ] };
> key { [ 4, dollar, currency, sterling ] };
> key { [ 5, percent, EuroSign ] };
> key { [ 6, asciicircum, onequarter, dead_circumflex ] };
> key { [ 7, ampersand, onehalf, dead_horn ] };
> key { [ 8, asterisk, threequarters, dead_ogonek ] };
> key { [ 9, parenleft, leftsinglequotemark, dead_breve ] };
> key { [ 0, parenright, rightsinglequotemark, dead_abovering ] };
> key { [ minus, underscore, yen, dead_belowdot ] };
> key { [ equal, plus, multiply, division ] };
>
> key { [ q, Q, adiaeresis, Adiaeresis ] };
> key { [ w, W, aring, Aring ] };
> key { [ e, E, eacute, Eacute ] };
> key { [ r, R, registered, registered ] };
> key { [ t, T, thorn, THORN ] };
> key { [ y, Y, udiaeresis, Udiaeresis ] };
> key { [ u, U, uacute, Uacute ] };
> key { [ i, I, iacute, Iacute ] };
> key { [ o, O, oacute, Oacute ] };
> key { [ p, P, odiaeresis, Odiaeresis ] };
> key { [ bracketleft, braceleft, guillemotleft, guillemotleft ] };
> key { [bracketright, braceright, guillemotright,guillemotright ] };
>
> key { [ a, A, aacute, Aacute ] };
> key { [ s, S, ssharp, section ] };
> key { [ d, D, eth, ETH ] };
> key { [ k, K, oe, OE ] };
>
> key { [ l, L, oslash, Ooblique ] };
> key { [ semicolon, colon, paragraph, degree ] };
> key { [ apostrophe, quotedbl, dead_acute, dead_diaeresis ] };
>
> key { [ z, Z, ae, AE ] };
> key { [ c, C, copyright, cent ] };
> key { [ n, N, ntilde, Ntilde ] };
> key { [ m, M, mu, mu ] };
> key { [ comma, less, ccedilla, Ccedilla ] };
> key { [ period, greater, dead_abovedot, dead_caron ] };
> key { [ slash, question, questiondown, dead_hook ] };
> key { [ backslash, bar, notsign, brokenbar ] };
>
> include "level3(ralt_switch)"
> };

Friday, May 2, 2008

Myrinet and Tau

To use Tau with Myrinet Mpich one needs to give:
-mpilibrary="-lmyriexpress -Lpath"

In my case for helics the full configure is:

./configure -pdt=/home/thor2/rschulz/software/pdt -prefix=/home/thor2/rschulz/software/tau -c++=g++ -cc=gcc -fortran=gfortran -mpi -mpiinc=/opt/mpich-mx/1.2.7..5/gcc-4.1.2/include/ -mpilib=/opt/mpich-mx/1.2.7..5/gcc-4.1.2/lib/ -PROFILE -mpilibrary="-lmyriexpress -L/opt/mx/1.2.4/kernel-2.6.22.9/lib64"