Tag Archive: Ubuntu

Install LAMP on Ubuntu VPS

Install LAMP onto Ubuntu VPS

Thanks to the Host1Free VPS offer, I was able to administrator the server directly in the cloud without using any local resources, for the testing purpose at least. The advantages of using this free VPS is obviously its price of free, as well as the freedom of installing and experimenting with different utilities at system level compared to what you can do in the shared hosting environment. Although this free VPS configuration is not very fast, it can help me to learn everything about server administration and maintenance before I’m able to afford VPS with more power or even a dedicated server.

Anyway, here are the steps to use this VPS as a web development server.


  1. Make sure you have SSH client installed. Mac OS and Linux already have SSH installed. For those using Windows can use PuTTY. By using Mac OS or Linux, I assume that you already know how to use terminal. If not, you can google for the SSH GUI alternative for Mac OS or Linux.
  2. Once you verified that you have SSH client installed, the next step is to connect the VPS through SSH. Find out the IP address of your VPS. It’s generally displayed in your VPS control panel, in XXX.XXX.XXX.XXX format ( for instance). Ask me in the comment section below if you cannot find the IP address for your VPS.
  3. Open the terminal and type the following line (if you are using a GUI app, please refer to its documentation for help):

    ssh [email protected]

    Replace with your VPS IP address.

  4. If this is your first time SSH to the server, it will display a confirmation message confirming you to connect to the server. Type “yes” to confirm.
  5. After pressing enter and wait a while, you are now in your VPS server.

Note: If you restored the VPS image through your control panel and used SSH to access the server before, you need to delete the known_hosts file in .ssh folder in your user directory. Otherwise, you won’t be able to access the server again due to different host key:

rm ~/.ssh/known_hosts

Create a New User

In order to avoid being hacked and protect root account, we need to create a user account which does not have root privilege.

  1. Enter the following command:
    adduser username

    Replace the username with the username of your choice.

  2. Follow the prompts to enter the new password for your account, as well as detailed information about you. If you don’t want to enter any of your personal information, you just simply press enter to continue to the next field.
  3. When you are finished, type “y” to confirm that it’s the correct information.
  4. Your username has been created. Now you can login to the VPS with this username instead of root.
  5. Make sure to add your newly created username to /etc/sudoers to have temporary root privilege. Otherwise, you won’t be able to do system tasks such as upgrade in the next section.
    vi /etc/sudoers

    Locate the following section and press “i” to edit file

    # User privilege specification

    Go to the end of this section and press enter to create a new line. Go up one line and type the following to add your username to the list:

    username ALL=(ALL:ALL) ALL

    Make sure to replace “username” with your username. Press esc to exit the edit mode and type “:x!” to save this read-only file.

  6. If you want to learn more about vi text editor, or if you have any problem regarding the above steps, please let me know in the comments section below.
  7. Enter the following command to logout from your server:
  8. Connect to the server using your newly created account: ssh [email protected]
    Replace username with the username you created in the last section, and replace xxx.xxx.xxx.xxx with the IP address for your server which you supposed to find out at the beginning of this tutoail.
  9. Enter the password when you created your username.

Update & Upgrade

If you just created this VPS or this is your first time logging into this VPS, the first task is to issue a upgrade command. Otherwise, most of the commands mentioned below won’t work.

  1. Type the following command and press enter:
    sudo apt-get update
  2. After the above command finished executing, issue the following command:
    apt-get upgrade
  3. There will be a lot of packages that need to be upgraded if this is a brand new VPS. After the upgrades are found, press y to confirm to install them.
  4. Wait until the system is upgraded. This will take a while.
  5. After the system is upgraded, it’s recommended to restart server before continuing:

LAMP on Ubuntu VPS

Now we are ready to begin the LAMP installation process.

  1. Login to the server once more with SSH due to the restart in the last step.
  2. Enter the following command (or copy and paste into the terminal if you don’t know how to type “^”) to start the LAMP installation:
    apt-get install lamp-server^
    Note: Ubuntu 12.04 seems to work very well for me when installing the LAMP server. Ubuntu 13.10 (which is the latest available version in my VPS control panel, the latest Ubuntu version as of this writing is 14.04) always hang during the installation of MySQL server, after it displays the MySQL change password error message.
  3. If you want to store the web server files to your home directory for backup purpose, you can edit the apache2 configuration file.
    sudo vi /etc/apache2/sites-enabled/000-default

    Press i and replace the two places of “/var/www” to “/home/username/public_html”. Replace the username with your username.
    Press esc and type “:x” to save.
    Don’t forget to create the public_html folder inside your home directory.

    mkdir ~/public_html

    And to apply the new Apache configuration, restart Apache.

    sudo service apache2 restart

You have finished LAMP installation. Now you can visit your empty website by going to the IP address of your VPS. Well, it is empty until you upload some web pages.

Transferring files

With SSH set up in the first section of this tutorial, you can now also use SFTP to transfer files between local files and your server. The setup is easy. Just use your favorite FTP client to connect to the server. Make sure to select SFTP in the Protocol field for your client and fill out other necessary fields to connect to the server. Once connected, you are ready to publish your website.


With a VPS, you always can use the latest version of PHP and a variety of PHP extensions if you want. You can also install Ruby on Rails, Node.js, Git, and other additions you need without any restrictions set by the shared hosting. However, since you are basically using other people’s resources, it’s important to have a contingency plan to backing up all the files in the home directory on the VPS in case anything happens to the VPS server.

Remapping some keys on the Mac keyboard under Ubuntu

Using Apple Keyboard in Ubuntu

The keyboard layout in Ubuntu is based on Windows (the standard keyboard). On the Mac, there are two extra keys which Ubuntu does not recognize, the two Command keys. It’s configured with Super (Windows) keys instead.

It’s a waste of space to have two Super keys. This post shows you how to configure these keys to perform the functions they intend to (such as copy, paste, and close window, etc), also known as remapping.

  1. Open the terminal.
  2. Type the following commands and press enter to create a file called .xmodmap in the root of your home folder.
    cat <<EOF > .xmodmap
    remove control = Control_L Control_R
    remove mod4 = Super_L Super_R
    keysym Control_L = Super_L
    keysym Super_L = Control_L Control_L
    keysym Super_R = Control_R Control_R
    add mod4 = Super_L Super_R
    add control = Control_L Control_R
    xmodmap .xmodmap
  3. You are free to edit the file using either gEdit or nano to suit your needs. You can test your keyboard and get the keycode or keysym for the keys you want to be mapped with the command “xev”. To end this command, just switch to another window or click the desktop and refocus the terminal window and press Ctrl + Z (Note: Not the command key).
  4. After you are satisfied with the result, it’s time to rename .xmodmap so it will automatically remap the keyboard whenever Ubuntu is started.
  5. Type the following command to the terminal to rename the file .xmodmap to .Xmodmap.
    mv .xmodmap .Xmodmap
  6. Restart the system.

Enjoy Ubuntu with your remapped keyboard!

Note: Almost all the keyboard shortcuts work fine under the remapped keyboard except one. The keyboard shortcut for switching between windows in OS X is Command + Tab. However, since Windows uses Alt + Tab for this shortcut and the above steps mapped Command keys with Ctrl keys. Therefore, you have to change the habit of using Command + Tab to Alt + Tab for switching windows.

Do you have any other solutions or have problem to configure the keyboard under Ubuntu after following the above steps? Please leave a discussion below.


Charge iOS devices under Ubuntu

iPad not charging in Ubuntu resolved

Charging iPhones or iPod Touches under Ubuntu is no problem. However, when it comes to iPad, it always indicates “Not Charging” on the iPad screen when connecting to Ubuntu. This post discusses how to solve this “Not Charging” issue.

  1. Open the terminal and type the following command and enter your account password to install the required components:
    sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev git
  2. After the installation for the components has finished, type the following commands to get the source files for ipad_charge which uses to charge iPad:
    git clone https://github.com/mkorenkov/ipad_charge.git
    cd ipad_charge/
  3. Do not rush to install. We need to make a little change to one of the files first. Open the file “95-ipad_charge.rules” using either gEdit or nano and change all the “ab” to “a-z” of ATTR{idProduct} values (there are two of them) as follows:
    ENV{DEVTYPE}=="usb_device", ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[0-9a-z]", RUN+="/usr/bin/ipad_charge"
    ENV{DEVTYPE}=="usb_device", ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12a[0-9a-z]", RUN+="/usr/bin/ipad_charge"
  4. The above code basically means to include all the possible device id for iPad. Otherwise, the device won’t automatically enter charging mode when connected to the system. For example, when I connected my iPad, the id is 129f, which is outside the scope of the original code (it only covers 129a or 129b). It won’t enter the charging mode on its own. I had to manually enter it by executing ipad_charge in the command line.
  5. Now install the program by typing the following commands:
    sudo make install
  6. You can either reboot the system to see the result or just re-plugin the USB connection of your iPad.

Do you have any better suggestion on charging iPad on the Ubuntu system, or have any problem regarding the above steps? Feel free to discuss it in the comment section below.


Resolve Ubuntu not recognized by MBA issue

Ubuntu only in Macbook Air

After I formatted my MBA (Macbook Air) hard drive, wiped away OS X Mountain Lion, and installed Ubuntu, I was very excited to get hands on the newly installed Ubuntu. Unfortunately, MBA didn’t recognize the operating system at all. It didn’t show any boot option in the boot menu except “Internet Recovery” option (press alt/option after the boot sound).

The solution is simple.

  1. Restart MBA using the Ubuntu Live USB.
  2. Connect to Wifi.
  3. Open the terminal and type the following commands to add the Boot–Repair repo:
    sudo add-apt-repository ppa:yannubuntu/boot-repair
    sudo apt-get update
  4. Install the Boot-Repair utility by entering the following into the terminal:
    sudo apt-get install -y boot-repair
    boot-repair &
  5. After the installation, the Boot-Repair program should automatically launch.
  6. After its checking was completed, a small dialog will appear.
  7. Click the Recommended repair button.
  8. After a little while, it will display an error message to notify you to visit the URL provided to view more information about the error. Just ignore this. It basically tells you that it could not install to USB drive. We are fine since our goal is to boot the installation on the local drive, not USB.
  9. Restart MBA.
  10. There is now a new option in the boot menu called “EFI Boot”. Select that.
  11. It now shows the GRUB boot menu. Select the first option. It should be “Ubuntu”.
  12. Now you should be entering installed Ubuntu for the first time.

Do you have any problem or suggestion for one or more of the above steps? Feel free to discuss in the comment area below.


Switching to Mac

Switching from Ubuntu to Mac
After several months of deciding which OS I’m going to switch next because I don’t like how Ubuntu is going since 10.10, I have been giving Mac OS X a try.
Macbook Air 13-inch
I bought an old 13 inch Macbook Air first generation from eBay one months ago and have kept using it since then. When I used this Macbook Air which is from 2008 for the first time, I immediately felt love for it.

Perhaps because there are some similarities between Mac OS and Linux commands, working in the Terminal app is like a second nature to me. Plus, with my experience with Windows in the past, I already knew most of the common operations on the Mac.

The main reason I like to try Mac is because of the influence of my iPod Touch. Yes, I’ve still kept my old second generation iPod Touch along with my Nexus One, with the latest iOS installed. After I switched to Android (Nexus One) for a long time and restart using iPod Touch to perform the iOS-specific tasks, I feel that the Android interface is kind of old compare to the iOS’s.

Mac OS X Lion

Several weeks after the purchase of Macbook Air, I upgraded to the latest version of Mac OS X, Lion (10.7). I love this upgrade, especially the Full Screen and Mission Control features.

As a developer and programmer, I like trying new programming languages such as Objective C and AppleScript. Oh, except Java, because I think Java is too complicated for me to understand, that’s why I avoid programming for Android. With the Macbook Air, I could use Xcode to learn and experiment with these programming languages in no time.

For future posts, I will explore some of these programming languages. This blog will have the same topic (web-related programming) plus new programming languages. I will redesign the blog corresponding to my Mac usage in the near future as well.

Of course, I will continue to use Ubuntu 10.04 as my laptop is still running it. Right now and for the time being however, I’m using Mac more than Ubuntu because I just can’t resist the Mac OS’s interface :) Not only its interface, I also enjoy using its hardware. I especially chose to buy Macbook Air over other Macbook laptops because of its lightness and fast processing power.

Look forward to my future posts which will be written in the new OS environment.

Do you have any experience on how to use Mac OS X and Ubuntu/Linux together without sacrifice Ubuntu/Linux? Discuss your experience below.

Using Chromebook as a Second Monitor

Three laptopsUpdate: According to the Wikipedia, using meta tag to refresh the page is discouraged. However, I think it is okay for development. I also changed the refresh time. It seems that About.com where I originally copied the code from has incorrect information. The refresh time is in seconds, not in milliseconds.

Since my second monitor was broken long time ago, I always missed the two-screen experience.

I have an idea today that since the Chromebook is always connected to the cloud, I can make it as a second monitor by connecting to my main machine’s localhost/IP address. This way I can write the code on my primary PC and instantaneously see the result from the secondary monitor by inserting the following meta tag to the testing web page:

<meta http-equiv="refresh" content="1" />

It allows web page to automatically refresh every one second so that it will show the latest rendering result whenever I save the edited web page.

Note that using this method, you can connect more than two PCs as multiple screens as long as they are connected to your home network.

Here are some photos demonstrating this method using a laptop, a Chromebook, and a netbook running different browsers:

Three laptops

From left to right: Firefox, Chrome OS, Opera

Address Bars

From top to bottom: Firefox (primary PC), Chrome OS, Opera

In case you don’t know, the command for checking the IP address for the primary PC is ifconfig or you can right-click the network connection icon at the top right corner and choose Connection Information:

Connection Information

Connection Information dialog

Leave a comment below to discuss about this method or have any question regarding this post.

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

# 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" = "" ]
 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."
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


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`"
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`"

# Mount the USB drive
echo -e "nMounting USB drive..."
if [ "$1" == "" ]; then
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

# 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
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.

More Storage Space for Ubuntu on your CR-48 Notebook


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.


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

My Touchpad and Keyboard Solutions for Ubuntu on CR-48 / ChromeOS

Update (09/09/2011): 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.


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.


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.


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.


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