Monday, January 26, 2009

A "Command Line To The Rescue" Story

As you may recall from my earlier review of my new Dell desktop, I bought it to replace my previous Dell desktop, a Dimension 2400. Over the last couple of weeks I have installed a couple of distributions on my old system. First the Windows 7 Beta (the first installation of Windows in my house since 1996), a sad story that I hope to write about soon, and over the weekend I formatted over that horror and installed Fedora 10.

I've used a lot of Red Hat products over the years and I favor it for administration, however, I have a growing fondness for Ubuntu because it seems to deliver the best desktop user experience. When it comes to Red Hat stuff though, I'm pretty expert at installing it.

Now I have to digress a bit and talk about a phenomenon I have discovered about Linux. It is often useful to think about Linux as though it were a living thing. It's been said that Linux is based on evolution, not "intelligent design." This means that Linux evolves naturally in a series of fits and starts, rather than being the result of some grand plan. This is the opposite of proprietary software, which (if done properly) is the result of careful planning.

What this means is that sometimes a subsystem in Linux goes away and is replaced by another re-written replacement that addresses a need. And, of course, programmers prefer to re-write code rather than maintain old code. Anyway, this periodic "churn" of code is natural to the process.

The problem is that sometimes things that worked in previous versions stop working in the new versions. This is fairly common Linux, and it's perhaps its most off putting characteristic.

One case in point is the display driver for Intel integrated graphics chips. Admittedly, some of these chips really suck, especially the earlier ones. The new ones are better and also get official driver support from Intel. Over the last year or so, Linux distributions have been deploying the new "intel" driver replacing the previous "i810" driver. The new driver is in every way much better than the old driver, except it doesn't like the older chips very much.

This brings us back to my Dimension 2400, which, as you may have guessed by now, uses one of the old chips.

So I pop the Fedora 10 install DVD into the drive and reboot the machine. The installer starts and gets to the first graphical install screen and completely hangs. Dead, inert. It doesn't look like I'll be doing a graphical install this time.

I power-cycle the machine and just as the DVD starts to boot, i press the escape key and get:

boot:

Wonderful! A boot prompt. Now I know what to do. I enter:

boot: linux text

which instructs the boot loader to boot the kernel called "linux" and pass the argument "text" to the system. On a Red Hat style systems this will invoke the text mode installer. I answer all the prompts and the install gets underway. While I have some time to kill, I Google for a way to get the graphics working again. From my search, I determine that the problem isn't so much the new driver but rather that, by default, the new driver uses a new "acceleration method" called "EXA" rather than the previous method called "XAA". Making a one line change to the /etc/X11/xorg.conf file will cause X to revert to the old method and solve the problem.

After the installation is complete, I reboot the machine and it comes up in text mode. This is caused by a configuration file called /etc/inittab which contains a setting for the default run level, which is 3 for text mode and 5 for graphical mode on Red Hat style systems. In text mode you get a login screen:

Login:

I log in as root and create a personal account for myself:

useradd bshotts

passwd bshotts

After I create the account and set the password, I press Alt-F2 to get to the second virtual console. There I log in as bshotts and try to launch X. I do this by entering the command:

startx

The X server starts and almost gets to the desktop before it chokes again. Looks like it's time to fix that xorg.conf file. I restart the machine and and log in as root again. I go looking around in the /etc/X11 directory and notice that there is no xorg.conf file. This is because with modern X servers, the file is no longer required, as all the configuration is done dynamically at runtime which, in concept, is great when it works.

Bummer.

I think to myself, "there must be some kind of configuration program for X," so I start digging around in the man pages. I discover that the Xorg program has an option called -configure that will create an xorg.conf file based on the server's best guess of what the correct configuration should be. You must be root to use this option so I give it a try:

Xorg -configure

and it creates a file named xorg.conf.new in root's home directory. I copy this file to /etc/X11 which is where X expects to find it:

cp /root/xorg.conf.new /etc/X11/xorg.conf

Next, a little editing with vi and I add one line to the "Device" section of the file:

Option "AccelMethod" "XAA"

After saving the edited file, I login in as bshotts and try the startx command again and low and behold, I have a working desktop! I confirm that the graphics seem correct and log out of GNOME. This returns me to the text console. Since I want the system to work in graphical mode by default, I need to change the default run level. I do this by returning to my root console session and editing the /etc/inittab file. I change the last line to read:

id:5:initdefault:

changing the "3" to a "5" to set the run level to graphical. After saving the file I reboot the machine and everything works. New installation successful.

So what does all this teach us? It teaches us that sometimes there is no substitute for a good command line. A command line can work wonders. It teaches us that, with enough digging around, most problems are solvable. And most of all, it teaches us you should keep learning and never give up.

Hope you had a good weekend too!

Interesting Story In The NYT

In my earlier post about the effect of the Asus Eee PC, I explained that it showed how Linux can be used to create "disruptive technologies." The New York Times seems to agree.

Sunday, January 4, 2009

Why use Linux?

I recently received this thoughtful question from a concerned reader:


Hi,

My name is Allan. I´m from Costa Rica. First of all, let me congratulate you because it´s a little bit hard to find a good Linux site that explains everything about the shell (and how to start using commands) and how Linux works in a friendly clean way. I have always been interested in Linux (since I was 12 years old more or less, now I´m 25). But I´m still a rookie using it. Unfortunately most of us have been some kind of forced to depend (exclusively) on Windows because of all the software available, the GUI and the easiness of using it. We all complain about how bad Windows works, that´s why I´m trying to be more involved on Linux. Yesterday, I just installed Ubuntu 8.10 Intrepid. Great OS so far.

I do not want to bother you, you should be very busy, but I have one big question. How can I stop using Windows if I need it for work and personal use (software like CS3, Paint Shop Pro, Ulead Video Studio, among many others). Maybe any Linux tech would tell me to look for an alternative GPL software. For example for Office, the option would be Openoffice (very nice soft!) but its not perfect or good enough recognizing many characters or text formats. For CS3 or Paint Shop, the option would be Gimp (nice one too) but it lacks of better user friendly funcionality or editing options. Maybe you can do almost the same thing with it but it´s going to take you a lot of time work. I could give you many examples like those, but I think you already got the point good enough.

Please do not think that I´m saying that Linux sucks, that´s not it at all, what I´m trying to say is that I realize that you all are working to make it better and better each day, more user friendly, more attractive for other branded companies (like Nero, Skype, Kaspersky, etc) but what does it take to let Linux runs everything what Windows runs. I have heard about Wine, but I also heard that only works fine on some specific softwares.

I just wanted to share my point of view. Maybe you can share yours with me so that I can understand better Linux.


First off, thank you Allen for taking the time to write. You raise an interesting issue that I'm sure confronts many people looking to migrate from Windows to Linux.

Changing computer platforms is a challenaging problem for anyone, not just those seeking to move from Windows to Linux. It really boils down to a question of cost versus benefit.

So what are the costs of switching? Obviously they are having to learn new applications and perhaps worse, migrating your data to work with your new applications. We all experience this when switching an application even if no platform change is involved. Using an application involves a certain amount of investment on the part of the user. An investment in time needed learn the application and the time to reshape his or her "world" of data to fit the confines of the application's needs. If you have been using a particular platform and its applications for a long time, you probably have a lot of investment in it. So for many people the costs are high.

But what about the benefits? Those are a little harder to quantify. First, there is the economics which should be rather cut and dry, but, for many personal computer users (as opposed to business users), it is not. If you actually paid for Photoshop, Office, and the other software you mention, you're talking about a lot of money (potentially thousands of dollars) spent on your application set. However, many personal computer users, don't bother with the formality of license compliance and simply use unauthorized copies which can be had to no cost. Therefore, for many people, Linux offers no economic advantage.

The second benefit is this nebulous thing called "freedom." Some people express this in somewhat abstract terms, saying that it is a virtue in its own right. I tend to be a bit more pragmatic. I think that free software offers distinct practical advantages over proprietary software. I like the fact, for example, that I can install Linux distributions all day long and never worry about having to call a vendor and ask for permission to do so. I like that fact that since the source code is freely available, many people can offer technical support. I like the fact that I never encounter, timed demos, "crippleware", and "lite" versions of products. Any time I want to install something, I can just install the full version, no strings attached.

Then there are the technical benefits of using a Unix-like operating system. Things like virus and malware resistance, file systems that don't require periodic defragmentation, a powerful command line interface, and the potential for almost limitless customization.

While these benefits are clear, many people do not have a clear picture of what a migration means. For many people who want to move from Windows to another platform, what they really seem to want is a "Windows" that does not have the problems that they have been experiencing. So many times you hear, "I'd change to Linux but I tried it once and it was different from what I'm used to."

Yes, Linux is different. Linux is very different and to successfully move to it (or any other platform for that matter) you have to be willing to accept change. Some people really cannot do this. Their minds are not built that way. They learn just enough about "the computer" to do their jobs by rote. Platforms just don't matter to them.

Platforms matter to people who enjoy and care about computing. I use Linux as opposed to Windows because I really like computers. I enjoy using them and learning about them. I find that Linux helps me enjoy my computer much more than any version of Windows ever did.

As to your concerns about OpenOffice.org and GIMP versus Office and Photoshop, yes, they are different too. I'm currently writing a book with OpenOffice.org and I have found it very satisfactory. I used to write a lot with Word and it was fine too. I don't see a lot of practical differences in what each program does, but there certainly are surface differences which may be difficult for some people. I suppose that the same may be true with GIMP and Photoshop. I've never used Photoshop so I can't really comment, but from reading the comments of others, I sense that many people reject GIMP out-of-hand because it's not just like Photoshop. Both are very capable programs and the field of digital image processing is an extremely technical one which makes any truly capable application dauntingly complex. But with the exception of of deep color support, and some pre-press functions, GIMP is very comparable to Photoshop for many tasks. I use it routinely in my photographic work.

To sum up, change requires, well, change. Forward progress sometimes means giving up old ways of doing things and learning some new ones. For anyone attempting it, the question remains, "is it worth it?" and only you can know the answer to that.

Hope this helps.

Monday, November 24, 2008

Review: Dell Inspiron 530N With Ubuntu 8.04 LTS


A couple of months ago I purchased a new desktop system for my office, a Dell Inspiron 530N with Ubuntu 8.04 LTS pre-installed by Dell. For those of you unfamiliar with the "N" series, these systems are sold without Microsoft Windows installed. They are available with either Ubuntu Linux pre-installed or with no operating system installed and a copy of FreeDOS (an open source MS-DOS work-alike) installation media in the box.

My previous computer, another Dell N Series (a Dimension 2400 from 2004) still works but since it's Celeron powered, it's a bit slow for my contemporary tastes.

Ordering from the Dell website was very straightforward and I configured my system with the optional Intel Core2 Duo E4600 processor, 2GB RAM, Integrated Intel 3100 Graphics (I'm not a gamer), and a 22 -inch E228WFP wide-screen flat panel monitor. The total system price was $703 including $35 shipping charge.

After it arrived (it only took about three days even with ground shipping), I got it out of the box and set it up. The only interesting thing of note was that no manual for the computer was included in the box. I don't know if this was a shipping mistake or if Dell omits it because the manual is Windows specific. I later went to the Dell support site and downloaded a PDF version.

Physically, the machine is a pretty typical desktop computer. It features an attractive silver and white case with front audio and USB sockets behind a sliding cover and it has a glowing blue power button. When the system powers up, all of its fans turn on (loudly) for about three seconds and then turn off. Besides that, I would rate the system as very quiet. The standard keyboard is on the smallish side, with no excess around the keys themselves and I had concerns at first about using a keyboard that had no wrist rest, but after having used it for a while, I like the small size. It leaves plenty of room on my desk for even more junk.

The Ubuntu installation on the system is pretty good. Dell adds two icons to the desktop, one linked to a folder named "Dell" which contains a single PDF file of technical support contact information, and a second icon that links to a program that generates a DVD recovery image for performing a full system restore to original factory condition. A recovery partition is also included on the hard disk which can be selected at boot up. What is missing is a document that describes how Dell integrated the OS. Such a document is useful if you later decide to switch to another Linux distribution and need to know if any special tweaks are required to support the hardware.

After the system was attached to the Internet, it set about updating itself from the Ubuntu and Dell repositories. Amazingly, there were over 900 updates available, virtually all of them from Ubuntu. One thing to note about the Dell repositories, packages from there will always display "not authenticated" warnings when you attempt to update them. I looked into this (as the warning you receive is pretty dire) and it seems to be an Ubuntu problem in that only packages from the official Ubuntu repositories can be authenticated.

All of the hardware on the machine appears well-supported by Ubuntu. Dell also includes the closed-source LinDVD program from Corel for DVD (and other multimedia) playback. While the program could be said to work, it has two annoying features, first it always sets the volume level (system-wide) to maximum each time it's started. Second, its user interface is visually ugly, looking like a 1998 version of XMMS. This is the inevitable result of it being closed-source. No one in the GNOME or Ubuntu communities is able to properly integrate it into the desktop. Since receiving the system, I have installed all of the usual multimedia packages from the Ubuntu repositories and reserve LinDVD for DVD watching only and use totem for everything else. The integrated Intel graphics system is fast enough to display 720p video playback without problems. This system is also the first system that I have owned that can run compiz-based visual effects on the desktop and it works pretty well.

Overall, I am very pleased with the system. Dell did a good (though not perfect) job with the Ubuntu setup and the hardware performs well. The 22-inch monitor combined with the compiz visual effects is a delight. For the money, I think this is a very good system. I've enjoyed it every day so far.

You can find out more about Dell's Ubuntu systems at:

http://www.dell.com/ubuntu

Also check out Dell's other Linux resources:

http://linux.dell.com

http://www.dell.com/linux

Saturday, November 22, 2008

New Blog

For the last couple of years, I have been using nanoblogger, a bash-based blogging engine to manage the site news portion of this site. While I like the concept of nanoblogger in that it is bash-based (so it seems an appropriate choice for a Linux scripting site like LinuxCommand.org), it's kind of cumbersome to use. So starting now I'm trying out blogger.com.

If you had been subscribed to the RSS feed from the old blog, you will need to update it to the new feed address. See the Who,What,Where,Why page for details.