Thursday, April 30, 2009

Ubuntu Tips - (Updated)

I like Ubuntu, and I collected some tips from the Internet when I encounter problems. I think you might be interested in them too.

Just record a few below:

  1. How To Use Proxy Server To Access Internet at Shell Prompt

    This is the 1st problem I met, since my machine can access the Internet only via a Proxy Server, so when I type something like:

    # apt-get install packagename

    It always give me an error, and cannot get anything updated or installed.

    So I just googled the Internet and found this post is really useful.

    Basically it's using http_proxy environment variable in Ubuntu or any Linux OS, and it allows you to connect text based internet session/application via Proxy Server. So just type the following command to set proxy server:

    # export http_proxy=http://yourproxyserverip:port/

    Also you can setup the proxy variable for all users. To setup the proxy environment variable as a global variable, edit /etc/profile file:

    # vi /etc/profile

    And the following line:

    export http_proxy=http://yourproxyserverip:port/

    If you would like to use password protected proxy server, please refer to the link here.

  2. How to install software package or find the package based on file?

    Sometime I need to install a new customized package from somewhere, it requires pre-install some other packages. Or when you try to compile some new software from source, system might tell you missing some files or library. I sure you will have some question, How do you install individual package on Ubuntu?

    And here are the answers:

    • Via Graphical User Interface

      Under main menu, select System, then select Administration and click on Synaptic Package Management. Type a query into the search, then select a package you think is relative to what you want, Click Install.

    • Via Command Shell

      - Start a Terminal windows (Konsole, xterm, or any other command line/bash shell interface)

      - Type

      sudo -s

      (sudo as in superuser do, su as in "switch user") to get administrative privileges to install software

      - Type your password if prompted.

      - Type
      sudo aptitude install packagename

      If you need to know the package name of your program. Type

      sudo aptitude search 'programname or filename'

      will yield search results for your package when you supply it to the terminal. Here is the "current state" flag for search results:

      • i — installed: successfully installed to system

      • c — config: package not installed, but configuration files remain

      • p — purged: package has no files on system

      • v — virtual: package does not exist, but another "Provides" it

      • B — broken: dependencies unresolved, fix required

      • u — unpacked: only files unpacked, not configured

      • C — half-configured: configuration failed, fix required

      • H — half-installed: removal failed, must be reinstalled

      - In some cases, it may automatically know which package you want, such as "sudo aptitude install firefox" Look on the package page of the Ubuntu distribution site.

      - If you are not sure of the name of the program you are trying to install, you can use tab completion to try and find it (most major distributions have it.) Simply type the first few letters of the package you want to install and hit tab once or twice. For example, type fire and then hit tab, it will bring up all packages that begin with fire; firefox will be one of them.

      - Wait for it to prepare to install the software package from the repository.
      If you are prompted whether or not to install, type "y". Next time if you would rather have it do it automatically, type

      sudo aptitude install package -y

      Wait for it to finish installing, and close the terminal.

      - Another small tip is to update your software packages list by using the following command:

      sudo aptitude update

      - It should be in the Main Menu under the appropriate category. If not, restart your computer.

  3. How to Change the Computer Name?

    Open you terminal window and type the following command:

    sudo gedit /etc/hostname

    When prompted, enter the administrator password and click the OK button. The hostname file will open, displaying the current computer name. Replace the current computer name with the desired new name. Save the new file and Close all open windows and restart your system.

Saturday, April 11, 2009

Tips for using

Since this is my First Blog, I did a lot of research vi Internet and try to build a nice, friendly blog. So now I would like to share those nice feature and tips with all of you:

  • Making Read More plus the title of article

  • Adding Digg Button into you post page

  • Creating Categories Gadget (Removing label count)

  • Adding Live Traffic Tracking tool

Are above features interesting? so feel free read this whole post!

  1. Making Read More plus the title of article

    Most peoples had making Read More function under the post on their blog. And here is the tip about making the function of Read More plus the title of the article. Through this modification, the title of the article will be added automatically after Read More.

    To make the function of Read More is not too difficult, you only need to add a few code at read more code that you have ever made before in your template. Here are the steps, and the code like this:

    • In the dashboard page , click Layout.

    • Then click edit HTML tab. Please mark the little box beside Expand Widget Templates. Wait for a moment.

    • Go to your template code, and find the code like this:


    • Delete the above code and change with this code :

      <b:if cond='data:blog.pageType == "item"'>
      <a expr:href='data:post.url'><strong>Read more...</strong></a></p>

    • So above code is only for Read More function. If you would like to have Read More plus the title of article.

      Erase the code above and change with the code below:

      <b:if cond='data:blog.pageType == "item"'>
      <strong><a expr:href='data:post.url'>Continue reading “<data:post.title/>” »»</strong>

    • Don’t forget to click SAVE TEMPLATES.

    Now, see the result! The function of Read More will always have the title of your article.

  2. Adding Digg Button into you post page
    I think most of you know this icon . Yes, it's a digg icon from, is a most popular site in the world. With you can discover and share your blog content. So it's one of the way to increse your blog traffic. With Digg button you can easy to submit your post with your self or with your visitor to Feel interesred to add digg button to your blog? this the steps :

    • After entering the dashboard page, click Layout.

    • Click edit HTML tab.

    • Please mark the little box beside Expand Widget Templates. Wait for a moment.

    • Find the code like this:


    • Delete the code above and alter with following code:

      <!-- DIGG -->
      <div style='float:right; margin-left:10px;'>
      <script type='text/javascript'>
      digg_url = '<data:post.url/>';
      <script src='' type='text/javascript'/>

    • Click Save Template button.Done! Now digg button was added to your post.

  3. How to make Categories Function? (How to remove label count?)

    Most peoples enabled labels feature on their blogs, like following:

    But I would like to remove those number counts and use it as Categories. Please see this:

    Do you wish to eliminate the number at label too? this is the steps :

    • After entering the dashboard page , click Layout.

    • Then click edit HTML tab, mark the little box beside Expand Widget Templates. Wait for a moment.

    • Go to your template code, and find the code like this :


    • If you was found the above code, please delete. Then click Save Template button. Done. Please see the result.

    Now your label will not with number.

  4. Adding Live Traffic Tracking tool

    Want to know where are your visitor come from for live? If yes, you can add blog tool from With web or blog tool from, you can know where your visitor come from. Easy install to blog and without signup before, grab the code and add to your sidebar and you have a live tracking tool for free.

    Below is the example widget from :

    This is the steps to add widget Live Traffic Feed to your blog :

    • At the dashboard, click Layout, then click Page Element tab.

    • Click Add a Page Element. Then click ADD TO BLOG for HTML/Javascript.

    • Copy and then paste the following code:

      <script type="text/javascript" src=""></script><noscript><a href="">Feedjit Live Blog Stats</a></noscript>

      Click SAVE CHANGES button. Done.

    Now you have a tool to track your visitor.

Note: I found most tips from Feel free go and find more!

Friday, April 3, 2009

N96 working as USB Modem on OSx86

My Friend M.C. found the following web blog Using the Nokia E71 as a USB Modem with MacOS Leopard, and he got his N96 working as USB modem for IBM ThinkPad T41. Then I tried my N96 on my Dell Dimension 1100 Desktop. It's working fine. And here is the instruction how to configure.

  1. There is no need to install any additional hardware or software. Simply connect the N96 by select PC suite USB mode to the Mac OSx86. (Also Provided that your SIM card is enabled for GPRS / 3G Internet access with your provider.)

  2. Select System Preferences -> Network

    In the Telephone Number field enter *99#

    In the Username and Password fields enter the appropriate details for your network provider:

    Fido - 'fido' for both (I am using it now.)

    Vodafone - 'web' for both

    Orange - leave blank

    O2 - 'web' for both

    T-Mobile - leave blank

  3. Then click Advance button:

    On the Modem tab, set the Vendor type to Nokia. The Model number will complete automatically.

    In the APN field, enter the appropriate information for your network provider:

    Fido -

    Vodafone - internet

    Orange - orangeinternet

    O2 -

    T-Mobile -

    Click OK and then Apply.

  4. Click the Connect button. after a few moments you will be connected to the Internet:

    You can see the Connect Time & IP address after you successfully connected to Internet Provider.

I think the Most Nokia N-Series will work with Mac OSx86. So give a try and provide your feedback in the following comments.

But most important thing, you should make sure you subscribe to GPRS/3G Data package with your service provider.

[Guide]Howto Install Software RAID 5 on Ubuntu - 1

After search Software RAID5 installation for Ubuntu, I decide to try it on my Ubuntu server. And I couldn't get it boot after I successfully configured RIAD5 during ubuntu server's installation. By the end, after I read the Installation SoftwareRAID, I figured out it's because my RAID 5 configuration for the /boot partition was wrong. Since the /boot filesystem cannot use any softRAID level other than 1 with the stock Ubuntu bootloader.

Ok, here is my version of Software RAID5 installation for Ubuntu Server on IBM ThinkCentre 8189-KJU (Known as M50).

Basically I had 3 PCs 160GB Seagate Barracuda 7200 Hard Disk Drives which connected to 2 IDE Channels on IBM ThinkCentre Desktop PC. The 1st and 2nd Hard Disk connected to the 1st IDE Channel, and the 3rd one and DVD drive connected to the 2nd IDE Channel.

Basically I planned 200MB space on both sda (which is Hard Disk1) and sdb (which is Hard Disk 2) for the /boot partition with RAID1, 2GB space on both sda and sdb for the swap partition with RAID1, and left of space (around 158GB) on sda, sdb and almost everything on sdc for the root partition / with RAID5.

So here is the setup:
  • sda - 200MB sda1 RAID1 /boot
    145GB sda5 RAID5 /
    2GB sda6 RAID1 swap

  • sdb - 200MB sdb1 RAID1 /boot
    145GB sdb5 RAID5 /
    2GB sdb6 RAID1 swap

  • sdc - 200MB sdc1 - No going to use.
    145GB sdc5 RAID5 /
    2GB sdc6 - Not going to use.

As I said before, since the /boot file system cannot be running on RAID5, but only RAID1. Also I left most space to RAID5 for the root / file system which include all my data files as well. For the swap, I think you can configure it either RAID1 or RAID5, it's doesn't matter, but I configured as RAID1 in my setup, since I think RIAD1 should have enough protection and faster than RAID5 system.

Ok, I am not going to go through every steps for setting up the Ubuntu Server, but only the steps for configure RAID system:

  • From the "Partition Disks" dialog box, select "Manually edit the partition table".

  • Select the 1st disk ("sda")

  • Say "Yes" to "Create a new empty partition" select "physical volume for RAID", not the default "Ext3 journaling file system".

  • TO be continue ...

Comments System

Disqus Shortname