28 December 2012

raspi at work

I must admit that I am really, really excited about my raspi (raspberry pi). I ordered it three months ago and during all this time I have spent a lot of time thinking about the endless possibilities that such an amazing piece of machinery could offer.
I have installed a lot of applications from the debian archive, perhaps the most outstanding ones are the servers: ssh, ftp, http and gopher.
In the screenshot you can see the result of:
 $ lynx gopher://localhost
and the moment of writing this post.

13 December 2012

My raspi finally arrived!

This came as a complete surprise. Well I ordered it more than three months ago (On September 2nd to be exact) but now after thirteen weeks it is already here.
My surprise is due to the fact that I thought I would be notified by e-mail about the shipping but that didn't happen. Today I got home for lunch and it was there.
At the moment, I am downloading the raspbian (debian based) to boot this wonderful toy.
I'm publishing here one of the pictures I took but I'll upload some more later. One of them goes to my profile.

09 December 2012

Pou 4

Fourth week with Pou. I have reached level 50 (mission accomplished).


08 December 2012

Pencil holder

I got this pencil holder today scnr ;)

02 December 2012

multinput (Multiple mouse/keyboard input with xinput)

I have got a dual head main desktop. I always thought it would be nice to be able to use several keyboards and mice working independently. Today I learnt how to easily configure multiple input with xinput only to discover that my settings will always disappear after every reboot or logout.

Well, the logical next step was to write an script to automatically activate multiple input but since I also want to be able to deactivate it at will I wrote two parts "start" and "stop". So the usage goes:
 $ multinput start
 $ multinput stop
 $ multinput restart
The script can either be run automatically at startup (anacron comes to mind) or manually.
Note: Be warned that this script is for personal use only. Feel free to adapt it to your own needs. I hope you like it and that it is useful for you too.
Here it is:

set -e

# Script for personal use, to set multiple mouse/keyboard input on "odd".
# It uses xinput, so read its man page for more info. In order to list your
# devices type "xinput list"

KEYBOARD2="AT Translated Set 2 keyboard"

usage ()
echo "Type 'multinput start' to use multiple mice/keyboards."
echo "Type 'multinput stop' to stop using multiple mice/keyboards."

start ()
xinput create-master multinput
xinput reattach "$MOUSE2" "multinput pointer"
xinput reattach "$KEYBOARD2" "multinput keyboard"
# Leave devices floating.    
 stop ()
xinput remove-master "multinput pointer"

if [ "$1" = "start" ]
        exit 0
elif [ "$1" = "stop" ]
        exit 0
elif [ "$1" = "restart" ]
        exit 0
        exit 0