Monday, February 12, 2007

Grub : Booting Windows XP Using Grub

This is how I boot Windows XP via Grub which was installed by the Kubuntu 6.10 CD

Added this entry to the end of the file /boot/grub/menu.lst :

title Microsoft Windows
map (hd0) (hd1)
map (hd1) (hd0)
root (hd1,0)
makeactive
chainloader +1


I'm told the map commands make Windows think it's the first hard drive (hd0). There are several variations of this command if this doesn't work for you.

You'll want to replace the bold values with your own settings which you should be able to see via "fdisk -l".

hd0 = first hard drive
hd1 = second hard drive
hd1,0 = second hard drive , first partition

Friday, February 09, 2007

How to change the Firefox error message page

If you're trying to change the Firefox error message page you won't find that option in the Preferences menu.

If you use Linux, click here.



The Firefox error message page is stored in web page (xhtml) file.

In Windows that file (netError.xhtml) is stored within the archive toolkit.jar

Browse to this folder C:\Program Files\Mozilla Firefox\chrome\

Then inside Explorer in the meu at the top you should have a Tools button



Click Folder Options and then click the View tab at the top




Now make sure the box that says "Hide extensions for known file types" is unchecked.

Click apply, then ok.

Right now would be a good time to make a backup copy of this file in case anything goes wrong.

The file toolkit.jar must be renamed to toolkit.zip so we can open it.

Select the file toolkit.jar and press F2 on the keyboard. Press backspace and the name toolkit.jar should erase, type in toolkit.zip and press enter. Windows will warn you with a pop up, ignore it.

Open the file toolkit.zip

Open the content folder

Open the Global folder

Find the file netError.xhtml

Extract this file to your desktop, my documents or where ever.

This is the file which generates the Firefox error message page :



You can edit this file with notepad and make whatever changes you desire. After you change the netError.xhtml page you MUST put it back into the toolkit.zip file.

To do this :
  1. Right click the custom netError.xhtml file you made, left click copy
  2. Open toolkit.zip, open the content folder, open the Global folder
  3. Right click, chose paste - or maybe go to Edit @ the top and chose paste. You may even be able to drag and drop the file into this window.
  4. If it ask you if you want to overwrite the old file chose yes

You MUST rename toolkit.zip back to toolkit.jar

You may have to restart Firefox to get the effect.

I changed mine to this :



Code :


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html [
<!ENTITY % htmlDTD
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
%htmlDTD;
<!ENTITY % netErrorDTD
SYSTEM "chrome://global/locale/netError.dtd">
%netErrorDTD;
<!ENTITY % globalDTD
SYSTEM "chrome://global/locale/global.dtd">
%globalDTD;
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>&loadError.label;</title>
</head>
<body>Problem Loading Page</body>
</html>






Linux / Ubuntu
How To change the Firefox Error Message Page


Update :
I recently did a system update and now the netError.xhtml is setup like on Windows (contained inside of toolkit.jar in the /opt/firefox/chrome/ directory). I basically had to the same steps as on Windows. Extract the file from toolkit.jar, edit it, re-add it to toolkit.jar then restart Firefox. If your setup is the same the below directions will not work.

I use Kubuntu Linux, it's a spin off Ubuntu which of course is based on the popular distribution Debian.

Kubuntu Ubuntu

On my machine the file netError.xhtml was located in :

/usr/share/firefox/chrome/toolkit/content/global/

This may be different on your machine. Try doing a file search for it if you can't find it there.

In my case I did this command to edit it :

sudo kate /usr/share/firefox/chrome/toolkit/content/global/netError.xhtml
//]]>