Letters

Readers sound off.

Letters

Well Done!

I have only had broadband Internet recently, so am still discovering the best places therein. Chance brought me to your site today, and that was it. Hooked. Not only is the content interesting (if often essentially a pointer), but the site itself is excellent. Clean, legible, well structured—congrats.


Lewis Smith

We're glad to have you! There are many people in my area here in northern Michigan who still have dial-up. Once you have broadband, it's hard to imagine life without it! Have fun.—Ed.

Slackware Linux?

I've been using Linux for years now and just recently obtained a subscription to Linux Journal—great magazine! I started out using Ubuntu, but I have advanced my Linux arsenal and have been using Slackware for almost over a year! It's definitely not for the faint of heart, but it's a solid OS and very true to the Linux spirit. I wanted to suggest LJ possibly include more information on this Guru-targeted OS for some of us who are less fortunate! Regardless, keep up the good work!


Michael Griffith

We'll see what we can do. Slackware truly is an awesome distribution, but like you said, it's not for the faint of heart. I can't promise we'll have more Slackware-specific stuff, but we'll try to remember Slackware users in our articles.—Ed.

Two Minor Corrections

I just wanted to write in to make a couple minor corrections that may have confused some beginners.

The first one is in Kyle Rankin's review of the Chinavision Pico Projector in the November 2010 issue. He stated that port 21 was open in the Linux operating system of the device and wondered if telnet actually had been enabled. Port 21 is actually for FTP; telnet is port 23. This could have been a typo or just an oversight, but I wanted to clear up any confusion readers may have had.

In Part IV of Mick Bauer's “Building a Transparent Firewall with Linux” series in the December 2010 issue, he states that iptables ignores inter-VLAN traffic and describes that as being traffic between different ports within the same VLAN. Traffic within the same VLAN is actually intra-VLAN rather than inter-VLAN. This is similar to the difference between an intranet and an Internet, of course.

Again, these are minor and pale in comparison to the enormous level of great content LJ publishes every month. Keep up the good work.


Brandon McCombs

Generating Turn-by-Turn Driving Directions

Today I got a chance to mess around with Dave Taylor's script in the December 2010 issue. Although I'm new to using curl, sed and lynx, the driving directions application in the article gave me some leads to study while using the Bash shell.

Thanks very much for a such a nifty script. After customizing the script as suggested by Dave, I've got it accessible from a directory structure I use for my scripts, so it's now a great addition to my listings. My other small change to the script was to send the output to a desktop.txt file on my desktop, so I could print it out before leaving the house en route to a new customer site.

The code in the article that starts with curl --silent, I finished up on the last section with the following change after the last \:

lynx -dump -stdin > $HOME/Desktop/directions.txt

Then I added a line that gets me set to print the listing sent by the script:

gedit $HOME/Desktop/directions.txt



Dave Mawdsley

Dave Taylor replies: Thanks for the feedback, Dave. It's always nice to hear that people have enjoyed some of my mad-scientist hacking.

Back to School for Linux

I've been wanting to go back to school for quite some time and complete my degree. As I've recently become interested in Linux and open source, and I'd like to be able to leverage my education with my love of open source—or at least open standards.

The only problem is that the more I look, the more I find degree programs centered around .Net and Microsoft operating systems. Are there any schools that offer UNIX- or (even better) Linux-centered curricula?

As I'm currently already established with family, friends and work, it would be incredible if I could get a great education with the flexibility to attend remotely. Is such a thing in existence now? Thanks for your help!


M. Miller

It's been quite a few years since I was in college myself, but my guess is that Linux-specific degrees are pretty rare. My recommendation would be to look toward programming, networking or Web development. They're not Linux-specific, but you'd be able to specialize within the field.—Ed.

Dave Taylor Is Doing a Good Job!

In the January issue of LJ, there was a letter from a reader that basically tore into Dave Taylor. I just wanted to say that I think Dave Taylor is doing a good job. When it comes to computers, there is always more than one way to do something. There is the “Good Way”, the “Better Way” and the “Wrong Way”.

There may be more efficient ways of doing things than the ways that Dave shows in his articles, but that doesn't make them wrong. I think it would have been fine for the reader to point out better ways of doing things. But, the letter came across as just mean.

As someone who does many Bash tutorials myself, I know that you can have a 100 people like your tutorial, but it takes only one mean comment to ruin your day. So, to counteract the bad day that read may have given Dave with his harsh letter, I would like to give Dave some encouraging words.

Dave, you do a good job. I look forward to your articles each month. I thank you for what you do, and I'm sure many readers would agree with me.


Kristofer Occhipinti

Netflix Streaming

In the December 2010 issue, a reader asks for help watching Netflix streaming movies from Linux. I found a way to do that.

The problem is the Microsoft DRM, which is difficult to get around, but you can proxy it. By proxy, I mean you can use a Windows-intermediary computer. With a Windows PC running PlayOn software from MediaMall, you can make Netflix streaming video available to a Linux box. I describe this setup for watching Netflix with VLC on Linux in my blog (www.innate-ideas.net), but this method also works for watching with XBMC or other UPnP/DLNA-aware software under Linux. Hope that helps.


Earl

Thanks. You are correct, PlayOn (although not free) works fairly well, but unfortunately, it still requires Windows to work. Granted, you don't need to be sitting at the Windows computer if you use PlayOn, but it's still there. It's very frustrating that Netflix insists on using Microsoft's Silverlight DRM. Thanks for the recommendation. For those folks who don't mind a Windows install hiding in a closet somewhere, it's a great way to watch streaming video on Linux.—Ed.

More Ways to Count Files

Reading the letter “Another Way to Count Files” in the January 2010 Linux Journal, I find that Michael Eager's method improves on Dave Taylor's by reducing the number of external programs called (to a round zero) and also by actually removing a bug (introducing another though).

Dave Taylor's script does not handle directories correctly as the ls command would give the contents of matching directories instead of the names. This could easily be remedied though, by using ls -1d instead of ls -1.

But correcting that, Michael Eager introduces another problem instead. His script cannot handle files and directories with spaces in the names. I know spaces in names are frowned upon by die-hard Linux/*nix people, but despite being an old-hand myself, I use them regularly. I find that the Linux/*nix community probably should be more aware of this problem, and maybe Dave Taylor could focus one of his columns on this problem.

A solution that uses no external calls and without the pitfall of Michael Eager's (my own requiring Bash though) is:

#! /bin/bash
...
Matches=0
for Match in $Pat*
do
 if [ "$Match" != "$Pat*" ]; then
   Matches=$[Matches + 1]
 fi
done

I am aware that my solution could be relatively costly if there are a lot of matching files/directories. I guess there is still more than one way to skin a cat.


Torben Rybner

January 2011 Issue

To Shawn Powers: things you helped me with from this month's issue. I'm now listening to Pithos—most excellent, thank you! I have used BackupPC for about two years now—great to see it mentioned.

Tell Mick Bauer that his firewall series of articles is great. I thought about a Linksys WRT54GL router—might do that. I just stopped using IPCop (I think that was last month's article), and now I'm using SmoothWall 3.0 (just to get a 2.6 kernel).

I've been using the Clonezilla live CD for about four years now [see Jeramiah Bowling's article “Clonezilla: Build, Clone, Repeat” in the January 2011 issue]. It has saved my behind more times than I can remember. It is an outstanding product and is developing well.

Keep up the great work everybody! Oh, and, let's see, this is issue 201, so let's see at least 201 more issues. That means, 13 issues per year, so 15 years from now, what will we be reading? Linux OS in world domination and some upstart OS trying to knock Linux down a notch! (Maybe Bill's nephew, trying to save what's left of MS. We can only hope.)


Bob Wooden

I'd like to keep my childhood fantasies alive and assume in 15 years we'll all be living in space. Linux Journal will be where everyone goes for current events and information, and our flying cars will all be running embedded Linux. Oh, and my hairline will stop receding!

Seriously though, thanks for the kind words. We love what we do here, and it's great to see others enjoy the fruits of our labor.—Shawn.

Linux for Science Column

Joey Bernard's new column, “Linux for Science”, is one the reasons I keep subscribing to Linux Journal. Yes, I enjoy the system administration hints and industry news, but what makes Linux so wonderful is the thought that I, or anyone else, can use the same tools in basement science experiments that are used in research labs. I am eagerly awaiting future articles from Mr Bernard.


Kwan Lowe

Joey Bernard replies: Thank you very much for the encouragement. My day job involves helping university researchers do computational science, and I'm always amazed at all the things you can do. If there are any particular subjects or programs you would like to see covered, please let me know.

Welsh Command Prompt (PS1)

As a lover of Linux and the Welsh language, I thought it might be useful to post a Perl script that will give a Welsh language-based prompt. Edit the .bashrc to the following:

PS1='`/home/ed/cymraeg.pl`:`pwd`: '

cymraeg.pl:
#!/usr/bin/perl -w

%mis=(Jan=>"Ionawr",Feb=>"Chwefror",Mar=>"Mawrth",
↪Apr=>"Ebrill",May=>"Mai",Jun=>"Mehefin",
↪Jul=>"Gorffennaf",Aug=>"Awst",Sep=>"Medi",
↪Oct=>"Hydref",Nov=>"Tachwedd",Dec=>"Rhagfyr");
%dydd =
%(Mon=>"Llun",Tue=>"Mawrth",Wed=>"Mercher",Thu=>"Iau",
↪Fri=>"Gwener",Sat=>"Sadwrn",Sun=>"Sul");

chop ($mnth = `date +"%b"` , $day = `date +"%a"` ,
 ↪$rhyf = `date +"%d"`);
 foreach $mmonth(keys %mis) {if ($mmonth eq $mnth)
 ↪{ $fy_mis = $mis{$mmonth}; }}
   foreach $dday(keys %dydd) {if ($dday eq $day)
 ↪{ $fy_dydd = $dydd{$dday}; }}
print "Dydd_$fy_dydd-$rhyf-Mis_$fy_mis";

Assuming everything works okay, you should get the following:

Dydd_Mawrth-02-Mis_Tachwedd:/home/ed:

For anybody who is a Welsh speaker and spends considerable time at a *nix prompt, this is, for me at least, a cathartic experience.


Ed Williams

I'm always worried when we print things I don't understand. The little-geek-that-got-bullied-in-school part of me always assumes someone's making fun of me. Although I don't think your command prompt is calling me four-eyes, I'll leave it to our Welsh-speaking readers to figure that out.—Ed.

Correction for a Correction

First I would like to thank Dave Taylor and Frederic Mora (see Dave Taylor's “Function Return Codes and Daylight Calculations” in the October 2010 issue and Frederic Mora's letter in the December 2010 issue). The daytime script became the beginning of a script I wrote to capture the power generated on my home solar array. It's silly to log anything at night, so figuring out when the sun will rise and set made the job easier.

But, the correction that Frederic wrote, although much easier to read is also incorrect. The early morning hours have a leading 0 (07, 08, 09 and so on), so bash takes those as an octal number, and starting at 8:00 AM fails with the following error:

line 64: 08: value too great for base (error token is "08")

So, you need to declare the numbers as base 10. This keeps 08 a decimal 8 and not the impossible octal 8:

currenttime=$(( 10#$hour *60 + 10#$min))
sunrisetime=$(( 10#$srh *60 + 10#$srm ))
sunsettime=$(( 10#$ssh *60 + 10#$ssm))

An alternative is to strip off any leading 0.


Alan Anderson

Networking on the Command Line

It was nice to see a command-line tool for network configuration (see Joey Bernard's Upfront piece in the December 2010 issue). Please do more! I do have one thing to add. I am currently running CentOS 5.4, and the configuration files Joey mentioned in his article are different. Below is a an example with the path. Also, note the difference in the auto setting. There is a configuration file for each network interface:

[root@CentOs01:/etc/sysconfig/network-scripts#] cat ifcfg-eth0
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=static
BROADCAST=172.16.175.255
HWADDR=00:0C:29:77:D0:7E
IPADDR=172.16.162.3
NETMASK=255.255.240.0
NETWORK=172.16.160.0
ONBOOT=yes

By the way, I'm really enjoying the 200th issue.


Mickey Craven

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix