Linux Blog

Ubuntu Unleashed 2010 Edition Review

Filed under: General Linux — TheLinuxBlog.com at 11:36 am on Monday, January 25, 2010

Irritated with my Desktop after an upgrade gone bad and an incident with the nvidia noveau driver that left me x less, I decided it was time to re-install. I turned to my bookshelf to find Ubuntu Unleashed 2010 Edition. Normally by the time a book hits my shelf the material is outdated, not necessarily useless, just not the most up to date. This is an exception. The Ubuntu Unleashed 2010 Edition was updated with an Ubuntu 9.10 DVD and a “Free Upgrade to Ubuntu 10.04″ which I found out that if you buy the book before the end of 2010 you can get an upgrade kit in the mail.

So, I pop the DVD in the drive and start the installation. Nothing new here for anyone that has installed Linux or Ubuntu recently; for those that haven’t, it was a pleasant surprise to see that it actually detected my high resolution monitor and used it to its advantage. It really is strange to not have to squint at an installer. The first chapter covers the step by step installation in more detail which is relatively short and easy to follow. Most people should not need to read this if they are familiar with installing an operating system but it I think it is good to have it there. Just don’t let this first chapter prevent you from looking further into this book. After putting the DVD in and getting it started, I found myself reading the book through the entire installation; which for some reason got from 0-90% quickly, then took the majority of the time in the 90% range, but I’m not complaining.

The Authors really did a good job of writing in an understandable language and organizing the book in a logical format. I’ve found myself flipping through and finding many golden nuggets of information. I personally would not have picked this book up because of the title, since I’m not a big Ubuntu user. But Ubuntu Unleashed 2010 edition is packed full of information, 32 chapters and a hefty appendix to be exact. It is not all Ubuntu – specific either, meaning most of the content should work on just about distribution. This book would not be rendered useless if you don’t decide to go the Ubuntu route. I recommend taking a look at the contents and buying this book, as I’m sure you’ll be pleasantly surprised at the topics it covers. I think it would be a great book for someone that is interested in Linux in general, it reads well but can also be used as a quick reference. I wish I had a book like this when I was getting started, it would have saved me a whole lot of time and effort. I have set aside some of the more advanced chapters and made a note to read later.

Other reviews I’ve read have said that it has too much terminal use in it, which is something Ubuntu is trying to eliminate. While this may be true, if you want the most out of your Linux distribution, the fact is you will at some point use a terminal. Commands are less likely to change as much as graphical interfaces. Although some things may be slightly outdated I don’t think that this book should be re-written, as it is in the nature of open source and technology to change. If you keep this in mind I don’t think you’ll be disappointed with it.



Linux Performance Boosting – Graphics

Filed under: General Linux — TheLinuxBlog.com at 12:24 pm on Thursday, July 31, 2008

Is your Linux box chugging along? Does it take a while for web pages to load or to boot up? Does your screen lag when you scroll a web page?

Well my friends, you’ve come to the right place. The issue with your Linux box performing poorly could be a graphics issue. A lot of distributions do not install the correct graphics drivers by default. Yes, your graphical user interface might work, but without the correct Linux graphic drivers you will not get the performance that you should be getting.

Linux has a default video driver called VESA, most video cards work with this driver but perform poorly. The reason behind this is VESA uses the CPU to do graphics processing and does not rely on the video card for 3D acceleration. If you have a 3D accelerated video card (most ATI / NVIDIA’s I will not go into detail here) then you might be able to offload graphics processing from your CPU onto your GPU.

Here is how to test to see if your frames per second if you are using the VESA standard driver:

 

[owen@LinuxBlog ~]$ glxgears
2623 frames in 5.0 seconds = 524.096 FPS
1677 frames in 5.0 seconds = 334.784 FPS
1948 frames in 5.0 seconds = 389.488 FPS
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server “:0.0″
after 19707 requests (19415 known processed) with 0 events remaining.

Now, the performance of this machine is quite good so the resulting frames per second (FPS) is not too shabby, but its not the best either. After installing the correct Linux video card driver for this Linux box lets take a look at what kind of performance I get:

[owen@LinuxBlog ~]$ glxgears
6179 frames in 5.0 seconds = 1235.749 FPS
6558 frames in 5.0 seconds = 1311.449 FPS
6489 frames in 5.0 seconds = 1295.583 FPS
XIO: fatal IO error 22 (Invalid argument) on X server “:0.0″
after 39 requests (39 known processed) with 0 events remaining.

As you can see from the results the graphics driver make a huge difference in the number of FPS I can achieve, but this is not the only benefit from using the correct 3D accelerated driver. When the correct driver is installed, the graphics card does most of the work therefore freeing up the CPU do other tasks. Its a win-win situation, so get your graphics card set up properly today!

My Problems with Fedora 9

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 10:29 pm on Tuesday, June 3, 2008

Now, I know that Fedora is a community based operating system that Redhat just so happens to sponsor but I think there are some major problems with the release. Although I have been called “Bleeding Edge” I don’t think that I am quite there and actually I think I’m far from “Cutting Edge.”
I downloaded Fedora 9 on the day of its release to check it out. I started off by installing it onto a virtual machine. First time around the install failed for no reason, some Python error that I did not feel like debugging. I rebooted the VM , gave it another shot and it worked. The install process was pretty much the same as Fedora 8. I saw some minor differences but nothing that I can remember now. Once installed I fired it up and to say the least performance was not very good. I wanted to check out the KDE4, so I switched over. Nothing, the graphics support for the VMWare Toolbox driver is not good enough to really play with KDE4.

After toying with the Virtual Machine I decided to upgrade a test virtual machine from Fedora 8 to Fedora 9. The process to my surprise went smoothly. This was a vanilla Fedora 8 install with not too many bells and whistles. I administer a number of Fedora boxes and thought that I’d upgrade one that actually had software installed. The upgrade did not work, it failed and gave me an obnoxious error which had nothing to do with the task at hand. When I figure out exactly what the cause of the problem was, or if it is just a hardware issue I’ll report my findings here.

Despite feeling like I had not achieved too much I burned a copy of the DVD and installed it on my Desktop at the office. Its not the fastest machine on the planet but its no creeper. 1GB Ram, NVIDIA graphics and I think the upwards of 2GHz. The install went fine and gnome works great. I did not opt to install my window manager of choice (XFCE) since I was really wanting to play with KDE4. KDE4 installed fine and after switching desktops KDE worked. What’s the first thing I tried? You probably guessed it the Desktop effects. So, I try to enable them. No dice. So “I’ll just install the graphics card driver”
I thought since I know that it didn’t come bundled. This is where my troubles really began. The NVIDIA graphics will not compile on Fedora 9. Fedora 9 uses a version of XORG that has been stable for a while but NVIDIA has decided not to support yet. Thats exactly what you get when a vendor has control over source. Oh well.

I put up with the laggy graphics for a little while and tried to customize KDE. KDE4 to me seemed awfully buggy to be included as the only option for running KDE as a desktop. I happen to use KDE when not using XFCE and am quite happy with the 3.5 tree. My next problem apart was with Firefox. They include Firefox Beta 3, which I am undecided on. It crashed a number of times on me whist browsing since I hadn’t set anything up to do any real work on. I know that we would have to wait for Fedora 10 come out to see KDE4 and Firefox 3 if they were not included now but I didn’t see the legacy versions on the installer. For me Fedora 9 is not quite ready to use in a production environment.

For now I’m going to stick to Fedora 8 whilst providing feedback for 9. The moment that KDE, Firefox and XORG get patched I’m 100% there.

Fedora is not for every one but has any one else had any problems with Fedora 9 or interesting stories to share?

My Linux Box has a new video card!

Filed under: General Linux,Linux Hardware — TheLinuxBlog.com at 12:10 am on Friday, December 7, 2007

NVIDIA GeForce 4 Ti 4200 AGP 8X Driver IssueI’ve got a new to me video card to temporarily service as my video card until I can get a cooling kit for my GeForce FX 5200. Its an older GeForce 4 Ti 4200 AGP8X. I thought it would be as simple as plugging it into my agp slot, turning the computer on and re-installing the NVIDIA driver module but I was wrong.

The problem is, since this is an older card I have to use a legacy driver:

WARNING: The NVIDIA GeForce4 Ti 4200 with AGP8X GPU installed in this system
is supported through the NVIDIA 1.0-96xx legacy Linux graphics
drivers. Please visit http://www.nvidia.com/object/unix.html for
more information. The 100.14.11 NVIDIA Linux graphics driver will
ignore this GPU.

If you can’t see the screen shot click it. Its basically a pretty version of the above error message that tells me that I need to use the: “NVIDIA 1.0-96xx legacy Linux Driver”. Here is the download page for the driver if your running into the same problem: http://www.nvidia.com/object/linux_display_x86_96.43.01.html

You can temporarily use the “nv” driver in your XORG configuration but be warned this is not accelerated so you should just use it to download the legacy driver, quit X and then install the accelerated one. Unfortunately I could not get links or lynx to download from nVidia’s site because of some strange javascript code. I find it Ironic that the Unix drivers page isn’t even compatible with the basic Unix browsers.

Making your scripts user and sysadmin friendly

Filed under: Shell Script Sundays — TheLinuxBlog.com at 11:08 pm on Sunday, November 18, 2007

When designing a shell script it is important to make them easy to use but also to make it easily automated for deployment. One example of this that comes to mind is the NVIDIA installer. It has command line options to allow for deployment but also gives a nice interface for the end user.

To implement this “dialog” can be used for the user interface and “getopts” can be used for the command line options. The script may look something like:

#help function
help () {
echo “Linux Blog – getopts and dialog example”;
echo “Usage:”;
echo -e “\t -h shows this help”;
echo -e “\t -a [y/n][other] ANSWER (Yes, No or Other)”;
}

#show dialog to get the answers
showDialog () {
dialog –yesno “Do you want to enter y?” 5 50 && \
ANS=”Yes was entered using dialog” ||\
ANS=”No was entered using dialog”
showAnswer;
}

#actually show the answer
showAnswer() {
echo $ANS;
}

#check answer for command line processing
checkAns() {
if [ "${OPT1}" == "y" ]
then
ANS=”Yes sent by getopts”;
elif [ "${OPT1}" == "n" ]
then
ANS=”No was sent getopts”;
else
ANS=”This: $OPT1 was sent by getopts”;
fi
#call showAnswer
showAnswer;
}

#get the options
while getopts “a:h” ARG;
do case “${ARG}” in
a) OPT1=”${OPTARG}”;;
h) HELP=”TRUE”;;
esac;
done

#see if help was entered
if [ "${HELP}" ]
then
#display help and quit
help;
exit;
fi
#if the options are empty
if [ -z "${OPT1}" ]
then
showDialog;
else
checkAns;
fi

Keep this getopts and dialog post in mind next time your shell scripting. It will take a little extra time to implement but the result will be a user and sysadmin friendly script.

Creating Dialogs with Dialog

Filed under: Shell Script Sundays — TheLinuxBlog.com at 5:48 pm on Sunday, October 21, 2007

Have you ever seen those pretty dialogs used in Shell Scripts such as the Slackware installation, the slackpkg program or even the NVIDIA driver installer? Well, my friends to display dialog boxes from shell scripts is very easy with… you guessed it – Dialog.

First of all, there are many different types of dialogs that you can create they are as follows: calendar, checklist, fselect, gauge, infobox, inputbox, menu, msgbox (message), password, radiolist, tailbox, tailboxbg, textbox, timebox, and yesno (yes/no).

This blog post is intended to be a primer on using dialog. More examples will be posted in future blog posts in the Shell Script Sunday’s column.

The simplest form of a dialog in a shell script is probably the msgbox. All this really does is displays text. To display text in a dialog you would do the following:

owen@the-linux-blog:$ dialog –msgbox “Hello from the Linux Blog!” 5 50

The numbers after the text in quotes are the widths and heights of the box. The minimum height that I like to use is 5. The width doesn’t really matter as long as it is big enough. It is good to keep the box sizes standard across a whole script because it gets annoying with constantly resizing boxes.
If the text in a message box is too long it will auto wrap around and give you a type of scroll bar. As follows:

owen@the-linux-blog:$ dialog –msgbox “Hello from The Linux Blog. This text is so long it wraps it to a New Line” 5 50

Dialogs can be canceled. Clicking Ok or pressing enter/return returns “true” and pressing escape or Ctrl+C returns a false.
The simple shell scripting syntax shown in Shell Scripting 101

is used for this:

owen@the-linux-blog:$ dialog –msgbox “Dialog Exit Example” 5 50 && echo “ok” || echo “false”

Another simple dialog example is the Yes/No box. The syntax for this is exactly the same as the msgbox example except instead of using –msgbox, –yesno is used. The difference between a msgbox and a yesno box is that there a two buttons. It is pretty obvious as to what they are labeled, but for those in the back, I’ve included an example and some screen shots anyway.

owen@the-linux-blog:$ dialog –yesno “Are you learning anything from this blog” 5 50 && echo “Yes, thanks Owen.” || echo “No, Write some better Linux Related Posts”

The Linux Blog - Dialog Example - Yes / No

Thats about all I have time for this week. Check back next week!