Google

Mind Path Technologies Pocket Point RF Remote in Acroread/Others (on Linux)

May 24th, 2006
I’m hoping that someone else has a better solution for this one. We have a pocketpoint remote that works quite well for Power point presentations, but for Acrobat Reader the keybinding is not good. The remote sends p for prior/previous and n for next, which is understood by powerpoint and not by Adobe. I wrote the following lame script to fix this. It works for the most part, but you lose the p and n keys during the presentation. #!/bin/sh

xmodmap -e 'keycode 33 = Prior'
xmodmap -e 'keycode 57 = Next'
acroread &
wait

xmodmap -e 'keycode 33 = p'
xmodmap -e 'keycode 57 = n'

Binding Windows Key to Gnome (foot/hat) Panel Menu

May 22nd, 2006
First run xev to see what the keycode is for your Windows Key On my keyboard it is 115 and is bound to Super_L. Read the rest of this entry »

looping through files with spaces in the filenames in bash

May 16th, 2006
I sometimes have to transfer files with spaces in the names, I like using a for loop, but the usual way doesn’t work. Usual way:
for file in `find . -type f|grep .ext$`
do
   /do/something/to $file
done
To get around this I use a while loop with a read instead. Using the read will read to the end of the line, enclosing within quotes escapes the spaces. Unusual way:
find . -type f|grep .ext$ |while read file
do
   /do/something/to "$file"
done
Or if you don’t like using more than one line…and enjoy the unreadable (I’m transferring all my avi files to another computer in this example)
find . |grep .avi$ |while read file; do scp "$file" 172.16.1.1:; done