Using ommunication tool in different places
June 15, 2008 on 10:58 am | In Free Software, geek | No CommentsI 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
February 1, 2008 on 6:35 pm | In Free Software, GNU Xnee, geek | No CommentsSome 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
September 28, 2007 on 12:26 pm | In geek | 5 CommentsHi,
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 "< img xsrc="" mce_src="" />”
(( 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
May 31, 2007 on 10:50 am | In Free Software, geek | No CommentsI 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
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^