Saturday, January 31, 2009

Ubuntu and OpenOffice.org3 Upgrade Issue "GPG error"

Issue
Getting the following message when trying to update:

W: GPG error: http://ppa.launchpad.net hardy Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 60D11217247D1CFF

Fix
In terminal, run the following commands:

gpg --keyserver keyserver.ubuntu.com --recv 60D11217247D1CFF
gpg --export --armor 60D11217247D1CFF | sudo apt-key add -
sudo apt-get update


This made my OpenOffice.org3 upgradeable again.

Friday, January 30, 2009

Fixing MBR after removing Linux (dual boot with Windows XP)

Intro
I had this PC at work where we had dual boot Windows XP and Ubuntu Linux. After removing Linux partition, GRUB would not boot into Windows. MBR needed to be repaired for Windows.

Fix
Boot with Windows XP CD. Selected "repair console". It asked for which Windows installation (entered 1 since only one was offered) and then asked for admin password.
Once in repair command line, two commands are of interest:

fixmbr
fixboot c:


First one I believe cleans MBR and second one makes sure that C: will be bootable. Both command will ask for confirmation. Answered with y (for yes) and enter.

Sunday, January 18, 2009

Removing Unnecessary Packages (Ubuntu 8.04 LTS)

Intro
Love trying new things on Linux. Occasionally, it happens that I need to remove some of the installed and tested packages. However, removing the package with apt-get or Synaptic does not necessary mean you will remove all the packages installed with it (dependences) .

Quick and Elegant
To remove unnecessary (aka "orphan" packages) use the following:

sudo apt-get autoremove

Works like a charm.

Saturday, January 17, 2009

Perfect Cup of Coffee: French Press

Intro
This afternoon a thought came to me that we should try that French press again. It has been a while since I used it.

Tools
  • French press
  • Grinder

Ingredients
  • Coffee beans, French (dark) roast
  • Water
By the list of ingredients you can tell that I am applying KISS principle ("keep it simple stupid").

Preparation
I put two larger cups full of clean and good water to boil. I used microwave oven, but stove can do it, too. Please note an emphasis on good water here. Your coffee contains around 99% of coffee so you do not want to use any stinky water (check what is going on with you tap water, use filtered or bottled water).

While the water is getting to boiling grind the coffee. You do not want to overdo the grinding. Make it coarse so it does not clog the press. Having a freshly ground coffee is generally a very good idea regardless of the way you preparing it.

Put coffee into the press and pour the hot water over it. Stir slowly and carefully. Put the lid on and let it brew for about 3-4 minutes. Do not push down the press yet.

After 3-4 minutes push the press down. Turn lid open and pour into the cups.

This is kind of an excellent mix of Turkish coffee and filter coffee. It has that smooth and rich flavor. I do not put anything in my coffee. You can add cream and/or sugar. Whipped cream goes with it well, too.

Friday, January 16, 2009

Critically Low Battery Settings (Ubuntu 8.04) on Dell Vostro Laptop

Intro
I recently noticed that my laptop would not gracefully shut down in the event of battery being critically low. It would display a warning message, but it would go off "sudden death" style. I searched the issue and found that I am not alone. I found some suggestions on changing the settings (thresholds) using gconf-editor.


Changing the settings
In terminal, run gconf-editor. It will open a window as displayed bellow. Select /apps/gnome-power-manager/thresholds/. My default values are displayed to the right.

My "wild guess" at this time is to increase percentage_critical from 3 to 7, and percentage_low to 15. I am also increasing percentage_action parameter from 2 to 5. That should initiate graceful shutdown of my laptop when the battery is at 5 % left.


The settings need to be tested. They may require some more tuning. Will see if the laptop shuts down properly (not "sudden death" style).

Waiting for Conclusion
I am waiting for my battery to go down to that level and see what happens. If it works the settings need to be adjusted for each user.

Update: It worked!
The laptop did a normal shutdown once the battery percentage level when under the newly preset value. Please note that you need to update settings for all users. I am curious if this can be preset on the system level.

First Steps on Ice

A picture is worth a thousand words... Pardon me, I meant youtube video...

Safe Shutdown of Ubuntu 8.04 with APC UPS (USB)

Intro
I recently installed Ubuntu 8.04 LTS server on a nice PowerEdge T300 server from Dell. I am also using APC UPS, model Back-UPS XS 1300 LCD with it. Ubuntu's power monitor does correctly reprots the battery charge, but is not shutting down the system when the battery charge is low/critically low. In order to do that I needed to install a nice utility called apcupsd.

Setup
Install the apcupsd package
sudo apt-get install apcupsd

Edit file /etc/default/apcupsd
sudo gedit /etc/default/apcupsd

and change the following line to "yes"
Set ISCONFIGURED=yes

Now edit the configuration file
sudo gedit /etc/apcupsd/apcupsd.conf

Make sure that the following is set:
UPSCABLE usb
UPSTYPE usb
DEVICE

NETSERVER on
NISPORT 3551

You can also adjust these values to what you think fits:
BATTERYLEVEL 8
MINUTES 4

Verify Setup
To start the apcupsd service use following command:
sudo apcupsd start

Status can be checked with the following command:
sudo apcaccess status

Restart PC and makes sure that apcupsd is running by checking the status with the same command.

Final test
Unplug the UPS and monitor the status of the battery. When it comes down to the preset values (in my case 8% or 4 minutes left) your system should initiate and complete shutdown process before your battery runs out.

Reference
http://www.apcupsd.org