So I had to ditch OpenSUSE 10.3. It doesn't come as any surprise, really. I've never been able to break out of the Linux installation loop:
1) Install new distro
2) Work out various hardware kinks
3) Try to configure new distro to my liking
4) Try to use new distro for a few weeks
5) Hit a brick wall on some necessary feature; or distro simply breaks
6) Goto step 1
I had OpenSUSE 10.3 installed on both my Thinkpad R32 laptop, and on a standard desktop machine (Asus Mobo, Athlon XP, Geforce 6200 video). In both cases I ran into a dreaded KDE Freeze Bug. Unfortunately the KFB has like 80HP and does 20+2 (freeze) damage, which is a formidable enemy; even though I'm dumping all my skill points into Linux Tinkering and have several Potions of Diet Pepsi in my inventory.
Screw it. I might put more effort into battling the Freeze Bug, but OpenSUSE 10.3's package manager is absolutely atrocious. There have been so many times over the past month that I've thought about searching for software and decided that it wasn't worth it to wait for the package manager to start up. Even if I had that kind of time I'd still just end up fighting RPM dependency nightmares.
I realize that OpenSUSE 11 is just out and has a substantially better package management system. Unfortunately, they said the same thing about 10.3. If the package manager in 10.3 offered "dramatically improv[ed] speed," then I can't imagine how terrible it was previously. And even if package management is twice as fast in version 11, it would still be too damn slow.
So I installed Ubuntu 8.04 on both machines. So far so good, although I ran into the same old nVidia driver problem on the desktop and the laptop won't shut down properly with my PCMCIA wireless card installed. The nVidia driver issue was easy enough to fix (again), and when I figure out where to tell Ubuntu to eject the PCMCIA card on shutdown I'll update that blog post.
It's nice to be back on Ubuntu even though it uses the ever-ugly Gnome desktop and lacks a proper control panel. The Debian package management is really where it's at. I've decided not to try anything fancy with the laptop either - defaults all the way. We'll see how long this all lasts.
Oh, here's a cute one: when I successfully wake my Thinkpad from hibernation, the Hardy Heron informs me that the laptop was unable to hibernate. Thank goodness for the guy who put the "don't tell me this again" checkbox in that dialog.
Tuesday, June 24, 2008
Sigh, Goodbye OpenSUSE
Thursday, May 1, 2008
Nagios with NSClient++ Character Flaws
Arg. It can be frustrating to pass special characters to check_nt arguments!
First, the dreaded ampersand (&):
Unfortunately, it appears as though the ampersand is the field delimiter used by NSClient++, so passing an ampersand to check_nt is absolutely not going to work. Take a look at the following code snippit from check_nt.c :
249 case CHECK_PROCSTATE:
250
251 if (value_list==NULL)
252 output_message = strdup (_("No service/process specified"));
253 else {
254 preparelist(value_list); /* replace , between services with & to send the request */
255 asprintf(&send_buffer,"%s&%u&%s&%s", req_password,(vars_to_check==CHECK_SERVICESTATE)?5:6,
256 (show_all==TRUE) ? "ShowAll" : "ShowFail",value_list);
257 fetch_data (server_address, server_port, send_buffer);
258 return_code=atoi(strtok(recv_buffer,"&"));
259 temp_string=strtok(NULL,"&");
260 output_message = strdup (temp_string);
261 }
262 break620 void preparelist(char *string) {
621 /* Replace all , with & which is the delimiter for the request */
622 int i;
623
624 for (i = 0; (size_t)i < strlen(string); i++)
625 if (string[i] == ',') {
626 string[i]='&';
627 }
628 }
As you can see, the ampersand is hardwired into the request to the NSClient++ server, so any fix will require changes to both the check_nt plugin and NSClient++.
There is no workaround for this, except to avoid using the ampersand (escaping the ampersand with a backslash ( \ ) does not work). If, for example, you are trying to check on the status of the "Backup Exec Device & Media Service", use the service name instead of the display name -- NSClient++ can use either. In this case, the service name is "BackupExecDeviceMediaService", which you can find in the service properties.
P.S. - if you're unfortunate enough to be using Backup Exec, I feel for you.
Next, the dollar sign ($):
The dollar sign is a goofy one too, and can't be escaped with the backslash character ( \ ). Instead, you have to double it and put quotes around it (like so: "$$"). Neat, eh?
An example: let's say that you're trying to monitor the service MSSQL$BKUPEXEC. Unfortunately, this is both the display name, and the service name, so the last trick we used won't work. No worries, though, thanks to our friend the double-dollar-sign-enclosed-in-quotes. Your check_command will look like this:
check_command check_nt!SERVICESTATE!-l "MSSQL"$$"BKUPEXEC"
So awesome! Yay for annoying things!
Note: you might think you're clever and use single quotes instead of double around the entire service name. Unfortunately, that does not work reliably. It does seem to work, however, if you're only checking on one service name in the command. Anyhow, don't bother.
Next up, the backslash ( \ ):
This one is pretty easy, you just double it up ( like so: \\ ). Thus checking on a performance counter will look something like this:
check_command check_nt!COUNTER!-l "\\Network Interface(Intel[R] 82546EB Based Dual Port Network Connection - Packet Scheduler Miniport)\\Bytes Total/sec"
Phew, that counter name is a mouthfull, which is actually why I chose it. Don't try to manually type in your performance counters; copy and paste them. From a terminal to the Windows machine you're monitoring, open up Performance Monitor. Add the counter you're looking for to the graph, select the counter from the legend at the bottom of the window, and then click on the Copy Properties button (it's one of the buttons at the top of the graph). Now open up notepad or your favorite text editor and paste the performance counter data into it. Somewhere in there you should see a .path attribute that contains the entire counter reference which you can copy and paste into the specific Nagios configuration file we're working with (remove the server name and double all of the back slashes). Thankfully we can copy and paste from a terminal in Windows to local windows, if we're running Windows.
Note: I believe that much of the confusion over passing arguments to the check_nt command in Nagios has to do with this double back slash which looks like we're escaping the back slash. We're not...well, not really. Don't expect to simply use regular Bash shell notation in your arguments. Single quotes don't necessarily behave the way you'd like. Escaping doesn't work the way you might expect it to. Just don't bother trying to out-think the system, follow its conventions, make no assumptions, and you'll be fine.
Wednesday, April 23, 2008
OpenSuse 10.3 + Nvidia Driver for Geforce 6200 = CRAP
Sigh. So I followed the instructions you gave me for installing the nVidia driver for my 6200 with YaST. The installation process was very simple, but the after installation process not so much.
I'm curious as to why exactly you'd want to set my monitor refresh rate to 71.0KHz : 88.4Hz? Seems a little odd. Thankfully my monitor can still display this rate, but I get a big "OUT OF RANGE" box in the center of my screen. Nice.
Ok, so the obvious place to start is the "Graphics Card and Monitor" utility from the YaST2 Control Center. In other words, SaX2: X11 Configuration. (BTW, your multi-case meaningless acronyms are sweet. Sweet indeed.) Working around the giant "OUT OF RANGE" message, I'm able to limit the range of my monitor and I do so. No go. Neither changing the monitor nor reducing the frequencies has any effect. The card insists on driving the monitor at 71 : 88.4.
I check the xorg.conf file and verify that the correct frequency ranges are there. They are. I change a few things and break the config. Ok, restore the old file.
Aha! Wipe that evil grin off your smug face, because you haven't beaten me on this April morning! I found a workaround:
- Get into the YaST Control Center (e.g. Administrator Settings), and choose the Hardware tab from the left.
- Click Graphics Card and Monitor and click the Options button for the video card.
- There should be a VertRefresh option. Set it to 60 (or some other safe value for your monitor, but 60 should almost always be safe).
If you can't get into X at all, then manually edit your xorg.conf file:
- Login to your shell as root, or `su -` to become root.
- Enter `emacs /etc/X11/xorg.conf` (Unless you have a simpler editor installed, but my install only had Emacs and vi.)
- Hit enter once if you get the Emacs "welcome / help" screen. You should now see the contents of the xorg.conf file. Scroll down to 'Section "Device"' and add the following line before 'EndSection':
Option "VertRefresh" "60" - CTRL+X then CTRL+C to quit Emacs. Hit 'y' on your way out to save.
- Restart (or test by running `startx` from your shell).
- I'm not sure if SaX will freak out on you for manually editing the file, so follow the first procedure above to make sure it sticks.
Happy Wasting-Your-Time,
Year of the Linux Desktop
xx00
Thursday, April 10, 2008
Vista "Run As" Support
Thanks ever so much for changing the behavior of the "Run As" context menu item to better fit your broken User Access Control feature which broke certain vertical apps that run from GPO-mapped network drives thus forcing me to disable UAC. Very clever.
But I can handle it -- I'll just use the runas command from the shell!
Oh, I see you also "fixed" Explorer so that I can't use runas to launch it as a new process. Hm. No problem, let me try using IE to browse the file system. Dag, yo. I see you "fixed" IE in version 7 to launch an Explorer window to browse the file system.
Ok, whew, there's a registry value for Explorer called SeparateProcess which has to be set for the user that I want to run the Explorer process as. Alright, let me add that to my script and verify that it's set...ok...now run it...... .... .... .... .... .... you bastard.
Haha. Ok ok. Good one, seriously. What really gets me is that you had me all excited about the new security features in Vista, but I already had to disable UAC and now I'm looking at running as an administrator just to do my job? Yeah, it's cool that you fixed fast user switching so that we can use it on our domain machines, but who wants to completely switch to an administrator environment just to find a file for someone? Lame.
But you haven't won. I did find a solution.
To anyone who is trying to launch Explorer on Vista from an elevated account, just stop trying. It's a waste of time. Here's what you do:
Instead of trying to get Explorer to work, grab a copy of FreeCommander. FreeCommander is a file manager for Windows and, as its name implies, is free. You can launch FreeCommander with runas successfully, and you'll be able to browse your local file system or network as an administrator or domain administrator.
To make things easier, you can launch FreeCommander with runas from a simple shell script (batch file). Despite what you might think, you do not have to put your password into the runas command to make it work. Simply leave the password out and when you run the batch a command shell will appear asking for your password and once you've entered it, FreeCommander will fire up. All nice and safey safe.
To make things even easier, it's Sysinternals to the rescue once again with ShellRunas v1.01. Run `shellrunas /reg` to register it as a context menu entry, and you'll see a "Run as a different user" item on the menu when you right-click an executable. Basically, this restores in Vista the runas functionality we had in XP. You'll still see the worthless "Run as administrator" entry in the menu, but the world can't be perfect.
(Thank Blod for Mark Russinovich and Sysinternals. Note that Microsoft bought Sysinternals so you'd better grab everything you can now just to be safe.)
Wondering why I chose FreeCommander as my file manager? No? Well read on. Of all the free file managers I found in a quick search, FreeCommander is the only one that didn't puke when run under a secondary login. All of the rest either didn't work well on Vista period, or died horrible deaths when trying to browse the network. None of the programs will recognize Vista's awesome new way of handling mapped network drives, but at least FreeCommander keeps chugging along instead of freezing up and can do UNC just fine.
Here is a list of the programs that I tried on 04/10/08. None of these worked well enough:
Ac Browser Plus (ACB) (trouble on the network when started with runas)
ExplorerXP (blank context menus on Vista)
FileAnt (great program, but freezes on network when started with runas)
UltraExplorer (great looking program, but freezes too often)
muCommander (Java, very bad network support on Vista)
Off all these, only muCommander is GPL. Drag. FreeCommander wasn't my favorite of the five I tried, but it's the only one that doesn't puke when I run it this way.
Anyhow, I added a link to my batch file on my RocketDock (a MUST HAVE application for Windows) and everything is once again golden...or sort of brown anyhow....well, there's a little green in there...
*note: I can already hear the question in my own mind: well this solution works great from my own machine, but what about from my users' machines? Thankfully, my users all run XP with un"fixed" runas, explorer, and yeah, I've stuck them with IE6. When the Vista changes happens against my will, then fast user switching and runas from the shell will get most jobs done just fine.*
Tuesday, April 1, 2008
Settling on OpenSUSE 10.3
That's right, I've finally found the least annoying Linux distribution to run on my Thinkpad R32: OpenSUSE 10.3.
I burned through the following distros on my quest for non-suckage:
Ubuntu 7.10 & 8 Beta
PCLinuxOS 2007
Kubuntu 7.10 & 8 Beta
Fedora 8
Freespire 2.0
...and none of them were stable enough to survive initial updating and configuration. I was most disappointed by Ubuntu and Kubuntu because these are the distributions I really wanted to use. I actually use Ubuntu as a desktop OS on one of my machines, and have been for years, but I only use it for a few tasks. I'm running Ubuntu Server 6.06 LTS on a machine as well and am very happy with it (aside from its adaptec driver support being broken out of the box).
I didn't have much hope for OpenSUSE when I began installing it. I was certainly disappointed by the lack of a LiveCD with an installer. However, the "old school" installation went very smoothly and in no time I had a functional installation that ran well and looked very sharp. OpenSUSE is a very polished distribution by comparison to everything else that I've tried so far, aside perhaps from PCLinuxOS.
I was also a little bit leary of using KDE, because for years I've always been a Gnome "fan." Years ago I tried KDE and it was seriously flakey and irritating beyond belief. Plus, putting a "K" in front of all of your software names is Ketarded. Well, I realize now that Gnome hasn't changed a whole lot over the years, but KDE has really grown during my time away from it. I'm not missing Gnome at all.
OpenSUSE is not without its shortcomings. Firstly, it's an RPM-based distribution and I'm much more comfortable with debian based installs. YaST is a usable packager but is terribly, terribly slow and in typical RPM fashion (in my experience), occasionally doesn't grab necessary dependencies and vomits all over your lap. Secondly, the configuration tools are much better than the mess you get with Ubuntu, but even after a few days working with SUSE I'm still having trouble finding the right icons to click on. Too much ambiguity and poor naming. This is a common theme in all Linux distributions. Thirdly, I had to grab madwifi drivers "manually" and SUSE refuses to shut down when I have my PCMCIA wifi adapter plugged in. And lastly, I'm able to crash the entire system all over the place while trying to get Kerberos and LDAP working in a Windows domain. This isn't completely SUSE's fault, it's a pretty typical Linux kludge of half working services where getting a fully working system is akin to solving a jumping puzzle in Half Life.
(Here's a fun one: if you happened to follow recommended practice and use a .local TLD for your Windows domain, then mDNS freaks out. If you disable mDNS, then LDAP and/or Kerberos freak out. The result is some very interesting crashes, including DBUS, kpowerd, and knetworkmanager. Fug it. To give credit where credit is due, this may actually be Apple's fault. It's their spec. Anyhow, it turns out you don't need to configure Kerberos or LDAP clients if you just use the Windows Domain tool)
The last time I tried to push myself into migrating my desktops completely to Linux, about five or six years ago, I had a very similar experience. Half-baked, poorly glued together software that requires constant babysitting. I am very disappointed with the state of Linux on the desktop today. I know that it can work, especially if you limit yourself to a basic install and don't mess with anything. Otherwise, it's still a mess and its fan base is either poorly informed or in serious denial.
Shortly I'm going to be proposing my latest IT plan at the office, and a portion of the plan is an "Open Source Initiative" in which I'm going to lay out a procedure for migrating our proprietary software to open source alternatives. My primary objective is to limit or eliminate vendor lock in, which is a real sore spot for me. I also hate Microsoft and the BSA. Anyhow, the last step in my plan is going to be moving our desktops from Windows to Linux, and I'm still going ahead with it. However, I'm much less enthusiastic about it now. Despite its many shortcomings, I fail to see how Windows is inferior to any Linux distribution aside from licensing and cost. Thankfully Vista sucks eggs, because that might make the transistion a little easier for my users to swallow.
Monday, March 31, 2008
Linux on IBM Thinkpad R32 Shutdown / Poweroff Problem with PCMCIA Wifi
Having trouble with your Linux distro not powering down on your laptop? On my old Thinkpad R32, several distributions including Kubuntu 7.10 and OpenSUSE 10.3 were not able to power off the system via software. I'm not exactly sure what was going on, but right when the system should have powered off, the CDROM drive would spin and the CPU fan would come on full blast. Nearly the exact opposite of shutting down, really.
I traced this problem to my D-Link DWL-G50 PCMCIA wifi card -- a nice Atheros based AG card on the cheap. Well, I shouldn't imply that the problem is with the card itself, but something to do with PCMCIA at least.
One solution I've found for this problem is to tell the system to eject the PCMCIA card before or during shutdown with the following command:
pccardctl eject
(Note: if your distro is slightly old, the command might be `cardctl eject`).
Which script you put this command into will depend on your distribution and preference. In OpenSUSE 10.3, open the file /etc/sysconfig/shutdown (as root) and change the line:
HALT_POWERDOWN_INSERT=""
to...
HALT_POWERDOWN_INSERT="pccardctl eject"
I've noticed a few complaints elsewhere about systems not being able to suspend due to wifi card issues. I haven't had a problem with OpenSUSE 10.3 suspending or hibernating on my system, but it seems like a pccardctl eject and a pccardctl insert in the appropriate suspend scripts could solve the issue.
There might be a more appropriate fix for this problem, but I don't care. I'm sick of configuring Linux. I know that Ubuntu 7.10 was able to power my system off correctly, and I think that PCLinuxOS 2007 was able to as well.
Thursday, March 27, 2008
It Smells Like Fedora in Here
Fedora installed. Fedora uninstalled. Too much freedom for me, unfortunately.
Fedora's freedom mantra would mean a lot more if it were coming from anyone besides RedHat -- a company that in my mind used the GPL to build its user base and then cut us all off with some copyright legalese mumbo jumbo. The Fedora project was born out of one of the most bogus moves ever pulled by a commercial distribution as far as I'm concerned. (yeah, I used RH9 on servers. yeah, dumb, I know that now)
A simplified version of the history of Fedora: 1) Red Hat produces, for years and years and years, one of the most popular, absolutely free, Linux distributions. 2) Red Hat yanks the rug out and discontinues Red Hat Linux at version 9. They end support for RH9 after a very small number of months (12?). The only supported upgrade path is to the commercial-only Red Hat Enterprise Linux distribution. They put their name all over the source and hide behind copyright to make it hard for anyone to copy, although they still do (e.g. White Box Linux). 3) Red Hat launches Fedora, a free community based "bleeding edge" distribution. Essentially, a beta for RHEL that people are suckered into using. That's how it went down from my perspective; feel free to correct me.
So why did I try it? Some jackass on LUG Radio uses it. Besides, I'm desperate at this point.
Anyhow, Fedora worked ok but installing anything that goes against the freedom of freeness and true community freedom is a serious pain in the ass. The simplest way to get the non-free stuff seems to be the Livna repositories which, unfortunately, and not unexpectedly, suck. More errors than SCO lawsuit. I decided to scrap the whole thing when installing flgrx errored out because it requires a kernel version that is not yet included with Fedora 8. No thanks fellas, I'm not playing.
(I don't know if it's something about the workings of RPM in general, but I always end up with update errors from RPM-based distributions)
You know, I don't really want to rant too much here (yes I do), but the whole "information wants to be free" freedom freeness business really chaps my ass. Not so much the concept, but this:
Freedomer: "Here is our free as in speech software. This information is free as the wind as all information should be!"
Me: "Hey, thanks... oh wait, when I try these simple tasks the system pukes, can you help me?"
Freedomer: "Oh I'm sorry, THAT information is not the kind of information that wants to be free."
Me: "But you said...freedom...information...can you just tell me how...."
Freedomer: "Oh well we don't even write that information down. It's all up *here*, you see. Think of it as a service. Make sense?"
Me: "Well sorta... but I'm all pumped up with these feelings of being free. It's almost like the whole world makes sense again. People are really good at heart and..."
Freedomer: "Listen, if we keep this up much longer you'll have to purchase some Information-Extraction Service Minutes. We have several plans, and some are not too much more than the cost of your commercial applications."
Me: "Oh, well I was...ok...but I'm..."
Freedomer: "You see, software is just a tool. A means to an end, you see. Tools are free. Instruction manuals cost money. Are you not familiar with how this works. Ever been to a little place known as The Home Depot?
Me: "Sure but...sorry, I guess I..."
Freedomer: "Listen, you haven't even paid us anything. What do you expect? It's free! I mean, sure, we believe that it's better than anything else out there, but still, you can't expect us to help you get it running without puking all over your system unless you're going to pony up some dough."
Me: "Yebut..."
Freedomer: "Why don't you try our community. The community is what we're all about. Community. Freedom. Information. Tools. Freedom. Our community is always happy to help. We just love helping people."
Me: "Ok, well than can you please help me? Like on a personal level? Buddy to buddy? Please."
Freedomer: "Oh I suppose so. What do you want."
Me: explains problem
Freedomer: "Oh sheesh! RTFM already! It's so obvious!"
Me: "But the manual doesn't really address my problem and..."
Freedomer: "Then buy the damn book already! The information in the book is all free once you buy it."
Me: "I think I'm going to go buy a Mac."
Freedomer: "Oh, and don't forget to notice the Paypal Donation button on our website. Your donations are what keep the community truly free."
Me: "Thanks. And please tell your sales team to stop cold calling me. No, I DON'T have any projects coming up in the next six months god damnit. I'm too busy installing Linux distributions to find one that supports two pieces of very popular hardware without having a cow."
Freedomer: "Oh you need to RTFM maybe."