GNU nano is a pico clone text editor for Unix-like operating systems, and I like it because it's quick and reminds me of using Pine for email in the good-ol' days when an inbox was full of messages from actual human beings. Anyhow, that's besides the point. Let me just say that I use nano frequently throughout the day.
Wednesday, September 10, 2008
Damn you nano!
pfSense Captive Portal with Firewall Schedules
Today's sad story:
Friday, September 5, 2008
3Com Baseline 29XX Switch Password Lameness
Change the admin password on your 3Com Baseline Switch? Can't login anymore?
Thursday, September 4, 2008
Ubuntu Hardy Screen Resolution Hell
Ubuntu Thinktank: "How can we make Ubuntu easier to use?"
Satan: "Well, you could completely automate screen detection so people don't have to manually configure xorg.conf. In fact, you should just stop using xorg.conf. You might also get rid of the Screens and Graphics tool replace it with a single dialog box that allows the user to view his screen resolution and pretty much not do anything else. After all, an automated solution that works for all is the best solution."
Ubuntu Thinktank: "Interesting... but should we really believe that our one solution will work for every hardware scenario? I mean, easy is great but what about the people for whom it doesn't work right, won't they be..."
Satan: "SILENCE FOOLS! ONE WAY FOR ALL IS THE WAY AND IT IS MY WAY FOR I HAVE SPOKEN! (Just make sure it works on my Compaq laptop or there'll be HELL to pay. Hehe, I kill me.)"
-----
So this morning I boot my Ubuntu Hardy machine and behold: 640x480 awesomeness. No real reason for it that I can think of. It's kind of odd because I have a similar problem with my Vista machine "forgetting" it's screen settings, but at least in that case I can CHANGE THEM BACK.
Seems like this is a common problem. Here are a couple reference threads: http://ubuntuforums.org/showthread.php?t=766879 , and http://ubuntuforums.org/showthread.php?t=771810 .
I have a Geforce 6200 video card in the machine and a pretty basic 1024x768 LCD. Not an abnormal configuration by any means. I'm using the proprietary nVidia driver.
I installed nvidia-settings and ran it, but guess what? It's not usable at 640x480. How about that! To all you designers at Gnome who thought: "hmm, is there any way that we can make buttons and stuff like that bigger?", go to hell.
I manually edited xorg.conf to add a line forcing the display to 1024x768, and the display came up at 800x600. That was pretty awesome.
Finally I read a post about adding "Screens and Graphics" back to the main menu. Apparently they didn't get rid of it, they just hid it because the devil made them do it. Running Screens and Graphics I was able to change my monitor type and get back to 1024x768. (Note that if you add Screens and Graphics, it will show up under "Other", and if you run the menu editor at low resolution you'll have to use the tab and arrow keys to move around because the mouse will just scan around the virtual screen instead of clicking on what you want to be clicking on)
Oh, I should note that you can edit your menu by right clicking on it and choosing Edit Menus. I believe it should be the Applications menu that you right click on, but I can't remember. My menu is just a little Ubuntu icon because I couldn't stand all the space the default menu took on the panel.
As I wrap this up, I'd like to offer a bit of advice to the Ubuntu Thinktank:
There are two things that I need more than anything out of an easy-to-use graphical operating system:
1) The ability to enter stuff into the computer with the keyboard and mouse.
2) The ability to see the stuff I entered.
Any sort of screwups in those regards are showstoppers. Don't take away the user's ability to easily make changes to his configuration. You want to automate things? Cool. Do both.
Friday, August 29, 2008
Safari Books Online by O'Reilly
I recently signed up for O'Reilly's Safari Books Online which is an online book service providing complete titles from O'Reilly and several other technology book publishers. O'Reilly, if you didn't already know, is one of the leading publishers of technology books. You've seen their books in the Computer section of your local mega-chain bookstore -- they're the ones with the pictures of ducks and chickens and badgers and snakes on them.
Safari Books Online contains, as far as I can tell, the complete lineup of O'Reilly books and titles from other publishers such as Microsoft Press, Que, Manning (think pictures of swashbucklers and jesters), Prentice Hall, and Adobe Press to name a few. As I write this, there are over 6,100 books available. Full books. Complete with indexes, tables of content, and errata.
Having browsed a little bit through everything that's available, my current "Favorites" lineup includes Beautiful Code, MySQL - Fourth Edition, Building Web Services with Java, Programming Python - Third Edition, and A Designer's Guide to Adobe Indesign and XML.
In addition to books, there is other content available such as articles and videos. The videos were a big suprise and now are my favorite feature of Safari. I've been watching Java Fundamentals LiveLessons I and II (14 hours!) by Deitel & Assoc., Working with Color by Bruce Heavin, and Inspired CSS by Andy Clarke. Videos are availabe in both Flash and Quicktime format, and stream reasonably well (though not as well as I would like at times). Video learning is the fastest way I've found to soak up information without falling asleep or becoming distracted.
The best part of Safari: it's only $42.99 per month for a wealth of information at your fingertips. There are cheaper versions of the service ($23 - 40) called "Safari Bookshelf" in which you have a fixed number of slots (10, 20, or 30) that you can fill with books. But the Bookshelf service only includes limited access to the service and requires that you think about which books you'd like to take a look at. With "Safari Library" being complete for $43, it's the no-brainer choice.
Just today I had to do some mucking with a BIND server and instead of Googling my brains out or trying to read documentation written by programmers, I simply went to Safari and checked out DNS and BIND, 5th Edition and DNS and Bind Cookbook. These are books that I would love to have on my bookshef for just this occasion, but I don't work with BIND enough to warrant purchasing them. (Did I mention that you also get up to 35% off when purchasing a print book from Safari?)
Enough raving, the service does have its flaws.
First, reading online is hard on the eyes and simply not as comfortable as kicking back with a book. While Safari does provide an index and table of contents for every book, it can't touch flipping through real pages for ease of use.
Second, the reading experience is somewhat hampered by the intentional limits imposed by the services. For instance, you can only read one section from a chapter at a time, and you have to click the "Next" button to proceed onward. This means that you're reading the books in what are essentially little snippets which can really slow you down. Some books are actual scans and they only let you see one full page at a time. Thus if there is a corresponding photograph on the next page, you have to click "Next" to get to it (there's a photography book I'm reading and I find myself clicking the Next and Previous buttons all the time to switch between the text and images). All of this is made worse by the semi-ajaxy implementation -- there is nothing to indicate that the next page is loading after you click, and browsers like Firefox do not know how to scroll up to the top of the page when you flip to the next page.
Third, the service is kind of slow. Not unusable slow, but noticable 1-2+ second page loads slow. When you're only given a snippet to read at a time, those seconds really start to add up.
All the negatives aside, Safari is great. Having access to this amount of great information is simply amazing.
Wednesday, August 27, 2008
Installing Dell OMSA and SNMP in Ubuntu 8.04 on PowerEdge R200
This is going to be a simple step by step as I go.
Go!
1) Become root:
sudo su.
2) Edit /etc/apt/sources.list to include the following line:
deb ftp://ftp.sara.nl/pub/sara-omsa dell sara
This is an unsupported repository that has the dellomsa package.
3) apt-get update
4) Install snmp daemon and tools:
apt-get install snmp snmpd
5) Install openipmi service (I'm not sure if this is necessary, I had already installed it):
apt-get install openipmi
6) Install OMSA:
apt-get install dellomsa
7) Enable snmp in OMSA. Note: this will automagically make changes to your snmpd configuration.
/etc/init.d/dataeng enablesnmp
8) /etc/init.d/dataeng restart
9) Verify that you can connect to http://YOUR_IP:1311 . You should be able to login with a local system user.
10) IF YOU HAVE AN SAS6IR CONTROLLER DO THE FOLLOWING
10.1) Install mptctl driver:
modprobe mptctl
10.2) To load the driver at boot, edit /etc/modules and add the line:
mptctl
10.3) Initialize new driver with OMSA (or something like that):
/etc/init.d/instsvcdrv restart
10.4) Reconnect to https://YOUR_IP:1311 and verify that you can see your storage subsystem.
11) Ease up snmpd security so that you can actually use it.
Edit /etc/snmp/snmpd.conf and change:
com2sec paranoid default public
to:
com2sec readonly default public
12) Now we have to make some changes to the way Ubuntu starts snmpd. Edit /etc/default/snmpd and change:
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
to
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -p /var/run/snmpd.pid '
I don't know why removing the smux stuff works, but it's necessary. Removing the localhost IP address will allow snmpd to bind automatically to all interfaces. If you don't remove 127.0.0.1, you'll only be able to talk to snmpd from the local machine.
13) /etc/init.d/snmpd restart
14) /etc/init.d/dataeng restart
15) Verify that the following command spits out a whole bunch of stuff:
snmpwalk -OS -v 1 -c public localhost .1.3.6.1.4.1.674.10892.1
These should all be Dell-specific.
16) Verify that you can perform the same query from a remote machine (change localhost to the IP of the server we're setting up). Check firewall settings (UDP 161)!
17) Configure the system to start the OMSA web service when the system boots:
update-rc.d dsm_om_connsvc defaults
18) User management.
It appears as though OMSA wants you to login to the GUI via root to become OMSA Admin. To enable your root account in Ubuntu you have to do a sudo passwd root and give root a password. To disable the root account later, do a sudo passwd -l root .
To make a user a "Power User" in OMSA, you have to add them to the root group.
Tuesday, August 26, 2008
Some Thoughts on Design
I'm not a great software engineer. Quite the opposite. I don't get much time for development and many of my projects are quick and dirty hack jobs. I simply wear too many hats in my work to devote myself completely to any one aspect. On a daily basis I get to be the IT guy, software developer, photographer, designer, telephone repairman, technical writer, and guy who does whatever the hell else needs to be done.
Admitting that, I do have some advice for anyone developing software or designing just about anything:
1) Use your own shit.
2) Have somebody else use your shit, and actually listen to them when they tell you what's wrong with it. Chances are, they're right.
A remember reading a blog post a while back about the world's worst toaster in which the author described a toaster that is overly complex -- a sure symptom of poor design. This post really spoke to me. Not because the message is terribly enlightening, and not because I disagree. It's stuck with me because I happen to have a toaster that is considerably worse than the one described in the blog post!
My toaster does not suffer from excessively complex design. It's your standard "pop-up" toaster with a knob that goes from "light" to "dark", and a single lever used to start the toasting process. An elegant, time-tested design that should be pretty hard to screw up. Well, "Chefmate" managed to screw it up pretty well.
Here's what I have to do to make toast:
1) Adjust the "light to dark" knob to somewhere between 50 and 75%. It doesn't really matter where, because anything under 50% is essentially untoasted (dried bread, really), and anything over 75% is burned-to-a-crisp.
2) Insert bread and push the toasting lever down.
3) Wait until the bread pops up.
4) Yay, the bread popped up! -- Not so fast, we're not done. Although the toasting process took about as long as one might expect, the bread at this point is somewhere between hot and barely-toasted. So what we need to do is push the lever down again to re-toast our bread.
5) Wait until the second toasting process "feels" like it's about half way done.
6) Pull the plug. Why pull the plug? Because an anti-safety feature built into the toaster will not allow the user to push the toasting lever up to manually pop the toast. The only way to get the toast to pop up before the toasting cycle is complete is to disrupt the power.
7) Inspect "toast" for done-ness. If it needs to toast a little longer, repeat steps 5 and 6 but vary the amount of time in step 5 as needed. Do not be tempted to adjust the light-dark knob to assist you in selecting the correct amount of time for subsequent toastings -- you will either burn it, or the bread will untoast itself and you'll have to start over (no, you simply won't be able to start toasting if you select "light").
Whew. It sucks to start the day pissed off at a toaster, but that's what I get for only spending $10. Or is it?
It amazes me that this toaster even exists in our world. It was clearly never *used* by anyone at the toaster factory to make toast, or the design would have been modified such that it could actually make toast. The anti-safety feature by which the user cannot manually pop the toast without unplugging the unit is another example of complete usability oversight. This has nothing to do with cheap components, necessarily, but shoddy design. The mechanics of a toaster are not complicated and thanks to plastic, a fairly featureless toaster is easy to mass-produce on the cheap. I have a hard time imagining the guy who was tasked with creating Chefmate's 2007 entry-level toaster -- how low can his self-esteem be?
Whenever I make toast, I think about MP3 players. The reason I do this is so when I write this blog post, I'll have a way to transition into my next example of crap design: cheap MP3 players.
My old 256MB Creative Muvo MP3 player finally died after years of faithful service. It didn't actually die, necessarily, but the "up volume" button broke off so like a racehorse with a broken leg, I had to put it down. I decided that I wanted to get another cheap MP3 player that took a single AAA battery. I've got a lot of rechargable AAA's, and I think that they're more convenient than built-in rechargable batteries. If my battery dies while I'm mowing the lawn, I can simply swap in a fresh one.
Unfortunately, nobody wants to make an MP3 player that takes AAA batteries anymore. The reason for this, I believe, is to make players that are smaller than they need to be. This is an example of a design choice that is of little benefit to anyone, but helps will player sales because for some reason "thin" is "in." Once a device reaches a certain level of "smallness", it doesn't need to be any smaller -- but on the display shelf the smallest gizmo wins.
There are only a few MP3 players being produced that take AAA batteries, and they're all on the cheapo side. I tried out a couple recently but had to return them because they lacked certain software features that they simply should not have been missing. They weren't poor because they were made cheaply, they were poor because the designers didn't care to think about the devices actually being used by real people. Granted this is certainly a symptom of keeping down costs, but just a tiny bit of effort would have saved these devices:
- Nextar MA566 (or similar model).
This is a standard MP3 player with no frills. It plays Mp3s. What more do you want? Well here's the problem: it plays the MP3s in order not by filename, but by file modification date, and THEN filename. Clearly this is a big oops, and whoever wrote the software didn't do enough testing.
I use MyPodder from Podcastready on my MP3 players to download podcasts and audiobooks. When MyPodder downloads new podcasts, it launches (as far as I can tell) about 4 download processes at once. This means that if I'm downloading 10 chapters from an audio book, they don't necessarily arrive in order. Chapter 3 might come down before Chapter 1, etc. This shouldn't be a problem because usually audio book chapters have names like 01_BookName, 02_BookName, such that any DECENT player can play the chapters back in the correct order.
Unfortunately the MA566 isn't smart enough to do get this right, and if Chapter 3 is downloaded to the device before Chapter 1, it plays Chapter 3 first. This means that at the end of any given chapter, I have to stop mowing the lawn and use the player's crappy controls to look for the next chapter (hopefully I haven't forgotten which chapter I was just listening to or I have to listen all the way through the chapter intro to decide if I'm at the right place).
One workaround was to use various filesystem utilities to reset the file modification dates. Eventually I tired of this and literally bit the player nearly in half in a fit of disgust.
- Phillips GoGear
The next cheapo MP3 player I picked up was a Phillips GoGear. Ok, so Phillips is a slightly better brand, and the unit takes a single AAA battery. Shouldn't have any problems then, right?
Much to my complete shock, this player was missing a feature that is so common that it's more of a given than a special feature: the ability to resume playback. How in the hell does this happen? When you turn on the GoGear MP3 player it doesn't start playing from where you left off, it starts you over from scratch. I went through all the options and could find no way to modify this behavior. This little oversight makes the player completely useless for listening to podcasts and audio books!
Recalling the bad taste of the Nextar player as my teeth crunched through it, I decided to return this piece of crap pronto.
- Sansa Clip
Feeling quite discouraged, I gave up my quest for an MP3 player that uses AAA batteries and ended up with a 4GB Sansa "Clip". I'm mostly satisfied with this player and have promised myself to keep it plugged in to my USB charger when I'm not using it. There's nothing worse than mowing the lawn without headphones because of a dead battery. (You may have noticed several references to lawn mowing. Yes, my lawn is very large. Yes, I am clearly so cheap that I use a pushmower. It takes hours and hours. Someday I'll tell you about trying to buy a cheap lawnmower that doesn't suck!)
The only problem I've had thus far with the Sansa Clip is that the clip comes off. That's right. The "clip" is such an important feature of this unit that the model number is literally CLIP, yet the clip falls right if you twist it just so. Way to think it through fellas.
I've gone on long enough. To recap: it doesn't matter how cheap or expensive the software or gizmo you're creating is, remember that human beings are going to spend their money on it and actually use it. 1) Try using it yourself. Does it work? 2) Consider more than your own personal use case. Does it work for others? Sometimes it's just a minor change that stands between usable and useless.