Free Like GNU

It's GNU for you!

Archive for the ‘gnu-fu’


The budget geek in search of a cheap fix

Some folks can plop down many hundreds of dollars on iPhones, the latest console game machines (and their pricey games) and Uber desktops. Once in a great while I get to spend a little money to geek out on some kind of technology too, though I have to be a bit more frugal. Usually it’s something old that is cheap on eBay. I’ll look for something that will run Linux and has some novel quirk. One of these was an old Itronix 250 military laptop. The device was waterproof, drop-onto-concrete-proof and weighed more that my 2 other laptop machines combined. I upgraded the processor, hacked in a wifi card and antenna, installed a few various versions of Ubuntu and tried with success to get all the features like touchscreen and graphics drivers working nice. Even though it wasn’t the latest gadget, it was cheap for thrills and exercising the Linux skills. When I sold it (for a bit less than all the time and money I put in) I felt I’d had a good deal of fun with it, like working on an old VW bug. One thing I wish I had tried on it was TinyCore Linux founded by one of the lead developers of the famous DSL project, Robert Shingledecker.  TinyCore takes the idea of a compact yet extensible graphical Linux desktop to the extreme at 10MB!  I think it would also work on an Alix3d3 machine I’m experimenting with.  Currently Voyage is running on the  Alix and humming along quite nicely as a “bulletproof” looping video display device running mplayer with a DVD iso file.  The Alix now looks a bit dated in the graphics compared to the new Ion based tiny PCs out there, but it is still more flexible in some ways and durable.  These little machines are cheap and fun to hack not unlike various wireless routers such as the venerable Linksys wrt54g of old (2.2 and earlier) and the Asus wl500w.  The latter I bought because it had a minipci slot instead of the radio being part of the main board and its usb ports to support the TB drive shared on my little network.  It was a great candidate for the OpenWRT firmware and I found others who had made it work well.  All these things are cheap and distracting, some have proven quite useful.  One thing that really makes it fun is the community.  Because others have written blogs, posted in forums, mailing lists or chatted in IRC, I never feel alone in the dark.   I think this is where the real entertainment value is, especially when we contribute to these conversations with our own experiences, questions, reviews, how-to’s etc.

2.6.28.8 Kernel for Alix 3d3 with joystick module

I wanted to add a kernel module for my Alix 3d3 but I figured I would just build a more current kernel for the Voyage Linux 6 installation instead.  Because I am a total weenie, I got excited about a cool program called KernelCheck.  It’s basically a GUI for building configuring and packaging (yes Debian packaging!) the latest greatest kernel from kernel.org.  I built the kernel from my Ubuntu machine using the latest config file from the Voyage kernel, enabled the joystick module and installed the resultant .deb in Voyage.  w00t!
linux-image-2.6.28.8-ultimate_2.6.28.8-ultimate-10.00.Custom_i386.deb

headers if you need ‘em :

linux-headers-2.6.28.8-ultimate_2.6.28.8-ultimate-10.00.Custom_i386.deb

enjoy!

More one-liners!

I just noticed this one tonight, check out Command-line Fu for lots of great shell-j00ky!
Thanks again to NixCraft for the link!

How I love AWK, let me delimit the ways…

tonight I came up with a super handy one-liner to handle a massive number of split files that were in groups:

ls -1 -Q *.001 | awk -F'.' '{print $1"."$2"\"""\ "$1"."$2".\?\?\?\""}' | xargs -l1 par2repair

see, I had a folder whose contents look like this:

file1 space [123456a].ogg.001
file1 space [123456a].ogg.002
file1 space [123456a].ogg.003
file1 space [123456a].ogg.004
file1 space [123456a].ogg.005
...
file1 space [123456a].ogg.par2
file1 space [5321fff].ogg.vol00+01.PAR2
file1 space [5321fff].ogg.vol00+02.PAR2
...
file2 space [5321fff].ogg.001
file2 space [5321fff].ogg.002
file2 space [5321fff].ogg.003
file2 space [5321fff].ogg.004
file2 space [5321fff].ogg.005
file2 space [5321fff].ogg.006
....
file2 space [5321fff].ogg.par2
file2 space [5321fffa].ogg.vol00+01.PAR2
file2 space [5321fff].ogg.vol00+02.PAR2...
file3...
and so on...

WHAT A MESS! If it looks familiar, you must be some kind of otaku!

At first I would manually join all the files in one group that end with a period and three numbers with a cat command

cat file1\ space\ [123456a].ogg.??? > file1\ space\ [123456a].ogg

but even with tab completion, it was tedious, and I would still have to check them with par2repair (usually with the help of pypar2) to make sure they were in good shape!

THERE HAS TO BE A BETTER WAY!!!

after some searching for scripts to join files and coming up with nothing that could handle multiple GROUPS of files, I noticed a blog post that mentioned par2repairs ability to join the split files into the missing file and verify in one step! Just give it a list of files to search from for pieces:

par2repair file1\ space\ [123456a].ogg file1\ space\ [123456a].ogg.???

that simplified the process enough for my feeble mind to formulate a line, but first I needed to rip the extensions off the filenames. Some folks seem to like the “basename” command, but I could not wrap my head around it. AWK could do it if I could use a period as the delimiter. Of course it can!

First lets list the first file of each group, wrap it in (-Q)uotes, and make sure there is one name per line:
ls -Q -1 *.001
which gave me:
"file1 space [123456a].ogg.001"
"file2 space [5321fff].ogg.001"
"file3 space [af23498].ogg.001"
...

now I want to pass that on to AWK, delimit vars by “.” and spit out just the first two vars(with the period added back in between!):
ls -1 -Q *.001 | awk -F'.' '{print $1"."$2}'
but it also truncated the end quote, DOH!
"file1 space [123456a].ogg
"file2 space [5321fff].ogg
"file3 space [af23498].ogg

Thats OK, I can have AWK add the quotes (spaces, wildcards, etc. all escaped) back in as well as the rest of the arguments I want to pass on to par2repair!
ls -1 -Q *.001 | awk -F'.' '{print $1"."$2"\"""\ "$1"."$2".\?\?\?\""}'

that looks like a mess but it’s just because of the escape sequences:
“/ ” is an escaped space character (like the %20 you might see in a URL)
“/?” is an escaped question mark (the wild card for a single character)
“/”" is an escaped double quote

so the above command gives an output of:
"file1 space [123456a].ogg" "file1 space [123456a].ogg.???"
"file2 space [5321fff].ogg" "file2 space [5321fff].ogg.???"
"file3 space [af23498].ogg" "file3 space [af23498].ogg.???"

which is perfectly formatted so that I can pipe each line of that (with the help of xargs -l1) to a separate par2repair command!
BAM!

ls -1 -Q *.001 | awk -F'.' '{print $1"."$2"\"""\ "$1"."$2".\?\?\?\""}' | xargs -l1 par2repair

now if you want to add a bit to delete the processed files, you are on your own!

Credits:
I got help for the AWK delimiting on NixCraft:
http://www.cyberciti.biz/tips/processing-the-delimited-files-using-cut-and-awk.html
A post on the Ubuntu forum that inspired me to come up with a better way..
http://ubuntuforums.org/showthread.php?t=321142
I’ll post the one-liner there now… :-)

Shell Shout-Outs: iftop

Folks may shun the shell when using their computers but honestly, there are some great treasures to be found.  Today I’ll highlight a great little network bandwidth and connection monitor called iftop.
This handy terminal tool shows a near real-time display of connections to or from your computer through a network device. It will give you a nice little bar-graph representation as well!

iftop screenshot

You can install it in Ubuntu or Debian with a quick:

$ sudo apt-get install iftop

Then try this to see whats happening on your wireless card:

$ sudo iftop -i wlan0 -P

the “-i ” specifies your network device that you can find with:

$ ifconfig

enjoy!

New Home for the Blue Line Riders

The Blue Line Riders logo

 There are blue line riders and then there are The Blue Line Riders. Having been the former since moving to the Second City and now enjoying the latter while traveling to and from work as the former is only natural and so typically Chicago. If that were not enough, I’ve now been charged with building a new website for the most excellent Blue Line Riders! In case you’ve not had the pleasure of their sweet sounds upon your ears, you owe it to yourself to give a listen to the streaming mp3’s at bluelineriders.com.

Ubuntu 8.10 Intrepid Ibex Beta

I must say that Ubuntu 8.10 is really shining on my tablet.  I made a live USB stick of 8.10 with the slick usb-creator app (works from 8.04 too) and booted up with correct resolution (1280×800), perfectly working wireless (intel4965agn adapter) that could connect with my university TTLS/PAP wifi network.  Even the SDHC card reaader is working with my 16GB card! Suspend also worked flawlessly and faster as well (2 or 3 seconds instead of 4 or 5).  Wireless comes back quickly too.  In Hardy I had to wait about 10 seconds before wireless came back online, now it reconnects almost instantly.

gimp26.png
The only major snag was having to manually futz with the xorg.conf to get my tablet to work.  Once configured, I played with GIMP, recently updated to 2.6!  GIMP is much improved for tablet support and has some nice options for changing brushstokes with not only pen pressure, but also velocity!  This is as close to painting on a real surface that I’ve seen in any non-custom paint program.

GNOME 2.24 Display Prefs
GNOME desktop configuration is much tighter with the Appearance preferences.  The new, darker, human theme is great for those who work in the late hours with lights low or in dimly lit cafes.  I eventually switched back to XFCE for desktop, because of fast rock solid panels (GNOME panels are still relatively sluggish, even with animation turned off and low delay settings).  GNOME does have a very nice way of altering the display settings though.

The main reason for trying 8.10 was the new kernel and wireless stack, and I must say that the increased hardware compatability is well worth it!

Ubuntu Hardy gets Sweeter with Sugar!

Wow, what a nice surprise! (This has actually been in development since December of last year :o ) The OLPC Sugar desktop environment is available in the Ubuntu Hardy repository! You can use the emulator to run it in a window or login as a full blown desktop through GDM (the default login screen for (X)Ubuntu users)! I had trouble with connecting to my WPA network, but I think if I stop Network-Manager before loging in with Sugar, it will work.  The turtle-art application worked very nicely and it was fun to browse networks.  I would love to have Sugars network browser in a little box, or as a desktop background in XFCE.  Now I have to find a way to make Sugar happy on a 800×600 screen so my kids can use it on their machines.

Available activities (in Hardy Universe) are:

  • sugar-calculate-activity
  • sugar-chat-activity
  • sugar-connect-activity
  • sugar-logviewer-activity
  • sugar-memorize-activity
  • sugar-pippy-activity
  • sugar-terminal-activity
  • sugar-turtleart-activity
  • sugar-web-activity

Many of the missing applications (measure, newsreader,analyze) can be found by adding the Sugar PPA repository! It looks as though Paint and Record may be available before long as well. You may also be able to run the Gutsy versions from the debs in Jani’s PPA archive. SimCity/Micropolis is in there too!

Visit Jani Monoses blog for other related developments.

(I just could not resist changing the title)

New HP 2710p and Notes

HP 2710p Stock image

Recently, I bought a nearly new HP 2710p.  I immediately formatted the HD and installed Ubuntu Hardy!  I am very pleased that nearly everything works! Suspend and resume with accelerated graphics and rotation was something I really wanted with my TC1100. I was lucky that this machine was configured with and Intel 4965 AGN card and a WWAN card (which I have not yet activated).  The 2710p is very much like a super-charged TC1100 with dual-cores and other modern conveniences like a fingerprint scanner and a smart-card reader.  Mine did not come with the webcam though I don’t think I’ll miss the feature much. Battery life is very good and the design is very clean. Removing the annoying palmrest stickers required Goo-Gone, but the finish was unharmed. Here are some notes about getting this bad-boy configured in Ubuntu:

Some things that seem to be missing are:

  • Wacom support, which I found HERE (gentoo hardware wiki)
  • Screen Rotation: Make a script called rotate.sh

$ nano ~/rotate.sh
with the following contents:

#!/bin/bash
#script by Francisco Athens modified from Gentoo Wiki Intructions:
#http://gentoo-wiki.com/HARDWARE_HP_Compaq_2710p#Brightness_and_Rotation
#get current setting
testrot=`xrandr -q |grep LVDS | awk '{print $3}'`
#test if screen is rotated in protrait mode
if [ "$testrot" = "800x1280+0+0" ];then
#optional kill any old xvkbd instances so that
# fresh one can load in the correct place in the screen
#killall xvkbd
xrandr -o normal
xsetwacom set stylus rotate 0
xsetwacom set eraser rotate 0
else
#killall xvkbd
xrandr --output LVDS --rotate right
xsetwacom set stylus Rotate CW
xsetwacom set eraser Rotate CW
#optional: put xvkbd on the bottom of the screen
#xvkbd -always-on-top -geometry 800x150+0-0
fi

chmod +x ~/rotate.sh

  • Kernel Panic on lid close! This is a big issue, but I found the solutution HERE (Ubuntu Forums)

I edited my /etc/rc.local:
first make sure the path is correct
$ ls /proc/acpi/video/
there should be only one folder, so in my case for “C09A” add this line to /etc/rc.local:

echo "1" > /proc/acpi/video/C09A/DOS

before the “exit 0″ line

  • Fingerprint Reader Support can be found HERE
  • Current Ubuntu Hardy 2.6.24 iwl4965 driver appears to have problems connecting to TTLS/PAP 802.1x networks (sigh) as reported HERE (intel linux wireless forums).

Review: Elephants Dream

I’ve written a review of Elephants Dream, the first open-source movie and have published it on HyperEd.org. The following is the abstract from the review:

Elephants Dream (2006) is an Open-Source movie that challenges us to think about the way we produce artifacts of culture and the ways in which that culture may exist on our own open terms rather than dictated by proprietary, dominant and oppressive means. This document is a reflection on these ideas and explores the positionality of Elephants Dream, and the tools used and developed in its creation among the dominant media and media production cultures.

Enjoy!