...making Linux just a little more fun!



[ In reference to "An NSLU2 (Slug) Reminder Server" in LG#141 ]

Ben Okopnik [ben at linuxgazette.net]

Thu, 4 Jun 2009 08:26:03 -0500

----- Forwarded message from "Silas S. Brown" <ssb22@cam.ac.uk> -----

Date: Fri, 29 May 2009 20:34:43 +0100
From: "Silas S. Brown" <ssb22@cam.ac.uk>
To: tag@lists.linuxgazette.net
Subject: Talkback:141/brownss.html
In my article in LG 141, "An NSLU2 (Slug) Reminder Server", I suggested running a script to check for soundcard failure and repeatedly beeping the speaker to draw attention to the problem when this happens.

However, since upgrading from Debian Etch to Debian Lenny (LG 161 Upgrading Your Slug), I have found this script to be most unreliable: the NSLU2 can crash completely in the middle of a beep, leaving the speaker sounding permanently and the NSLU2 unusable until you cut the power. The probability of this crash seems to be well above an acceptable level, and the watchdog somehow fails to reboot the NSLU2 when it happens.

I have not been able to get any clue about why this failure now occurs in the new kernel + OS, except to say that it seems more likely to occur when the operating system is under load. A "workaround" is to increase the length of time between the beeps (say, beep every 10 seconds instead of every second), but this merely reduces the probability of the crash; it does not eliminate it.

Does anyone have any insight into this?

Thanks. Silas

Silas S Brown http://people.pwf.cam.ac.uk/ssb22
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


Thomas Adam [thomas.adam22 at gmail.com]

Thu, 4 Jun 2009 13:28:39 +0100

---------- Forwarded message ----------

From: Sigurd Solås <sigsol@gmail.com>
Date: 2009/5/27
Subject: How to get a random file name from a directory - thank you for the tip!
To: thomas.adam22@gmail.com

Hello Thomas, I youst wanted to thank you for the shell script you provided in the Linuxgazette on how to pick a random file from a directory. Yesterday I was searcing the Internet for a simple way to do this, and then I came across your method in a post there.

The script you provided is now in use on a computer that plays wav audio files from the hard disk, and the sound card is connected to the stereo, in effect the computer works as a conventional CD-changer.

Here you can see how your method is implemented in the script aplay.sh - it is started like this from the command line:

$ aplay.sh MusicDirectory
while sleep 1; do
aplay -D hw:0,0 "${myfiles[RANDOM %num]}"

The aplay.sh script plays music in an endless loop, by pressing Ctrl-C once, it jumps to the next song. By pressing Ctrl-C twice in quick succession, the script exits. I dont know if you know this, but the aplay program that is used inside aplay.sh is a program that comes with the new Linux sound system ALSA, so it should be available on most of the newer Linux distributions. Again, thank you wery much for the code, and have a nice day.

Best regards,

Sigurd Solås, Norway.


[ In reference to "Easy Shell Scripting" in LG#133 ]

Papciak, Gerard (Gerry) [Gerard.Papciak at Encompassins.com]

Fri, 5 Jun 2009 21:37:41 -0500


I have a number of files in a Unix directory that need certain words replaced.

For instance, for ever file inside /TEST I need the word 'whs' replaced with 'whs2'.

I have search and searched the sed command and kornshell scripting...no luck

Sed 's/whs/whs2/g /TEST*.* > outfile
The above came close but places the contents of all files into one.

Any advice?

-- Gerry Papciak Information Delivery

[[[Elided content]]]

[ Thread continues here (6 messages/7.95kB) ]


[ In reference to "Serving Your Home Network on a Silver Platter with Ubuntu" in LG#141 ]

Ben Okopnik [ben at linuxgazette.net]

Thu, 4 Jun 2009 08:08:52 -0500

----- Forwarded message from peter <petercmx@gmail.com> -----

Date: Fri, 15 May 2009 15:35:22 +0700
From: peter <petercmx@gmail.com>
Reply-To: petercmx@gmail.com
To: editor@linuxgazette.net
Subject: Ubuntu Server Setup
In August 2007 ....an age ago, you published an article "Serving Your Home Network on a Silver Platter with Ubuntu". Quite good really, idiot proof, more or less. I used the article in the main to set up my first home server. It has stayed up, only crashes when I do something stupid which is only once or twice a year.

I was thinking that it is perhaps time to go back to the table and set up the server again, running 7.10 does sound a bit dated given the noise that Canonical have been making about how 9.04 is a good option for servers.

Just wondering if you have any plans to update and expand the article? There really is not much to be found through google. Well actually there is heaps of it but since it is all written in the words of the mega tech it is of zero value to people like me. There seem to be a lot of people like me who run home networks (or really want to) and need some hand holding.

The guide was good to start but it left a lot missing ... things like why you should partition properly to separate out the /home partition; how to tweak squid so that it really works well; how to implement dyndns; how to run a backup / image of the server; how to VPN / VNC..... , how to set up a common apt update server, useful things like that ......

I know that home servers are not so important in say the States where the Internet always works and works well. I live in the North West of Thailand. For entertainment we go and watch the rice grow. Trust me, that really is fun. The Internet performance sucks badly on a good day and so developing your own independence is fundamental or at least managing your Internet use. Squid helps, having your own SMTP is good (since the local ISP is owned by the government and often has problems).... as you will note there are many topics that could be covered.

Many writers can only see technology from the perspective of the West. Asia is a whole different kettle of fish and a huge expanding market.

Do let me know if you have any plans to update this guide ..... even a comment on the rss feed would be fine ....


----- End forwarded message -----

* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

Talkback: Discuss this article with The Answer Gang

Copyright © 2009, . Released under the Open Publication License unless otherwise noted in the body of the article. Linux Gazette is not produced, sponsored, or endorsed by its prior host, SSC, Inc.

Published in Issue 164 of Linux Gazette, July 2009