FSCONS – laptop setup

To remove as many potential problems as possible for the upcoming FSCONS we pre installed 9 laptops and tested them on the projectors all around the IT Univ. Took a while. Especially to get xorg.conf right.We had to add a Virtual subsection to the Screen. The computers are old IBM/Lenovo T60.

Anyhow, here’s the Laptop setup team. The X team?

Patrik Willard eating Kebab … while I am working hard

Pontus Andersson

me ….. no further comments

Mattias ‘matmat’ Mattsson

What's your history? Lots of cats

Read this marvelous posting called “Show me your history” and decied to check my history (and thereby do a health status check on my life). So I copied the command:

history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head

and ran it through a not-so-pretty-filter. All in all the commands looks like this:

history | awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’|sort -rn|head | awk ‘ {  printf “   %s\n”, $0} ‘

So what have I been doing lately? This:

101 cd
71 ls
29 bzr
28 more
24 rm
24 make
17 cat
16 apt-cache
10 ssh
8 touch

A lot of cd is ok and pretty common I guess. That many ls?.. a bit strange.  bzr, more, rm, make feels ok. But why so many cat? Simply because cat is a great editor. I use the command cat for many things:

cat in editor mode:

cat > file.txt

cat in append editor mode:

cat >> file.txt

cat in DVD rip mode:

cat /dev/dvd > DVD-RIP.ISO

and of course the DVD is such that I am allowed to do that!

cat in printer mode:

cat | lpr -P 414

… I simply love cat. Which is rather strange considering I am allergic to cats.

FSCONS – zeroing in

I am part of the organising team of FSCONS. Organising a conference means, late nights, heaty discussions, tough decissions, work work work. And it means, working with nice people, talking to new speakers I’ve never met before, getinng encoraging words. It’s a hard job … but a whole lot fun.

Here’s two pictures of the “Posterise IT Univ Chalmers” team.

Patrik Willard Crapface himself

Patrik Willard <— and —> me

Using ommunication tool in different places

I wotk at two different places, meaning two different computers. Add to that the private laptop (mainly for FSFE FSCONS and GNU Xnee work) plus the family desktop. The sum is 4 computer which I use actively more or less on a day to day basis. The locally installed tools I use for communication are: icedove and pidgin.

Adding one person to your Address book or Buddy list to your computer means I have the person in one computer only. Remedy is version control, accessible over the net. So far I’ve been version controlling some of the files for pidgin. Worked out quite nice. Having added ‘robban’ I now decided to take the step to version control everything in pidgin, including the logs. After that follows icedove versioning. Let’s see how everything works out.

Wish there was a simple way to have you private PGP key easily available over the net ;)

It's alive. Swinput has gotten a new developer

Some 4 years have passed without much done in the swinput project. Even though we’ve received a number of reports, not much have been done. The only thing that happened was that swinput had been turned into a patch work, due to all the small fixes done with months in between them.

When Daniel Hiepler send a patched swinput 0.7.2 I realized that swinput is a really fun program (kernel module) to both use and develop so the energy is back.
I am planning a workshop on developing linux modules (kernel modules) and swinput may actually be a good basis…. hmmmm.

Will update Gnu Xnee‘s test scripts accordingly.
BTW, Swinput can fake a mouse and a keyboard by using the Linux Input System. The swinput modules read from a device and fakes hardware event (mouse motion, key presses etc) as commands written on the devices. Swinput presents status etc on the proc filesystem.

… and Daniel, thanks for teaming up :)

Convert words/files to images

Hi,

after a short discussion yesterday about safe registration and using images with text I decided it’s about time I learn how to create images from words on the command line. Or even better, generate a HTML file, made of images, from a GNU Xnee source file.

[Added after original post: scripts can be found here http://www.sandklef.com/stuff/bin/]

OK, here’s a file that takes a word as its first argument and a filename as second:

#!/bin/bash

export PRIMARY=”-size 800×120 xc:white “
export TEXT_PRIMARY=”-fill black -annotate +20+80 “
export TEXT_SHADOW=” -fill red -annotate +21+81 “
export TEXT_SHADOW2=” -fill yellow -annotate +22+82 “
ARG=$( echo “$1″ | sed -e ‘s,\\\\*,*,g’)
#echo “gen for \”$1\” –> \”$ARG\”"
convert $PRIMARY $TEXT_PRIMARY “$ARG” $TEXT_SHADOW “$ARG” $TEXT_SHADOW2 “$ARG” -trim
+repage $2

I named the file: word2png Here’s how to use it:

word2png “IFK” ifk.png

It’s about time for the next file. Read a text file (such as a header file in the Xnee sources), call word2png for every word in it, and add some HTML stuff. Here’s the file:

#!/bin/bash

TMP_DIR=/tmp/file2png
IDX_FILE=${TMP_DIR}/index.html

rm -fr ${TMP_DIR}
mkdir  ${TMP_DIR}
rm -f  ${IDX_FILE}
CNT=0

whtml()
{
echo "$*" >> ${IDX_FILE}
}

whtml "html body"
if [ "$1" = "" ] ; then echo "Missing file arg....." ; exit 1 ; fi
if [ ! -f $1 ] ; then echo "Missing file arg....." ; exit 1 ; fi

echo "Using file: $1"
while read line
do
#  echo "read $line"
ARG=$( echo "$line" | sed -e 's,*,*,g'  -e 's,,,g'  )
for i in $ARG
do
./word2png "$i" ${TMP_DIR}/${CNT}.png
whtml ""
(( CNT++ ))
done
whtml "
done <  $1

whtml "/body /html "

echo "wrote to: $IDX_FILE"

I called it: file2png Here’s how to use it:

file2png xnee.h

Then open up the file /tmp/file2png/index.html in your browser.

I know it’s useless….. but I really think it’s kind of fun!

dual head with xrandr

I use a laptop with the 915GM chipset. This means that I can use xrandr (yes!!!!). During login I (automatically) run the following little script that checks if I have plugged in the external monitor and if so splits the screen. If I later on unplug the monitor I simply run the script again and same goes for replugging it.

#!/bin/sh

VGA_USED=$(xrandr | grep -c “VGA connected” )
LVDS_USED=$(xrandr | grep -c “LVDS connected” )

setup_dual_head()
{
xrandr –output LVDS –auto –pos 0×0 –left-of VGA
}

setup_mono_head()
{
xrandr –output LVDS –auto
}

if [ "$VGA_USED" == "1" ]
then
setup_dual_head
else
setup_mono_head
fi

To make this work make sure you have setup X correctly. In the screen section I have the following important part (note the virtual size):

SubSection “Display”
Viewport 0 0
Modes “1280×1024″
Virtual 2560 1824
Depth 24
EndSubSection

8 datorer / 3 kvm, men ingen null modem-kabel

Satte just ett par datorer till i grovköket.Allt som allt är där 8 stycken datorer just nu (nej, alla är inte igång) på 3 kvadratmeter. Förresten, datorerna är små klena så det är inte värt att göra inbrott.

Nåväl, jag skall till att testa dem lite (man vill ju gärna leka lite) genom att koppla in dem på en central dator via serie-kabel (och minicom). Helt plötsligt märker jag att jag saknar null modem-kablar. Helt kasst. Var tusan har jag lagt hela den härvan med kablar någonstans?

Nåväl, ganska bra egentligen. Jag lägger mig och läser Gaston-boxen i stället.