Letters

Raspberry Pi

We recently asked readers to tweet or comment on our Web site about what they've done with their Pis. Here are some of the responses:

  • @gholmer: Using my Pi to run a Q-Link Reloaded server: www.lyonlabs.org/commodore/qlink/index.html

  • @packetgeek: One of my #RPi boards runs Softsqueeze, as a $35 replacement for a $300 Squeezebox.

  • @retux: Using Raspi with cloud storage davfs and encryption with encfs. A way to extend SD memory lifetime.

  • @strawberrybrick: I use my Raspberry Pi as Squeezebox while at work: my.opera.com/djfake/blog/2012/12/12/squeezeslave-and-the-raspberry-pi.

  • @kitestramrt: My Rasp is #3, housed by @fusabe. Hosts drift.to/pap, #tt-rss, #ownCloud and drift.to (Figure 1).

  • @anlarye: I use my pi as an xbmc media center.

  • @Bonbuzaru: #RPi is our computer for a self-built RV/camper: logging GPS & environment data, media centre & soon leisure battery monitoring.

  • @_hamzux_: my Raspberry Pi running #owncloud and a #subversion server #RPi (Figure 2).

  • jerpi_bilbo: #RPi I am a Raspberry Pi Model B w/512MB. I like hiking, long walks along the beach, and wait...I'm a Linux/ARM target board.

  • @josephbottinger: Raspberry Pi running a midi foot controller AKA Alcyone Beta (Figure 3).

  • @shawnp0wers: My Raspberry Pi dangles naked behind my television, running RaspBMC!

  • Submitted by bolt on LJ.com: My Raspberry Pi sits in the middle of the living room, on a shelf, outputting sound to my stereo while looking like an out-of-place ancient SCSI CD-ROM. Controlled remotely with SSH from an Android phone (blog.dhampir.no/content/cd-rom-raspberry-pi-case).

Thanks for all the feedback folks! It's great to see how everyone uses their Raspberry Pi.—Ed.

SIGALRM Timers and Stdin Analysis

Regarding Dave Taylor's article “SIGALRM Timers and Stdin Analysis” in the November 2012 issue: here's a method that's a little tidier. I commented out the “tracing” prints. With more thought, it could be made to handle concurrent timed tasks:


#! /bin/bash

function allow_time
{
   (
      #echo timer allowing $1 seconds for execution
      sleep $1
      kill -ALRM $$
   ) &
   alarmPID=$!
   taskTimedOut=0

}

function timeout_handler
{
   #echo allowable time for execution exceeded.
   taskTimedOut=1
}

function timeTask
{
   trap timeout_handler SIGALRM
   allow_time $2
   #echo "alarmPID=$alarmPID"
   $1
   if [ $taskTimedOut -eq 0 ]; then
      kill -9 $alarmPID
      wait >/dev/null 2>&1
      true
      return
   else
      false
      return
   fi
}


echo "Finishes soon enough"
timeTask "sleep 2" 4 || (echo "task 1 took too long"; exit 1;)

echo "Takes too long"
timeTask "sleep 5" 4 || (echo "task 2 took too long"; exit 1;)




Neal Murphy

Dave Taylor replies: Nice solution, Neal!

Linux in Education

To Shawn Powers: I happened upon your blog following a link in the last issue of Linux Journal (to which I subscribe)—the Gc script. I will give it a try, and let you know how it worked for me.

As a fellow Director of Technology of a school district, I imagine that you must be facing similar challenges when it comes to implementing and adopting Linux in your environment. I am a Microsoft-certified professional, a Mac lover and a Linux enthusiast (although I still consider myself a newbie), and as such, I want to give our students and faculty more choices when it comes to computer platforms. Last year, I converted some older PCs from Windows XP to Linux Mint, but the experience wasn't a totally positive one. Because of that, I am somewhat reluctant to try again or to expand Linux to more of our schools. The main issue was an inability to make the Linux experience an enjoyable one to the users and to make Linux “play nice” in an Active Directory environment (especially when it came to accessing and saving files to network shares). I wrote asking for help and advice from the Linux Journal folks, but no one even acknowledged my messages.

If you are currently using Linux in your school district, I'd be happy to know which distribution works best for your students, and I'd appreciate any recommendations, tips or advice you might have for me. Also, perhaps you can convince your colleagues at Linux Journal to do a story about the use of Linux in K–12 education. I'm sure that it would inspire other IT professionals who might be struggling with the same issues as I am.

Thank you and looking forward to your insight.


Lucian Micu

Indeed it's difficult to bolster the usage of Linux in an environment bent on proprietary solutions. Through the years, I've used several distributions in our school, but for the past few years, I've had the most luck with Ubuntu or a variant. I didn't have an Active Directory environment, but I found that hosting files on a Linux server worked best for me. I could share via NFS with my Linux thin clients, and SMB with Windows and OS X. I even used netatalk to share with OS X sometimes. Because it was from a central Linux file server, I could share the same files over a variety of protocols. You may not have that option, which means lots more work and testing, unfortunately. Good luck, and keep fighting the good fight!—Shawn

Photo of the Month

It's always good to see Tux on my flights!


Oscar Javier Bello Pérez

Tux on a Flight

Figure 1. @kitestramrt's RPI

Figure 2. @_hamzux_'s RPI runs #owncloud and a #subversion server.

Figure 3. @josephbottinger's RPI runs a midi foot controller AKA Alcyone Beta