Password Protect Using Htaccess

The easiest way to protect a web directory is to use a .htaccess file. A .htaccess file is a directory level configuration file used by several web servers including the highly popular Apache. The .htaccess file is placed in a web directory and the commands in the file controls the behavior of that directory.

A .htaccess file is used mainly for 3 purposes: authentication, the re-writing of URLs and cache control. Today, I’ll show you how to password protect a web directory using the .htaccess file.

Step 1
First, create a .htpasswd file. For security purposes, place the .htpasswd file outside of your web directory. You can place it anywhere in your file system, but your home directory is probably the best place for it. To create a .htaccess file, issue this command in your Terminal:

# sudo htpasswd -bc /home/ulysses/.htpasswd username password

The htpasswd command will create a file called .htpasswd in your home directory. The period at the beginning of the file denotes that it is a hidden file. You can view it by issuing a “ls -a” command from your Terminal. Don’t forget to supply your own username and password.

Step 2
Next, make a .htaccess file in the web directory that you want protected. In this example, we will password protect a web directory located in /var/www/widget.

# cd /var/www/widget
# vi .htaccess

Type in the following code in the .htaccess file.

AuthUserFile /home/ulysses/.htpasswd
AuthName EnterPassword
AuthType Basic
<Limit GET POST>
require valid-user

Save the file and open your browser and check if the web directory is password protected. You should see something similar to this from your browser.

Keeping Up With WordPress Development

One way of keeping up with the latest WordPress development is to install WordPress using Subversion. Subversion is an open source version control system. Using Subversion is a great way of synchronizing your WordPress install with the latest code changes in WordPress development.

In this example, we will install WordPress files in the /var/www/wordpress directory using the Subversion checkout. We will get the latest WordPress development code in the main WordPress “trunk” at Automattic’s. To install WordPress using Subversion:

cd /var/www/wordpress
sudo svn co .

At this moment, there’s a big redesign of the WordPress’ Dashboard. The design changes will be part of the WordPress 2.7 release. The Dashboard changes are significant. The redesign employs a new menu system with an entirely different look and feel.

To keep up with daily development, I’ve installed a WordPress instance using Subversion. Updates to my install with the main development track called “trunk” can be synchronized in seconds using a simple command line entry (see below).

# sudo svn update

Having a WordPress instance maintained by Subversion is key to keeping up with the latest WordPress development. It’s a great way of familiarizing oneself to the upcoming WordPress release before it hits the general public.

You can also participate in the testing and bug reporting. The WordPress community can always use a few more users to test the greatest and latest code.

Linux Boot Up Less Than 3 Seconds

There’s a Linux distribution borne out of Japan called Lineo that claims it can boot up in 2.97 seconds on a low-powered system. The technology uses something similar to hibernation or suspend to disk. It takes a snapshot of the system, compresses it and saves it in flash memory.

Boot up improvements can be up to 10 times faster than a normal Linux distribution. Meanwhile, Intel engineers were able to configure an Asus Eee PC running Fedora to boot up in less than 5 seconds. The boot system is comprised of modified software loads from Fedora and Moblin.

Better boot time could be a factor between choosing Linux over Windows. Less 5 seconds is fast, but less than 3 seconds. That’s heaven.

Inspiron Mini 9 Laptop

Mini laptops are popular. Dell’s entry into the mini laptop world does not disappoint. The Inspiron Mini 9 is small, compact and light at just 2.28 lbs. The Inspiron is available in two Operating Systems: Ubuntu Linux 8.04.1 or Microsoft Windows XP Home Edition.

The Inspiron Mini 9 is powered by Intel’s Atom Process N270 (1.6GHz 533Mhz FSB 512K cache). The LCD panel is a glossy 8.9 inch LED display with a resolution of 1024×600. Memory comes in either 512MB or 1GB. The hard drive is solid state, meaning it’s quiet and with absolutely no moving parts. Hard drive sizes begins at 4GB, 8GB or 16GB.

The Mini 9′s video card is powered by Intel’s Graphics Media Accelerator (GMA) 950 and the unit comes with a wireless 8.02.11g mini card with battery life roughly at around 4 hours. The laptop comes in two colors: Obsidian Black or Alphine White with a 1 year warranty main-in service.

What are some of the things you can do with the Mini 9 laptop? You can listen to your favorite music, surf the web, chat, instant messaging and some light office work with a word processor, spreadsheet or presentation software.

The Mini 9 is available for purchase at Dell’s website. Also, check out the great reviews written by customers who have bought the Mini 9 laptop.

Open Office 3.0

If you have not been living under a rock, you probably heard by now that Office 3.0 was released to the general public on October 13th. If you have not heard about the Open Office 3.0 release, it’s time to get familiar with the Open Office 3.0 application.

Open Office is an open-source Office Suite of Applications. It’s the free, open-source equivalent to MS Office suite of applications. Open Office 3.0 contains a Word Processor, Spreadsheet, Presentations, Graphics, Formula and Database capabilities. The biggest feature for this release; Open Office is now available to the Mac.

Other prominent features are Open Office can now open files saved in Microsoft 2007 or Microsoft 2008 for the Mac. The new suite plays nicely with Visual Basic and Microsoft Access 2007 formats. Users can also create Web 2.0 documents in XHTML and MediaWiki formats.

With third-party addons, more capabilities are available including an Impress presenter console, support for business analytics, PDF import, and the creation of Hybrid PDF documents.

The Open Office website is currently experiencing high traffic due to huge amount of downloads. It seems like a popular site at the moment. If you want to check it out, visit the Open Office website.

Gmail IMap and Evolution

I had trouble setting up Gmail IMAP in Evolution in the past that the only way I fixed it was removing Evolution and installing Thunderbird. But, today is a very good day. I finally got Gmail IMAP to work in Evolution! This post is to document the Gmail IMap configuration in Evolution as a future reference. Hopefully, someone will read it and benefit from it as well. So, here we go. Let’s add a new account in Evolution by accessing the menu. Pull down the Edit > Preferences. Click Add to add new account.

Identity Tab

Let’s start with the Identity Tab. Enter the name of the account. In my case, I am simply calling it “Gmail.” Now, enter your full name and your email address. You can add a optional signature if you want.

Receiving Email Tab

In the Receiving Email tab, please select “IMap” server type. Enter “″ as the server. The username is your full email address. Select “SSL encryption” for the secure connection type. The authentication type is “Password.” Checking remember password is optional if you want to avoid typing in the password everytime you access Evolution.

Receiving Options Tab

This section is really a personal choice. I like to be able to check messages every 10 minutes, show only subscribed folder as well as automatically synchronize remote mail locally.

Sending Email Tab

Please select “SMTP” for server type. Use “″ for the server. Use “TLS encryption” for secure connection. Select “Login” for authentication type. Use your full email account name for the username. Checking the remember password feature is optional.

The rest of the Tab folders are optional settings that you can set based on your own personal choice. That’s it. How I failed to get it to work previously was beyond me. Sometimes missing a single parameter can mean a whole lot of difference.

Ubuntu Eee 8.04.1

The Ubuntu Eee is Ubuntu optimized for the Asus Eee PC. It uses the Netbook Remix interface for easy access to applications. The distribution uses Firefox 3 for secure web browsing experience and OpenOffice for word processing, spreadsheets, presentations and dozens of other software. The latest Ubuntu Eee release is 8.04.1. It’s compatible with Asus’ Eee 701 series, 2G, 900, 901, 1000, and 1000H models.

Download the latest Ubuntu Eee.

Installing VirtualBox in Ubuntu 8.04

Installing Virtual Box in Ubuntu should be an easy endeavor. I have come across several how-to documents that were confusing to say the least. This document will try to simplify the steps involved in installing Virtual Box in Ubuntu 8.04 Hardy Heron. Ok, let’s get started.

1. First, determine the current Linux kernel you are using. Click on Applications > Accessories > Terminal. Type the command:

$ uname -a
Linux penelope 2.6.24-19-generic

The result shows I’m running the Linux 2.6.24-19 kernel.

2. Next, install Virtual Box using the apt-get command. Substitute your current Linux kernel for virtualbox-ose-modules-generic.

$ sudo apt-get install virtualbox-ose virtualbox-ose-source

3. Add yourself to the vboxusers group using one of the 3 commands. Choose only one command. I ran the first one.

sudo gpasswd -a `whoami` vboxusers
sudo usermod -Gvboxusers -a `whoami`
sudo adduser $USER vboxusers

4. Log out of your desktop session by hitting CTRL-ALT-Backspace. When you log in, your group membership will be updated.

5. Congratulations. You have successfully installed Virtual Box.

To install another OS, refer to the documentation Using Virtual Box.

The screenshot below shows the gOS 3 running on my Virtual Box.

gOS 3 Gadgets

gOS 3 Gadgets is a Linux distribution based on Ubuntu 8.04.1. The package contain applications or Google gadgets like Google Mail, Google Calendar, Google Reader, Skype, Pidgin, YouTube, WikiPedia, Blogger and the Open Office Presentation, Spreadsheet and Word Processor.

In addition, Wine is installed allowing thousands of Windows application to run under Linux like Photoshop, Internet Explorer, etc. Prism, a new application by Mozilla is also installed allowing web application to be split from the browser and run directly on the gOS desktop. Google Mail, Calendar, Documents and YouTube are run through Prism.

Give gOS 3 Gadgets distribution a try. Just download the ISO from the gOS website. Burn the ISO to a CD drive. Place the CD in the drive and reboot the computer. Select start or “install gOS.” Once gOS is loaded, click the “install” icon to begin installation. When finished, just reboot.

If you are an experienced Ubuntu user, it takes a little bit to get used to gOS menu’s, icons, and window controls. gOS reminds me so much of Mac in terms of the icons, navigation and controls. But you can’t go wrong with gOS since it is built on top of a solid Ubuntu distribution.

Compiz and RandRRotation Working

Today, I decided to do a clean install of Ubuntu 8.04 on my desktop. Before wiping out my disk, I backed up all my personal files in my home directory to an external USB drive. The Ubuntu installation was a breeze. No glitches whatsover.

After the install, I added three programs: gPHPEdit, Audacity and Filezilla. In addition, I also installed Compiz Fusion to activate the “eye candy” graphics effects. As I expected, the screen rotation for displaying in Portrait mode wasn’t working with the nvidia driver.

My setup is a Nvidia FX-5200 graphics card and a HP w2207h widescreen monitor. So, I fiddled with the xorg.conf file a little bit. After a couple of tries, to my big ultimate surprise, I got both Compiz Fusion and RandRRotation working together! Woot!

Here’s my xorg.conf configuration.

Section "Device"
Identifier "Configured Video Device"
Driver  "nvidia"
Option "NoLogo" "True"
Option "RandRRotation"

I’m ecstatic to say the very least.