0

New Blog Title, New Logo

As you already saw, I changed the title for this blog from “Robby Chen Personal Blog” to “Ubuntu Web Coder “as well as the logo.

One reason for changing the blog title is because I’m going to stick to Ubuntu, specifically Lucid Lynx (10.04.1), since I depend on some PPAs to get the updates. Maverick Meerkat (10.10) just doesn’t work for me. I will wait until Natty Narwhal (11.04) is out and see. If this still won’t work for me, I will stay with 10.04.1 and wait for the next release… Anyway, you get the idea.

As most of you who read this blog in the past know, I used to write code in Netbeans until I discovered the hidden potential of gedit for being such a good IDE. That’s why I abandoned Netbeans and replaced with gedit in the new logo. And I renamed blog title specifically to “coder” because I would like to try writing the code in each post from now on.

Besides the gedit logo in the new logo, I have also included two groups of logos, GNU/Linux and PHP. The GNU/Linux logos include Linux penguin, Chrome OS, Android, and Open Source. The PHP logos include PHP, CakePHP, and WordPress. I also included just released HTML5 logo created by W3C. I regularly use these tools and talked and will continue to talk about them in this blog. That’s why I included them in the logo.

What do you think about the new logo, blog title, and background color?

5

Bash Script to Install Ubuntu to CR-48 through USB easier (Updated)

Update (01/18/2011): Thanks to flyboy415′s comment below, it inspires me to add an optional parameter to the script that allows you to customize the path of your USB drive. You probably read my another post shows you how to mount the USB drive manually in Chrome OS.  Now you can run this script with that directory that you created:

bash ubuntu.sh /tmp/usb

I spent last several days writing and testing the script which could help some of you installing Ubuntu onto CR-48 using USB drive a little easier.

This script is inspired by Jay’s script over at chromeos-cr48.blogspot.com. It’s also based on the steps over at the Chromium projects website. However, it uses your custom generated rootfs.bin in the USB drive instead of downloading the pre-made image.

Below is the entire script. You can either copy it directly to gEdit and save as .sh file or download the same script at github.

The Code

#!/bin/bash
#
# This script is used to install Ubuntu to CR-48 (or any other Chrome OS devices) from USB drive
#

# Display the purpose of this script
echo -e "n==============================================================="
echo -e "This script helps you to install Ubuntu on CR-48 (or any other nChrome OS devices) from USB drive a little easier.n"
echo -e "NOTE: You can pass the location of your USB drive as the only nparameter of this script"
echo -e "For example, bash chrome-os-ubuntu.sh /tmp/usb"
echo -e "================================================================="

# Disabled powerd service
echo -e "nDisabling power management service..."
sudoV="`initctl start powerd`"
sudoV2="`initctl stop powerd`"
if [ "$sudoV" = "" -a "$sudoV2" = "" ]
then
 echo "Make sure you run this script in the root account. Enter the following to enter root:"
 echo "sudo su"
 echo "After you are in the root account, run this script again."
 exit
fi
initctl stop powerd
echo -e "Power management disabled."

echo -e "nChecking the partitions size..."

# Do the following tasks if they were not already done
resizeV="`sudo cgpt show /dev/sda | grep 12103680`"
if [ "$resizeV" = "" ]; then

 # Resize the partitions
 echo -e "Resizing the partitions..."
 sudo umount /mnt/stateful_partition
 sudo cgpt add -i 1 -b 266240    -s 12103680 -l STATE   /dev/sda
 sudo cgpt add -i 6 -b 12369920  -s 32768    -l KERN-C  /dev/sda
 sudo cgpt add -i 7 -b 12402688  -s 10485760 -l ROOT-C  /dev/sda

 # Destory the stateful_partition
 echo -e "Clearing the stateful_partition, it will take some time..."
 sudo dd if=/dev/zero of=/dev/sda bs=131072 seek=1040 count=47280

 # Restart the notebook
 echo -e "nYou need to reboot your notebook in order to continue.nMake sure to press CTRL + ALT + => (Left arrow), login as chronos, and run this script one more time after Chrome OS was rebooted.nPress ENTER to continue or wait 1 minute to reboot automatically."
 read -t 60 iputs
 sudo reboot

fi

echo -e "The partitions are resized."

# USB drive verification
usbV="`mount | grep sd | grep -v sda`"
listing="`ls /media | tail -n 1`"
if [ "$1" == "" ]; then
 usbDr="`ls /media/$listing`"
else
 usbDr="$1"
fi
while [ "$usbV" = "" -o "$usbDr" = "" ]; do
 echo -e "nPlease insert the USB drive with rootfs.bin, make_dev_ssd.sh, and common.sh in it.nPress ENTER when the drive is inserted.nIf you are not signed on to Chrome OS. Please press CTRL (left) + ALT (left) + <= (left arrow) to return to the graphical interface and sign on in order to detect yout USB drive by Chrome OS. Press CTRL + ALT + => (right arrow) to return to this script and press ENTER to continue.n";
 echo -e "Note that if you already mounted your USB driver manually, you can kill this script by pressing CTRL + Z and rerun this script with a parameter that points to the path of your USB drive.nFor example, bash chrome-os-ubuntu.sh /tmp/usb"
 read ready
 echo -e "Detecting USB device..."
 sleep 10
 usbV="`mount | grep sd | grep -v sda`"
 listing="`ls /media | tail -n 1`"
 usbDr="`ls /media/$listing`"
done

# Mount the USB drive
echo -e "nMounting USB drive..."
if [ "$1" == "" ]; then
 usbDir="/media/$listing"
else
 usbDir="$1"
fi
echo -e "USB drive is mounted."

# Determine the existence of three required files
rootfs="`test -e $usbDir/rootfs.bin;echo -e $?`"
makeDev="`test -e $usbDir/make_dev_ssd.sh;echo -e $?`"
commons="`test -e $usbDir/common.sh;echo -e $?`"
if [ "$rootfs" = 1 -o "$makeDev" = 1 -o "$commons" = 1 ]; then
 echo -e "nSome of the required files cannot be found on the drive.nMake sure rootfs.bin, make_dev_ssd.sh, and common.sh are copied to the drive and reinsert it to the notebook.nRestart this script when you are ready."
 sudo umount $usbDir
 exit
fi

# Copy rootfs.bin in USB drive to /dev/sda7
echo -e "nCopying rootfs.bin to /dev/sda7, this will take some time..."
sudo dd if=$usbDir/rootfs.bin of=/dev/sda7
echo -e "rootfs.bin successfully copied."

# Mount /dev/sda7
echo -e "nMounting Ubuntu partition..."
sudo mkdir /tmp/urfs
sudo mount /dev/sda7 /tmp/urfs
echo -e "Ubuntu partition is mounted."

# Copy cgpt and /lib/modules/ to Ubuntu partition
echo -e "nCopying necessary files to Ubuntu..."
sudo cp /usr/bin/cgpt /tmp/urfs/usr/bin/
sudo chmod a+rx /tmp/urfs/usr/bin/cgpt
sudo cp -ar /lib/modules/* /tmp/urfs/lib/modules/
echo -e "The files are copied successfully."

# Unmount /dev/sda7
echo -e "nUnmounting Ubuntu partition..."
sudo umount /tmp/urfs
sudo rmdir /tmp/urfs
echo -e "Ubuntu partition successfully unmounted."

# Decide the rootdev
echo -e "nDetermining the Chrome OS kernel partition..."
rootfs="`rootdev -s`"
if [ "$rootfs" = "/dev/sda3" ]; then
 ker="/dev/sda2"
else
 ker="/dev/sda4"
fi
echo -e "Your kernel partition is in $ker."

# Copy the kernel to /dev/sda6
echo -e "nCopying $ker to /dev/sda6..."
sudo dd if=$ker of=/dev/sda6
echo -e "Copied successfully."
echo -e "nNow is the critical time to check the above output for any errors. If there are some errors, press Ctrl+z to stop this script and correct them. By not correcting them, you might need recover image from Google to restore Chrome OS. Otherwise, press ENTER to continue."
read checkEr

# Change kernel command line
echo -e "nChanging the kernel command line..."
cd $usbDir
sudo sh ./make_dev_ssd.sh --partitions '6' --save_config foo
echo -e "console=tty1 init=/sbin/init add_efi_memmap boot=local rootwait ro noresume noswap i915.modeset=1 loglevel=7 kern_guid=%U tpm_tis.force=1 tpm_tis.interrupts=0 root=/dev/sda7 noinitrd" > foo.6
sudo sh ./make_dev_ssd.sh --partitions '6' --set_config foo
echo -e "Changed successfully."

# Generate ubuntu alias in .profile
echo -e "nGenerating ubuntu alias..."
echo -e "alias ubuntu="sudo cgpt add -i 6 -P 5 -S 1 /dev/sda;sudo cgpt add -i 2 -P 0 -S 0 /dev/sda;echo 'Swiched to Ubuntu, restart to take effect'"n" >> /home/chronos/.profile
echo -e "ubuntu alias generated."
echo -e "nYou can type 'ubuntu' (without quotes) in Chrome OS command line to switch to Ubuntu from now on.nIn Ubuntu, add the following line to .bashrc to use 'chromeos' (without quotes) to switch back to Chrome OS:"
echo -e "alias chromeos="sudo cgpt add -i 2 -P 5 -S 1 /dev/sda;sudo cgpt add -i 6 -P 0 -S 0 /dev/sda;echo 'Switched to Chrome OS, restart to take effect'""
echo -e "nPress ENTER after you copied the above alias down."
read chromeos

# Complete Ubuntu installation
sudo cgpt add -i 6 -P 5 -S 1 /dev/sda
sudo cgpt add -i 2 -P 0 -S 0 /dev/sda
echo -e "nUbuntu installation is complete.nPress ENTER or wait 30 seconds to enter the newly installed Ubuntu."
read -t 30 ubuntu
sudo reboot

Few warnings before running this script

You need to running the script under bash instead of sh, for example

bash ubuntu.sh

where ubuntu is the name of your script.

If you use sh instead, you won’t see the error messages produced on the screen and might need the recovery image to restore Chrome OS as stated in the script above.

The make_dev_ssd.sh and common.sh files can be downloaded here which are provided by chromeos-cr48.blogspot.com. You might not have these two files during the chroot installation if you chose to get minilayout instead of the full layout of Chromium OS source code.

Other requirements, such as login as root, will be provided as you execute through the script.

Issues while running the script

If you have any issues while running this script, feel free to leave a comment or create an issue over at github.

3

More Storage Space for Ubuntu on your CR-48 Notebook

chrome-logo

Intro

I downloaded lots of files to Ubuntu on my CR-48 recently, and eventually it ran out of 1GB of free space. While I was struggling to delete the unused files in Nautilus, I noticed that there are unmounted partitions listed above the bookmarks section, especially the 6.2 GB File System.

The Process

The process for acquiring additional storage space for use within Ubuntu is simple. Just click the disk labeled 6.2 GB File System to mount it, and then navigate to /home/chronos which is your home directory inside Chrome OS. Inside this folder, you can do the normal file operations like in your Ubuntu home folder. This gives you additional 5 GB of hard drive space to save you documents.

Note that you cannot edit the files outside the chronos home folder. Only the 6.2 GB File System, and C-OEM partition, which has 13.5 MB of free space available, can be accessed by Ubuntu, rest of the partitions (two C-ROOT partitions) cannnot be accessed within Ubuntu.

Issues

If you have any issues on getting additional storage space, feel free to leave a comment.

26

My Touchpad and Keyboard Solutions for Ubuntu on CR-48 (Updated)

Update (09/09/20110): I no longer use CR-48 because of its hardware limitation. The solutions in this post may not be working as Chrome OS kernel is updated frequently. Sorry for the disappointment.

Update (01/05/2010): As Pheonix7117 pointed out in the comment, here is the fix to the Touchpad issue in Ubuntu. Note that you don’t need to do the first step (Downgrade Xorg) and the last step (Broken Packages) if you are running Lucid (Ubuntu 10.04) on the CR-48.

Update (12/26/2010): For those of you never read comments (like me), Pheonix7117 has posted another tip for vertical scrolling using the touchpad. Here is the direct copy of Pheonix7117′s comment:

Here’s a temporary workaround to get *some* amount of scrolling working in the meantime:If you install the package ‘gpointing-device-settings’ it will add a menu entry to System > Preferences called Pointing Devices.
It *should* list a device called “PS/2 Synaptics TouchPad”.
What I did was enable wheel emulation and changed it to button 3 (which I believe is right click) and enabled vertical scroll. I left timeout and inertia default (inertia seems to be 0, timeout is fairly short) and left middle button emulation unchecked. This enables a regular right click when doing a ‘hard’ click in the bottom right corner without lingering, and if you hold the right click you can swipe a finger up or down to scroll. Granted, this isn’t using the touchpad driver at all as this is supposed to be used for regular mice, but it’s a start for getting by for now.

Update (12/21/2010): Pheonix7117 posted a Python script for controlling the xbacklight in the comments section. I only have a little understanding of Python language, but I think it’s a well-written script to control the backlight with the keyboard.

Introduction

Ever since I installed Ubuntu on CR-48, I wondered about how to improve the touchpad speed and keyboard functions. I experimented with the touchpad driver today and noticed that while I can enable the touchpad tab inside the Mouse property with xinput, the options under the touchpad tab doesn’t seem to take any effect. Therefore I have to find  other ways to configure the touchpad. The keyboard configuration was easy since all the functions are available in Ubuntu except for the right click, caps-lock and delete keys.

Touchpad

General setup - Under the general tab in the Mouse Preferences, move the Acceleration and Sensitivity sliders to the max fast and high respectively so that the cursor could move a little fast and reduce the chance to accidentally tap the touchpad while typing.

Left click and right click - The bottom left and bottom right corners of the touchpad recognize by Ubuntu as the left and right buttons, while toward middle of the touchpad doesn’t have any click event.

Middle click (Scrolling wheel) – I usually use the middle click on web pages when I want to open a link in a new tab. It doesn’t have a middle button on the touchpad. However, I can use Ctrl + tap to open a link to a new tab in most of the browsers. As for the most of the applications I use, none of them has middle click event except for games, which cannot run on this notebook because of the hard drive space limit.

Keyboard

The brightness keys – Install the xbacklight package, and assign the following commands to the corresponding keys on the first row of the keyboard through Keyboard Shortcuts window:

xbacklight -dec 10     # Decrease the backlight by 10
xbacklight -inc 10      # Increase the backlight by 10

The volume mute, decrease volume, and increase volume keys - Change the default shortcuts for Volume mute, Volume down, and Volume up in the Keyboard Shortcuts window to the appropriate keys on the top row of the keyboard.

Right click, caps-lock and delete keys - As I stated earlier, I cannot find the functions for these keys since they are not available on the keyboard. However, you can use some remapping programs to remap these keys to the available keys.

Questions

Do you have any other touchpad and keyboard related tips for CR-48? Please share them below. Also leave a comment below if you have any questions for this topic.

27

Reinstall Ubuntu on CR-48 notebook with USB

Introduction

According to the /etc/X11/xorg.conf in the Chrome OS, the USB devices need to be manually mounted (AutoAddDevices=’false’). I inserted a sample USB device and run lsusb command to see if detected. It detected successfully without any problem. I then copied the image file with 5GB of size onto the USB drive with a little bit of issue. Using only steps from one small section on the official Chromium OS page, I was able to successfully reinstall Ubuntu on the Chrome OS in about 45 minutes (and downgraded to 10.04 since WebDAV support is broken in 10.10). Here are the detailed steps:

Steps

  1. You need an empty USB thumb drive. The file we are going to copy to the USB drive is more than a little 5GB. The file system for the most flash drives is vfat (FAT file system). It has a single file size limit of about 3GB which our file would fail to copy to the disk.  To solve this issue, you need to reformat your flash drive to the file system format other than FAT using the Disk Utility from System -> Administration menu.

    Disk Utility

    I formated my USB drive as EXT4

  2. Copy rootfs.bin you converted from VDI image to the USB drive.
  3. After it’s finished, insert the drive into the USB slot of CR-48.
  4. Boot into Chrome OS, press Ctrl + Alt + => to switch to develop mode, and login as chronos.
  5. Type sudo su to login to root and type the following line to get the information on where the USB drive is located:
    dmesg | grep sd
  6. /dev/sdb1

    My device is located at /dev/sd1

    My USB drive is located at /dev/sdb1, so I type the following to the command line (replace sdb1 with yours):

    mkdir /tmp/usb
    mount /dev/sdb1 /tmp/usb
    
  7. After it’s mounted, copy rootfs.bin to sda7 with dd command:
    cd /tmp/usb
    cat rootfs.bin | dd of=/dev/sda7
    

    This should take about 20 minutes.

  8. Mount sda7 after that and copy the necessary files to the disk:
    mkdir /tmp/urfs
    mount /dev/sda7 /tmp/urfs
    cd /tmp/urfs
    cp /usr/bin/cgpt usr/bin/cgpt
    chmod a+rx usr/bin/cgpt
    cd /lib/modules
    cp -ar * /tmp/urfs/lib/modules/
    
  9. And finally, don’t forget to unmount the disk:
    umount /tmp/urfs
    umount /tmp/usb
    
  10. There you have it, a brand new Ubuntu installation. You can use the following command to boot into Ubuntu or use the aliases from my last post:
    cgpt add -i 6 -P 5 -S 1 /dev/sda
    

Have issues?

Do you have any issues with any of the steps above? Please feel free to discuss them below.

40

My First Tip on using Ubuntu with Chrome OS on CR-48 Notebook (Updated)

Update (03/15/2010): Based on Dan’s comment below, I’ve updated chromeos and ubuntu aliases in the post to remove the Chrome OS partition part. According to Dan, my previous aliases raised Chrome OS partition whenever the OS was switched, which means that when Chrome OS is updated, these aliases would restore the Chrome OS to the oldest version. For more information about this update, please read Dan’s comment.

Update (12/19/2010): I wrote a post on how to use your flash/USB drive to (re)install Ubuntu on the CR-48. Check it out.

Update (12/18/2010): I just discovered that .bashrc file is never executed in Chrome OS unless running another bash after chronos is logged in, and .profile is the file which being executed after each login. Therefore I changed the following instruction to .profile for Chrome OS. If you already created .bashrc file in the chronos home folder, you just have to rename it to .profile using the command below:

mv .bashrc .profile

Introduction

I have used the newly received CR-48 from Google for two days. I enjoyed so far for web browsing, but not so for web development / programming. Since I couldn’t find any good IDE on the cloud which has support for WebDAV, I decided to following the instruction on the Chromium Project website to install Ubuntu onto this device. After several hours of installation, Ubuntu loaded to the device. However, because it comes from a VirtualBox disk image, it’s nearly impossible to reinstall Ubuntu without re-transferring the disk image from my laptop to this notebook which is a 5GB file, it would spend another 5 hours just for transferring this file over ssh. I’m trying to shorten this long waiting hours. I will post another tip if I find a way. But for now, here are the two scripts I wrote to switch between Ubuntu and Chrome OS using the alias command.

Steps

First of all, I assume you also received a CR-48 notebook and installed Ubuntu on it by following on this page.

This first script is for Ubuntu:

  1. Open the file named .bashrc in the home folder  using your favorite text editor (make sure to show the hidden files by pressing Ctrl+H).
  2. Add the following line to the end of the file:
    alias chromeos='sudo cgpt add -i 6 -P 0 -S 0 /dev/sda;echo "Switched to Chrome OS, restart the machine to take effect"'
    
  3. Open a new terminal window to load the new alias.
  4. Type chromeos and a message will be displayed stating that you need to restart to switch to Chrome OS
  5. Restart your device and you are in the Chrome OS.

Now inside the Chrome OS:

  1. Press Ctrl + Alt + -> (the Forward button in the first row) and login as chronos
  2. Since Chrome OS also uses bash, we can write to the .profile file, but this time in the chronos home folder.
    qemacs .profile
    

    The command above creates and opens a new file called .profile inside the home folder using the only text editor available in Chrome OS qemacs.

  3. Insert the following line into .profile
    alias ubuntu='sudo cgpt add -i 6 -P 5 -S 1 /dev/sda;echo "Switched to Ubuntu, restart the machine to take effect"'
    
  4. Execute bash to launch another instance of bash, or if you are confused, you could just logoff current session by typing exit command and login again.
  5. Typing ubuntu command to switch to Ubuntu on the next startup.
  6. Restart your device to begin using Ubuntu.

In the future, you could just use chromeos and ubuntu commands to switch back and forth between Chrome OS and Ubuntu without changing back to normal mode using the small switch on the back of the battery.

Enjoy the free dual-boot notebook from Google.

0

Using gEdit to write CSS3

Snippets Manager

Introduction

Since I discovered gEdit has a few useful plugins and wrote about some of them, I have continued to use it as a main IDE. Come to think of it, I almost never used Netbeans which was my favorite editor until I discovered the power of gEdit. In this post I’m going to talk about use one of the gEdit plugins that come with gedit-plugins package – Snippets – to make writing CSS3 code easier.

The snippets plugin lets you define a keyboard string to be typed, then press the Tab key, and the code assigned to that keyboard string would replace this string. It’s great for repeatable code like HTML and CSS. It also has a kind of template markup which defines where the cursor would be focused on. Thankfully, it’s very easier to learn if you have little programming knowledge.

Steps

The following is the best example I can think of explaining the complete markup language and introduce CSS3 code at the same time (First, make sure the gedit-plugins package is installed, you can install it by execute “sudo aptitude install gedit-plugins” on Ubuntu):

  1. Open gEdit (If you don’t know where to open, it’s in the Applications -> Accessories menu)
  2. Make sure the Snippets plugin is enabled: Open Edit -> Preferences -> Plugins, scroll to the very bottom, and select Snippets.
  3. After it’s enabled, open Tools -> Manage Snippets and click to expand the CSS sub-menu. Or, you could create a CSS stylesheet, open Manage Snippets, and it will expand the CSS sub-menu automatically.
  4. Click Create New Snippet button at the top left of the Help button and type the descriptive name for the code snippet you are creating. For example, I named it transform since it will include CSS transform code.
  5. Click the right text box and type the following code (it will be explained later):
    transform: ${1:[scale,rotate,skew]}(${2:degrees}deg);
    -moz-transform: $1($2deg);
    -webkit-transform: $1($2deg);
    $0
    
  6. Click on the Tab Trigger field and type the keyboard string you want to assign to. For example, I assigned it to transform.
  7. Close the Snippets Manager window and you are ready to write CSS transform property.

Explanation

Below I will explain the code in the step 5 above. But first, for those of you new to CSS3, here is an example for the transform property:

transform: skew(-40deg);

Now for the explanation:

The dollar sign ($) followed by a number defines a field which it will be focused with the Tab key.

If you want to predefine a field, you need enclose the predefined value with brackets ({..}) along with the number followed by a colon. For example, ${1:predefined value}.

If you rather want to choose a word from a list of predefined words, you need to add these words after the colon, separate each word with commas, and enclose the list with square brackets. For example, ${1:[val1,val2,val3,val4]}. Once you focused the field with the list of words, it will provide a drop down menu with the list of words for you to choose from.

In the case of -moz and -webkit, you just need to add the corresponding fields  $1 and $2 to the appropriate locations in order for the repetitive code to work. The plugin will automatically fill out the rest as you type the value in the first occurrence of the field. For example, as you type the field ${1:predefined value}, it will fill out $1 in the rest of the document.

Finally, $0 represents the end of the Tab sequence, meaning that it will return to the original tab function.

Also note that in order to use the regular dollar sign ($) within the snippets, you need to escape it using backslash ().

For more information on how to write the template markup for the plugin, refer to the official documentation on gEdit website.

How do you creatively use the Snippets plugin to reduce code repetition? Please share them the comments section below.

0

My First Arch Linux Installation Experience

I first heard Arch Linux two years ago when I also discovered Linux from Scratch project. At that time, I didn’t have any experience on GNU/Linux nor the command line. I have finally chosen Ubuntu 8.04 because its good reputation on the Internet. However, I’m not interested in Ubuntu anymore since I recently upgraded to Ubuntu 10.10 and downgraded back to 10.04. Because my GNU/Linux skills have increased during the past years, I have decided to try Arch Linux.

During the installation process, I followed the installation instruction on the Arch Linux wiki:
https://wiki.archlinux.org/index.php/Beginners’_Guide

After transferring to USB using UNetBootIn, I have to change the USB drive label to ARCH_201005, otherwise it will display the following message:

(Click to enlarge)

To change the label, type “palimpsest” (without quote) in the terminal. Select the USB device on the left. Make sure to unmount the driver first, and then click the “Edit Filesystem Label” button to change the drive label to ARCH_201005.

And since I have both 64-bit laptop and 32-bit netbook, I downloaded the dual ISO which contains both 32-bit and 64-bit versions of the OS. After I copied the files to the USB drive through UNetBootIn and booted into the boot menu, the 32-bit and 64-bit selection items have no effect. The only option that works is the first “Default” one which is the 32-bit version. Because I want to install it on my 64bit-based laptop, I tried to figure out how to install the 64-bit version of Arch Linux. After looking into the boot options by press the tab key at the boot menu, I found out that all of the boot image files for each architecture are in the /boot folder. I also noticed that the working “Default” one is based on the two files in the root directory: ubninit and ubnkern. I think that these files are the same as the ones in the /boot/i636/ folder. Therefore I renamed these files with .32 extension and copied the only two files in the /boot/x86_64/ folder to the root directory with the same names as the ones with .32 extension. I then copied and renamed these files to the root directory with .64 extension for backup purpose. In the end, here is my current files in the root directory of the USB device:

(Click to enlarge)

Note that the two files without any extension (ubninit and ubnkern) are 64-bit files. I could delete them and replace with the .32 extension files in the near future once I decide to install Arch Linux on my netbook.

Since I was installing on the laptop, I have no wired Internet connection. I had to first connect to the Internet by using ifconfig, iwconfig, and dhcpcd utilities before the installation. Also, according to the wiki, I have to execute “dmesg | grep firmware” command in order to find out and install the appropriate wireless firmware during the installation.

Once I installed Arch Linux, I needed to solve the wireless auto-connection issue. Thanks to the netcfg wiki (https://wiki.archlinux.org/index.php/Network_Profiles#Connecting_automatically), I quickly solved the issue. One last thing that I’ve done is to remove the network daemon in the DAEMONS section of /etc/rc.conf file since I have loaded net-profiles daemon and I think the net-profiles daemon has the same usage as the network daemon.

After I installed GNOME and Compiz, I noticed the title bar on all the windows were missing once I enabled Compiz through fusion-icon. Thanks for the tip on the Arch Linux forum (https://bbs.archlinux.org/viewtopic.php?id=96991), I was able to regain the title bar. The solution is easy: open the ccsm (CompizConfig Settings Manager) and enable the Window Decoration plugin under the Effects section (make sure to enable Move Window and Resize Window plugins under Window Management section as well since they are basic window interaction elements). I also noticed that unlike Ubuntu and other similar distributions, all the Compiz plugins in Arch Linux are disabled by default since I installed GNOME from scratch.

The following are the reference sources that helped me during the installation:

If you have other tips on the Arch Linux installation and configuration process, please share them in the comments below.

0

ISO Master – An Useful ISO Creator and Editor for GNU/Linux

If you are following my Twitter, identi.ca, or Facebook feed recently, you knew that I’m currently switching to Arch Linux on my laptop since I don’t like Unity to be the default UI for Ubuntu 11.04. Besides, I already lost interest with Ubuntu 10.10. This post is based on the upcoming post about my Arch Linux installation experience.

When I was installing Arch Linux, I have to change the ISO label in order to reproduce the following error message inside VirtualBox:

(Click to enlarge)

I never changed label for an ISO file in GNU/Linux. So I googled a bit and found an useful tool for creating and editing ISO files called ISO Master. It is on the Softpedia website, which is a software download and review site. Unfortunately, I don’t think this tool is in any of the GNU/Linux repositories. This means that I have to compile and install it myself. Surprisingly, after I downloaded the source file, the compiling and installing process went smoothly without any error.

After the installation was finished, I launched ISO Master from the Sound & Video application menu. The UI is clean and easy to navigate. I opened downloaded Arch Linux image file and click File → Properties. I then changed its volume name and saved as a new ISO. Thanks to this useful utility, I was able to reproduce the above screenshot, as well as my operation with ISO files in the future.

For the complete review of ISO Master, read the article on Softpedia: http://www.softpedia.com/reviews/linux/ISO-Master-Review-50543.shtml

0

An Easy and Cool GIMP Effect

Today I learned a cool GIMP trick through tutorialegimp. I think it is a Spanish blog. For some reason, the video was not available anymore after I watched the video tutorial once. Fortunately, I remembered all the steps to create this effect because it is very easy if you know GIMP well.

Here are the steps to create the effects (I will use one of the Star Craft 2 wallpapers, you can use any image):
StarCraft 2

  1. Use the Crop Tool to  crop out the black borders around the image (Use Ctrl+mouse wheel to zoom in to precisely crop to the edge of the image)
  2. Duplicate the layer and select Image -> Canvas Size to enlarge the width of the canvas to 200%
  3. Use Move Tool and zoom in to move the duplicated layer to the empty part of the canvas which is to the right, make sure to fill the canvas
  4. Select Layer -> Transform -> Flip Horizontally to connect between left copy and right copy of the image
  5. Right-click the first layer and select Merge Down to merge the layers together
  6. Again duplicate the layer and select Image -> Canvas Size to enlarge the height of the canvas to 200%
  7. Again use Move Tool and zoom in to move the duplicated layer to the empty part of the canvas which this time is to the bottom, make sure to fill the remaining canvas
  8. Select Layer -> Transform -> Flip Vertically to connect between top copy and bottom copy of the image
  9. Right-click the first layer and select Merge Down to merge the layers together
  10. Duplicate the layer again and this time select either Layer -> Transform -> Rotate 90 degree clockwise or counter-clockwise
  11. Change Layer Mode to Darken Only for the first layer and Merge Down
  12. Duplicate the layer once more and use Rotate Tool to rotate the layer either to 45 degree or -45 degree
  13. Change Layer Mode to Darken Only for the first layer once more and Merge Down
  14. If you want, you can also duplicate the layer and rotate the layer to the opposite 45 degree and repeat step 13
  15. You also can lighten the image by selecting Colors -> Levels if you want to bright the image

Below is the completed effect:

Easy and cool GMP effectHere is its video tutorial: