Friday, February 29, 2008

Open Office Calc charts should be able to fill up the entire worksheet

Happy leap day! Now back to your regularly scheduled program.

I love metrics and statistics. I particularly love historical trends like the how the Euro was once worth $1.10 in 2003 instead of the ridiculous $1.52 high it hit this week (a trip to Europe this summer is looking more and more expensive) and how 59% of you (visitors to this site) are using Firefox on Linux (just based on OS, 66% are using Linux and just based on browser 80% are using Firefox).


I preface this post with all that so you will not think me too nerdy when I tell you I keep track of every mile I drive and every gallon of gas I burn in my car and then stick it in a spreadsheet and graph it. I know the min/max/average/median for the miles I drive between each fill up, my price per mile, my total cost per fill up, and the list goes on. I also know an average of how many miles and how much I spend on gas on a daily/weekly/monthly/yearly basis. I admit it is nerdy but it is neat to know and easy to keep track of!

I used to keep track of all this data in an Excel spreadsheet until I moved to Linux and decided to just switch the file over to an Open Document Spreadsheet (ods). That all went great. I even edited the file as an Excel sheet in Open Office for a while. But I do have some beef with Open Office and the culprit is charting in Calc.

I know that charting in Calc has come a long way and is still being improved upon. I applaud the developers and am thrilled that there exists such a high quality open source spreadsheet application. There are lots of little missing features in the current 2.3 release that I would like to see such as better looking chart defaults, trend lines and data label positioning. All of these things are being worked on but the one other thing I really want, I don't see in any development plans. I really want charts to fill up an entire worksheet as they do in Excel.

Excel lets you place a chart in it's own worksheet. When a chart is configured to be it's own sheet it resizes based on the size of the application window. As far as I can tell, Open Office Calc doesn't support a feature like this yet. The best you can do now is stick your chart on it's own worksheet but once there it is set as a fixed size. I realize this is a small issue but shouldn't it also be fairly easy to implement? Maybe not but I sure hope it is and it makes it in to an upcoming release.

See how my pretty graph impoted from Excel looks. Imagine how nice it would look it if filled up the whole window. By the way, this chart below shows the price I paid per gallon for gas since August 2004 and until I filled up this morning before work. I really wish it filled up the whole worksheet! :-)

See that first spike? That was a peak of $3.099/gal in September 2005 due to Hurricane Katrina. The next spike was between May and August 2006. And the final bump there is just depressing... I paid $3.129 per gallon this morning. The most I have ever paid.

Wednesday, February 27, 2008

Ubuntu update manager is better than Windows update manager

Updating your operating system these days is just a fact of life. There are always bugs to fix, security holes to patch and little new features (and sometimes big features, think XP SP2) to push down to users. Both Windows and Ubuntu have update mechanisms in place so users don't have to periodically check and install updates manually. I think if automatic updates didn't exist, most users would never update their systems.

Before Windows had good updates they also had the Code Red worm that affected IIS in July 2001 and Linux had the OpenSSL Slapper worm in September 2002. My home Linux web server got hit by Slapper. The system did have an update feature (the Red Hat Network!) but it was not setup to be automatic. I am not sure why I even had SSL running and open to the world since I didn't use it but that is another story. (If you want to know a little more history about major computer viruses and worms, this Wikipedia page is interesting and helpful: Timeline of notable computer viruses and worms.)

Back to my point - Ubuntu's update manager works well and is not annoying but Windows update makes me want to punch a hole in the wall. I have both Ubuntu and Windows configured to check for updates periodically. Windows checks on whatever schedule Microsoft decided was good and my Ubuntu boxes check daily as I decided was good. I have both configured to go ahead and download updates and let me know when they are ready to be applied.

Ubuntu Update Manager Notification
I don't remember the default behavior of Windows update but I know a lot of people have it setup to install updates automatically. Ubuntu will allow this too and I don't remember its default setting either. Installing the updates automatically sounds great for the novice but I always want to see what is getting updated before I apply any patches to my system. That way if something goes wrong after the updates, I will have an idea what updates caused it and where to start to fix it.

Now we get to the real annoying part. Most of the time Windows updates require a system restart! Why? The only time Ubuntu has ever wanted to restart after installing updates was when a new kernel was installed. What is worse is if you have Windows update configured to automatically install updates it will also automatically restart your system! I don't know about you but I leave a ton of applications up and running all the time. I don't want to come to my computer in the morning and find it freshly restarted with all my applications closed and data lost.

If Windows is configured like mine to ask you to install updates, it will add a little yellow shield in the system tray and occasionally give you a pop up. This is the same way users are notified about updates on Ubuntu.

Windows Updates Notification
But after installing the updates the dreaded "Restart Now" dialog kicks in. I feel like this dialog comes up every 15 minutes or so! It is so annoying. And what is worse is I have occasionally accidentally clicked on "Restart Now" instead of the "Restart Later" button when attempting to keep working instead of being interrupted by this annoying dialog.

NO! I do NOT want to restart now Windows!
If Ubuntu needs to restart, it kindly adds an icon to the system tray. There are no pop ups every 15 minutes that are all to easy to click the wrong button causing your system to just restart right then and there. Windows doesn't even care about anything you may be working on that is unsaved. If you say "Restart Now" it will just start killing applications. Ubuntu updates will occasionally also have a little light bulb letting me know I need to restart some program for the updates to take effect ("some program" has always been Firefox so far). Again, they let me know but they don't annoy me or allow me to screw up something by trying to ignore a dialog.

Ubuntu Restart Required (image thanks to HowtoForge)

To get around the hated "Restart Now" dialog in Windows, I just wait to update when I am about to restart for some other reason. This means updates on my system take longer before they get installed making my system more insecure. It is also getting me in a bad habit and I find that I don't always update Linux when I see that there are new updates.

One final point. Ubuntu also has a great advantage of being able to update your applications as well as the operating system. In Windows, updates don't exist for all those 3rd party applications you installed. You have to manually go out and download an update for each an every program. That assumes you know there are security or bug fix updates to be installed. With Ubuntu, update manager knows about all your applications and updates them along with the OS. Nice!

Wednesday, February 20, 2008

The program 'XYZ' is currently not installed. You can install it by typing:

I am not sure who to thank but a big thanks to who or whatever implemented the code to tell me when something I want to run is not installed and how to install it!

I am working on a website for my uncle and I needed to get a development environment up and running. It is going to be a simple and mostly brochureware site so I just wanted PHP and Apache. I went to check to see what version of php was installed and got this:

The program 'php' is currently not installed. You can install it by typing:
sudo apt-get install php5-cli


Now that is some user friendliness. I had already installed some of the PHP packages from Synaptic (since they were not listed under Add/Remove Programs) but apparently I missed some things.

Now we shall see how well Smarty works. I've not worked with PHP in a long time and the last time I did I had my own hacked template code. Good times.

Saturday, February 9, 2008

A New Look For Ubuntu 8.04 Hardy Heron, Nope!

Ever since the feature plan for Ubuntu 8.04 was released, tons of designers have been working hard to create mockups for Ubuntu's new look. As of the alpha 4 release on February 2, this "new look" has not shown up. From this schedule, it looks like we will start seeing some of this in alpha 5 on February 21.

So I just wanted to compile some of those mockups that I have found. What do you think of these?

And many, many more 8.04 mockups can be found on the Ubuntu wiki.

Update: But now after Googling around some, it appears this radical theme change has been pushed to the 8.10 release.

Friday, February 8, 2008

Removing Old Linux Kernels on CentOS

This blog is mostly about desktop Linux but I also help manage a handful of Linux server for work. We mostly run CentOS servers or the occasional Fedora on internal sites but use CentOS exclusively for any public sites. I was finally getting around to updating a CentOS 3 server today with good old yum update when I ran into an unwelcome surprise.

Running test transaction:
Errors reported doing trial run
installing package kernel-smp-2.4.21-53.EL needs 53KB on the /boot filesystem
D'oh! I knew this day would come eventually when my tiny little 90MB /boot partition would get full!

So what to do? Easy, just uninstall some of those old kernels. But how do I do that? It turns out, that is also easy.

First I figure out what kernel I am actually running now so I don't try and delete it. I am not sure what would happen if I tried but I am not going to find out. To determine the running kernel, use uname -r. I am running 2.4.21-52.ELsmp .

Next we want to see what other kernels are installed to find what we can delete. Do this like so:
[root@localhost root]# rpm -q kernel
kernel-2.4.21-37.EL
kernel-2.4.21-37.0.1.EL
kernel-2.4.21-40.EL
kernel-2.4.21-47.EL
kernel-2.4.21-47.0.1.EL
kernel-2.4.21-50.EL
kernel-2.4.21-51.EL
kernel-2.4.21-52.EL

I see that we have 7 old kernels installed. Now to delete them, just use rpm -e like so:

rpm -e kernel-2.4.21-37.EL

And it is gone. Rinse and repeat for the other kernels. I only plan on getting rid of a few. This is what was left:
[root@localhost root]# rpm -q kernel
kernel-2.4.21-50.EL
kernel-2.4.21-51.EL
kernel-2.4.21-52.EL
Now I have 30M instead of 5.6M free on my /boot partition and I can continue the update. Unfortunately that didn't clean up /boot/grub/grub.conf to remove the old kernels from the grub boot menu. Maybe that has been fixed in CentOS 4 or 5 (well, RHEL).

Digg: 50 Proprietary Programs We All Hate--and the OS Alternatives

It's not the price of the software that makes the real difference (although it's a reason to migrate from one software to another for many people); it's the idea that proprietary software comes with boundaries that keep the user experience confined to... well, being the user. Here are 50 commonly used programs that have open source alternatives.

read more | digg story

I pointed out many of the same applications in an earlier post: Cross Platform Applications That Make the Switch from Windows to Linux Easier

Tuesday, February 5, 2008

Upgrade to Ubuntu 8.04 Hardy Heron Alpha 4

After reading the Ars Technica review of Ubuntu 8.04 alpha 4, I decided it was time I gave it a spin. There is some cool new stuff (and also stuff from alpha3, alpha2 and alpha1 releases). My first serious introduction (ie - not running it from the Live CD) to Ubuntu was starting with one of the Beta releases of 7.10 so I don't think I'll have any problem running this alpha. I am only running it on my laptop which I don't use for any serious work anyway. By the way, the one issue I did have with the 7.10 beta didn't get fixed for the release as I recall.

I opted for upgrading online instead of via the CD image. The main reason for that is because my disc drive on my laptop doesn't read CDs anymore, only DVDs. I initially installed 7.10 from DVD. Also, installing online is a lot easier than downloading a 700MB file, burning it to CD and then installing it.

So to kick off the install, just run the command: update-manager -d

And then about an hour and 25 minutes later...
And about an hour into the install I get an error.
It all went down hill from there. I ignored that error but a few packages later got a dialog to restart "ntpd". After that failed, the install failed completely. (No screen shots because that didn't work anymore either.) I then restarted and the file system had errors. fsck fixed them, eventually, and I was able to boot. The install didn't work at this point either. I just got stuck on the brown Ubuntu background. Restarting into failsafe Gnome worked but my wireless didn't. After lots of other little work arounds and hooking up to my wired lan, I got the install completed and working.

After all of this, my stupid bcm43xx wireless card which requires "restricted drivers" didn't work, rendering my laptop useless as a laptop. Argh. I guess I am not ready for the Ubuntu 8.04 alpha, at least on my laptop. I'll likely give it a go when we get to a beta stage. The final will be out in 2 - 3 months anyway.

I'm using the screwing up my system as an excuse to try out Fedora 8. I haven't installed Fedora since release 5 and never installed it on my laptop. Fingers crossed the wireless works! If not I guess back to Ubuntu 7.10 I will go or maybe I will try a differnt distro.

Saturday, February 2, 2008

Gnome Keyboard Shortcuts Rock With My Multimedia Keyboard

I use my Linux box at work a lot more than my machine at home, especially lately. Since the keyboard at work is mapped via Synergy, none of the special keys on my multimedia keyboard work or are just not setup to work. I'm going to have to double check on that Monday morning. Maybe I just have a configuration issue.

Tonight I discovered that most of the keys do work on my multimedia keyboard at home! (Same keyboard by the way, the Microsoft Natural MultiMedia Keyboard 1.0a.) I pressed the calculator button out of habit and up popped the calculator. Sweet! Then I tried out the Play/Pause, Mute, Volume, Previous/Next buttons, and the My Documents button. All but the My Document button worked. But I wanted it to.

So off I go searching and under System -> Preferences -> Keyboard Shortcuts I hit the jackpot. It turned out that nothing was mapped to the My Documents key.

I simply selected the "Home Folder" and pressed the My Documents key and it set 0xef (the My Documents key apparently) to open a Nautilus window to my home directory. Nice! Unfortunately the My Pictures and My Music buttons don't work when trying to map something to them. It doesn't much matter at the moment though because I don't see an action for opening your ~/Music or ~/Pictures directories. I also don't see any ability for custom actions. Considering the overall customization abilities of Linux, that really surprised me. Maybe I wanted the My Music button to launch a script that does some crazy thing. Well I don't think I can. At least I can change every other default shortcut if I have the desire too.

Also, here is a handy table of some common keyboard shortcuts I love and use regularly:

ActionShortcut
Show the Applications MenuAlt + F1
Bring up a run application dialogAlt + F2
Take a screenshotPrint Screen
Take a screenshot of the active windowAlt + Print Screen
Move to the workspace to the rightCtrl + Alt + Right Arrow
Move to the workspace to the leftCtrl + Alt + Left Arrow

There are many, many, many more so check out the Keyboard Shortcuts application to see what is configured. The default settings may vary slightly between distributions but hopefully not much.

Also, one last tip for you Windows switchers. If you miss pressing the Start/Windows button to bring up the application menu (instead of the current Alt + F1), you can remap that easily too. It turns out pressing that is the same as "Super + L". Honestly though, I would recommend getting used to the default since that is what is going to be everywhere else.

Oh, and one more note. Last one, I promise. If you have "Desktop Effects" enabled (i.e. Compiz), there are a lot of other special Compiz shortcuts that come into play there. Many of those effects utilize the "Super" key which is also the Start/Windows key.