October 19, 2010

What is Wubi?


What have I learned from all these unexpected occurrences in Ubuntu—such as when the OS refuses to boot? Finding for solutions to my predicaments in the Internet often made me discover new techniques or terms used in Linux. Take for example, Wubi, I didn't pay so much attention to it even if I have used it to install Ubuntu from a CD.

Wubi (Windows-based Ubuntu Installer) is an official Ubuntu installer for Windows users that can install and uninstall Ubuntu as any other Windows application. Simply put, Wubi is the installer for those who want to experiment and get acquainted with Ubuntu without the need of disk partitioning or formatting—Wubi installs Ubuntu within a file in the Windows file system just like any Windows program.

Installing Ubuntu inside Windows XP using wubi.exe is fast and easy—unlike Windows XP which took me two hours—it only takes less than thirty minutes. I must admit though the first time it took longer than that to install because I was doing it the wrong way.

For more info:
https://wiki.ubuntu.com/WubiGuide
http://en.wikipedia.org/wiki/Wubi_%28Ubuntu_installer%29
http://zenit.senecac.on.ca/wiki/index.php/Install_Ubuntu_While_Running_MS_Windows_%28WUBI%29



October 18, 2010

Access Ubuntu Files From Within Windows XP


If I can access Windows XP files from within Ubuntu Lucid Lynx, can I access Ubuntu files from within Windows XP?

My PC runs on a dual boot system with Ubuntu installed inside Windows XP—the former installed in an external USB hard drive with NFTS partitions, and the latter in the internal hard drive. With Ubuntu not booting all my files are gone. Fortunately, there are tools that can access Linux file systems from within Windows XP and with these tools a user can scavenge the files and salvage the usable materials.

Linux uses a different file system; it's called the extended file system. Extended file system is to Linux as NFTS (or FAT) is to Windows. The default file system of Lucid Lynx is ext4; ext, ext2, and ext3 are the other members of this system. One program that can read ext4 is ext2read. This is the software I used to recover Ubuntu files from within Windows.

Ext2read is an executable that runs on Windows and can read and view files inside an ext2, ext3, or ext4 file system, and save them inside Windows. A screenshot of the program is shown below.


You can get ext2read at the following:
http://ext2read.blogspot.com/
http://sourceforge.net/projects/ext2read/



October 14, 2010

Error: unknown command 'loadfont', Error: file not found


Just as I thought my Ubuntu inside Windows was working fine and nothing could go wrong, as I tried to boot into Ubuntu the screen briefly flashed with
error: unknown command 'loadfont'
error: file not found
and the screen returned to the boot screen menu . Choosing to boot into Ubuntu again only repeated the process. What made Ubuntu to behave like this? Some users point to an update as the cause.

One solution to this problem requires editing the grub.cfg which didn't work for me since I couldn't save the file. I have tried all the solutions and suggestions found in Ubuntu Forums but nothing worked. There is only one way to resolve this problem and that is to reinstall Ubuntu which means discarding all my personal files. However, there are two ways to recover those files and these are:

  1. Copy the root.disk file from the Ubuntu folder in Windows or
  2. Use a software that can retrieve files from within Windows,
Installing Ubuntu inside Windows is easy using Wubi.exe, so I could copy the root.disk file, reinstall Ubuntu, and replace the new root.disk with the old one; this method is fine as long as the root.disk is not corrupted which already is since it wouldn't boot. The best option is explore the root.disk file from within Windows and copy whatever files I could save.

On the next three or more posts I will write down how I experimented with reinstalling Ubuntu using wubi.exe the Linux-newbie way and how I was able to recover my files from the unresponsive Ubuntu.



September 30, 2010

Configure Firefox in Ubuntu to Highlight Entry in the Address or Search Bar in Single Click


Ubuntu's Firefox default setting is just annoying: A single click in Firefox address or search bar does not highlight the entry.

Here are the steps to configure Firefox to highlight the entry in the address or search bar.
  1. In Firefox address bar, type about:config and press Enter.
  2. Click the “I'll be careful, I promise!” button.
  3. In the Filter box type browser.urlbar.clickSelectsAll.
  4. Under Preference Name, double-click browser.urlbar.clickSelectsAll to set it to “true” (or right click and select toggle).
  5. Close about:config.
Note: If the address or search bar does not highlight on single click, restart Firefox.

September 27, 2010

Enable Number Lock Keys on Startup or Before Login in Lucid Lynx Gnome


I am not comfortable with Ubuntu when changes are to be made through the use of the Terminal. Take for example how to enable the number lock in Ubuntu; to enable number lock you have to write codes in the terminal. Writing codes in Linux is my weakness; thankfully there are plenty of resources that can be found in the Internet to solve every Linux problem.

Here are the steps to enable the number lock key.

1. Click Applications > Accessories > Terminal. A terminal window opens.
2. Type the following code in the terminal and press Enter.
sudo apt-get install numlockx
3. Enter your password when prompted and press Enter.
4. A series of codes run through, wait till the line shows:
user_name@ubuntu:~$
terminal.jpg 5. Type the following code and press Enter. A gedit window should open.
sudo gedit /etc/gdm/Init/Default
6. Add the following code before the line exit 0 which is at the end of the code.
if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi
gedit.jpg 7. Click Save in the gedit, and close the gedit and terminal windows.

To check if this works, turn on the numlock key and restart Ubuntu. If you turn it off before restart, it will only be turned on during logon and turns itself off once Ubuntu is running.

Reference: https://help.ubuntu.com/community/NumLock


September 25, 2010

GIMP’s Save for Web Plugin for Windows XP


Most of us are guilty of this: opening an executable (.exe) without reading the readme instructions for the file.

But there are .exe files that need no double-clicking.

This one made me looked dumb—GIMP’s Save for Web plugin. After extracting the zipped folder of its contents, I opened webexport.exe only to be greeted with a prompt that says that the application has failed because libgdk-win32-2.0-0.dll was not found. This kind of warnings in Windows always freaks me out.

The fact is that, the webexport.exe file needs only to be copied to a personal plugins folder in GIMP—there is no need to double-click it, hence the prompt. Copy webexport.exe and paste it to C:\Documents and Settings\\.gimp-2.6\plug-ins and it’s done.

The screenshot below shows the Save for Web option in GIMP’S File menu once webexport.exe is pasted in the plugins folder.



The Save for Web plugin can be downloaded from GIMP Plugin Registry.


September 22, 2010

Error: no such device: 658965p2-8fg5- . . . grub rescue>


My PC failed to boot into Windows XP or Ubuntu after installing the complete update for Lucid Lynx Gnome (Ubuntu inside XP). With so many attempts to restart, I always get:
Error: no such device: 658965p2-8fg5- . . .
grub rescue>
The best solution
Internet search results showed that this issue of “deleted grub(?)” has been in Lucid Lynx since before it was officially released. To new Linux users like me with little understanding on writing commands, a boot failure is terrifying.

Fortunately, a discussion on restoring the grub bootloader can be found in Ubuntu forums. Ubuntu forums has solutions to restoring XP and Ubuntu—including Vista and Windows 7.

I followed the “How to restore the Windows XP bootloader” method. I booted the PC using the XP installation CD and waited to the part where it asks me to install or repair XP. The following is the procedure I took.


  1. Press “r” for repair.
  2. Type 1, when prompted which Windows installation to logon to (1: C:\WINDOWS).
  3. Type the Administrator password. This was tricky. I typed my logon password but it was rejected. I hit Enter instead, which means the Administrator has no password.
  4. Type “fixmbr” in the new command line. Ignored the scary warning that the current hard drive would become inaccessible.
  5. Type “y” for yes to confirm to write a new MBR.
  6. Type “exit” in the new command line after a new MBR is written.
  7. Reboot PC.
Problem solved!

Reference: http://ubuntuforums.org/showthread.php?t=1014708


September 20, 2010

Installing Lucid Lynx Inside Windows XP Taking So Long


So I installed Lucid Lynx inside XP in an external hard drive. It took 24 hours for me to install Ubuntu Gnome. Not that I was able to install it in one go—Ubuntu was just taking so long to install. It took me about 10 attempts to install it and then cancel the installation because it would stall for no reason.

I wondered what made the installation to stall whenever it was at the part where it is downloading the lucid lynx iso.

Well, I got it right when I did what should be done in installing programs—closed all running programs. So to be sure I restarted my PC and closed all running programs that start automatically during start up, except of course for the anti-virus, firewall. and applications initiated by Windows. It was done in 10 minutes.


September 4, 2010

External Hard Drive — Can't Access




As I turned on my external hard drive, the LED light came on. I clicked My Computer in Windows XP and to my horror, the USB hard drive is not there. I checked Device Manager, it’s there but it just shows that it’s a USB storage device and no details. Is this the moment I dreaded that an external hard drive is not reliable and I should have listened to a friend to attached it as an internal hard drive instead?

I checked Administrative Tools, nothing—it’s blank. No sign that XP has recognized it as a device. I restarted my PC, still nothing. Why! when in fact the LED light in the hard drive is turned on. I plugged the USB into a different port—still no success. This is beginning to be a puzzle. I started googling, nada, nothing that would solve my predicament.

But why is the LED light on? Were my files deleted by a hard knock on the hard drive, or did it just vaporize?

I put my hands over the drive’s enclosure. Hmmm . . . no vibrations, I couldn’t feel even a slight hum. Is it the power supply? And why is the LED light turned on?

So I tried to wiggle the female end of the power cord in the hard drive, I felt a whirring sound. Oh, the female end of the power cord is not properly seated. I adjusted it and how wonderfully it worked again! What a fool—all along it was the power cord not seated properly.



August 6, 2010

VLC Media Player Effects and Filters Not Showing Up



You just installed VLC media player, played a DVD using VLC, and you wanted to adjust the color. You then clicked Tools, then Effects and Filters. Surprised? The Effect and Filters window did not show up.

Where is it? If you positioned the VLC main window at the upper-left corner of the monitor, the Effect and Filters window is actually unreachable—it is at the left side of the VLC main window. If only you could reach it with your hand. . .

Position the main window at the right side of the screen. Click Tools > Effects and Filters; you may need to click this option twice—to close and reopen the Effects and Filters window—and there it is!

Ever thought of buying a wider monitor?



August 3, 2010

Lucid Lynx Inside Windows XP



Four months ago my hard disk died—it had three partitions. COD—head crash—a term used when the read-write head scratches on the surface of the hard disk, thereby causing hard disk failure.



I was not able to boot Windows XP. Fortunately, I had Ubuntu
- Hardy Heron installed in a different partition inside Windows and I was able to access and copy all my XP files to an external hard drive. This Ubuntu had been there sitting unused, never crossed my mind that one day it would be of service.

So I bought a new 500GB hard drive and installed Windows XP; and then installed Lucid Lynx Ubuntu on an 80GB external hard drive.

This time I want to get serious on Ubuntu—I want to see how to configure it and how to install software on it. From now on, I will document my Ubuntu experience by posting them on this blog.



May 2, 2010

Tabs Do Not Load When I Open Firefox 3.6.3



Lately, I have noticed that when I open Firefox, the tabs do not load. I opened the Options window in Firefox’s Tools menu then to Privacy > Use custom settings for history and configured some settings making sure the Automatically start Firefox in a private browsing session check box is unchecked. My settings didn’t work.

The culprits, I found out running Firefox on Safe Mode, are two of my add-ons. Disabling either the WebMail Notifier 2.4 or Torbutton 3.6.2 or both of them allows Firefox to load its tabs when opened.

Are these add-ons really the cause of tabs not loading or there is something to be configured in the about:config settings?


March 11, 2010

How to Embed Multiple Calendars in Google Sites



You are probably here because you cannot embed multiple Google calendars in Google Sites. I will show you how I did it or how I found it.

An example of two Google calendars embedded into one can be viewed at Arnel Dy’s Math Webpage.

The iframe tag and origsrc="domainname.org_############### methods
There is a link in Google Calendar, (Settings > Calendars > yourCalendar > Customize the color, size, and other options) that directs you to Google Embeddable Calendar Helper. Copying and pasting the HTML provided in the Calendar Helper—after configuring the calendar
s settings—on your webpage’s HTML window (click the edit HTML button) will not work even though the preview displays your multiple calendars into one.

Also, copying a part of the HTML code provided at Google Embeddable Calendar Helper and then pasting them after origsrc=" somewhere in the page’s HTML will not work. This method returns an error when I tried this.

What works?
Steegle.com provides the best way to embed multiple calendars in Google Sites. A word of advice: Use Your Keyboard to Copy and Paste the HTML Code.

The title of the article at Steegle.com is: Google Sites - Embed Multiple Calendars (and other things)!


February 18, 2010

How to Create an Image Map in HTML



One day, after discussing coordinate geometry with my class, a student asked me about the application of coordinate geometry in HTML. She said she was having trouble finding the coordinates of a link in a clickable picture—the mouse pointer just wouldn’t turn into a hand! So I advised her to right-click the page and find that picture or image if there is a <map> tag in the HTML code.

The following day I gave her a sample on how to create an image map. I am reprinting it here with some modification.

What is an image map?
imageheadhandshoulderAn image-map is an image with clickable areas. For example, in the image at the right, the head, the left shoulder, and the left fingers are clickable areas. These areas are called hotspots and acts as a hypertext link. Any time the user clicks on a hotspot, the hypertext link is activated. These links could activate an html file, mp3, video file, text file, or any other files.

Let’s create an image-map of the image at the right.

The syntax for a hotspot
The shape of a hotspot could be in the form of a rectangle, circle, or polygon. This hotspot’s area is defined by the <area> tag.

The syntax for a rectangular hotspot is:

<area shape="rect" coords="x1, y1, x2, y2" alt="text" href="URL" target="value" />

where x1 and y1 are the coordinates of the upper-left corner of the rectangle and x2 and y2 are the coordinates of the lower-right corner.

The syntax for a circular hotspot is:

<area shape="circle" coords="xc, yc, radius" alt="text" href="URL" target="value" />

where xc and yc is the center of the circle and radius is the radius of the circle.

The syntax for a polygonal hotspot is:

<area shape="poly" coords="x1, y1, x2, y2, x3, y3, . . ., xn, yn" alt="text" href="URL" target="value"/>

where x1, y1, x2, y2, x3, y3, xn, and yn are the coordinates of the vertices of the polygon.

The area element is always nested inside a <map> tag.

If the shape attribute has a value equal to default , the entire region of the image becomes the hotspot.

The value of the coordinates are in pixels and if the area has no associated link then use the nohref attribute instead of href.

Take note that the target attribute is optional.

Step 1: Define an image-map hotspots in the image
To determine the coordinates of a particular point in an image-map, open the image in Windows’ Paint. The coordinates can be obtained from the right portion of Paint’s status bar. Another way to determine the coordinates is b
sampley opening the image in an image editor like GIMP.

With the image example at the right, the coordinates for the rectangles as determined from GIMP are:
x1 = 25, y1 = 0, x2 = 60, y2 = 30


For the circle:
xc = 23, yc = 50


For the polygon:
x1 = 58, y1 = 35, x2 = 80, y2 = 45, x3 = 65, y3 = 60, x4 = 68, y4 = 55


Step 2: Plug in all the values in the HTML code
Plug in all the values in the HTML code and assume a radius of 7 pixels in the circular hotspot.

Make sure that the <area> tags are nested inside a <map> tag and the <img> tag is written before the <map> opening tag.
<html>
<body>

<img src="myimage.jpg" width="94" height="93" alt="myimage" usemap="#mybody" />

<map name="mybody">

<area shape="rect" coords="25, 0, 60, 30" alt="head" href="http://cnn.com/" target="_blank"/>

<area shape="circle" coords="23, 50, 7" alt="hand" href="http://en.wikipedia.org/wiki/Hands" target="_blank" />

<area shape="poly" coords="55, 35, 80, 45, 85, 60, 65, 55" alt="shoulder"
href="http://i17.photobucket.com/albums/b58/kittymimi90/lovely/12-EdgeandRydiaFinalFantasyIV.jpg" target="_blank" />

</map>

</body>
</html>