Monday, June 08, 2009

TrackPoint Scroll

This works for my Lenovo ThinkPad R61 (7732-CTO) running Archlinux.



Create a file in /etc/hal/fdi/policy called mouse-wheel.fdi with the following:



<match key="info.product" string="TPPS/2 IBM TrackPoint">>
<merge key="input.x11_options.EmulateWheel" type="string">>true</merge>>
<merge key="input.x11_options.EmulateWheelButton" type="string">>2</merge>>
<merge key="input.x11_options.YAxisMapping" type="string">>4 5</merge>>
<merge key="input.x11_options.XAxisMapping" type="string">>6 7</merge>>
<merge key="input.x11_options.Emulate3Buttons" type="string">>true</merge>>
<merge key="input.x11_options.EmulateWheelTimeout" type="string">>200</merge>>
</match>>

Kindly ignore the duplicate tags.



Now, if you click and hold the middle mouse button, you can use the TrackPoint to scroll vertically and horizontally. As of June 8, 2009, I am still unable to get my touchpad to work ><

Sunday, February 15, 2009

ksh PS1 and reloading .profile

OpenBSD comes with a plain "$" prompt in the shell. To spice things up, enter the following in your .profile:


PS1="\u@\h:\w$ "; export PS1


This will give username@host:PWD$.




To reload the .profile after making these changes, type the following:


. $HOME/.profile


There is a space after the first dot. Source

Friday, January 09, 2009

SCIM in OpenSolaris

Add the following two lines to your $HOME/.profile file:


GTK_IM_MODULE=scim


export GTK_IM_MODULE

Flash Player 10 on OpenSolaris


  1. Download the .tar.bz2 file from Adobe.

  2. bunzip2 [name of file]

  3. tar -xvf [name of file]

  4. cd [name of directory]

  5. cp libflashplayer.so /usr/lib/firefox/plugins

  6. Restart Firefox

Wednesday, December 17, 2008

Helpful commands for R


  1. library(foreign) - Allows you to load Stata and Excel files, among others.

  2. foo <- read.dta("location") - Loads a Stata *.dta file.

  3. names(foo) - Lists the names of the variables in dataset foo.

  4. fit <- lm(y~x,data="foo") - Linear regression of Y on X using data in foo.

  5. fit <- glm(y~x,family=binomial(link="probit"),data="foo") - Probit regression of Y on X using data in foo.

  6. summary(fit) - The stuff you want in model fit.

Friday, December 12, 2008

Importance of reading manual pages (wireless)

I had some difficulty configuring wireless at Georgia Tech for OpenBSD, but it was only because of my failure to read the manual pages carefully.


Under the nwkey entry of ifconfig(8), "The key can either be a string, a series of hexadecimal digits (preceded by '0x')..." (emphasis mine). Obviously, if there is no '0x', then ifconfig assumes your WEP key is a string. In our school's case, the WEP key is hexadecimal.

Wednesday, December 10, 2008

VIm and Arrow Keys

For some reason, using arrow keys in VIm is equivalent to typing ABCD. A temporary fix is to type :set term=cons25.