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 http://www.cyberciti.biz/faq/linux-unix-set-proxy-environment-variable/ 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 Blogspot.com

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:

      <p><data:post.body/></p>


    • Delete the above code and change with this code :

      <b:if cond='data:blog.pageType == "item"'>
      <style>.fullpost{display:inline;}</style>
      <p><b:else/>
      <style>.fullpost{display:none;}</style>
      <p><data:post.body/>
      <a expr:href='data:post.url'><strong>Read more...</strong></a></p>
      </b:if>



    • 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"'>
      <style>.fullpost{display:inline;}</style>
      <p><data:post.body/></p>
      <b:else/>
      <style>.fullpost{display:none;}</style>
      <p><data:post.body/></p>
      <strong><a expr:href='data:post.url'>Continue reading “<data:post.title/>” »»</strong>
      </b:if>



    • 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 digg.com, digg.com is a most popular site in the world. With digg.com 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 digg.com. 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:

      <p><data:post.body/></p>


    • Delete the code above and alter with following code:

      <p>
      <!-- DIGG -->
      <div style='float:right; margin-left:10px;'>
      <script type='text/javascript'>
      digg_url = '<data:post.url/>';
      </script>
      <script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
      </div>
      <data:post.body/>
      </p>


    • 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 :

      (<data:label.count/>)

    • 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 http://feedjit.com. With web or blog tool from http://feedjit.com, 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 feedjit.com :



    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="http://feedjit.com/serve/?bc=FFFFFF&tc=494949&brd1=336699&lnk=494949&hc=336699&ww=160"></script><noscript><a href="http://feedjit.com/">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 http://www.blogspottutorial.com/. 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 - internet.fido.ca

    Vodafone - internet

    Orange - orangeinternet

    O2 - mobile.o2.co.uk

    T-Mobile - general.t-mobile.uk

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


Monday, March 30, 2009

Spinning Cube On Ubuntu

A few days ago I saw one of my friend show me a spinning cube with classy MacOSX like dock bar and many other effects on his IBM T41 Laptop with Ubuntu Linux installed. Then I went home and loaded latest ubuntu on my IBM ThinkCenter M50 Desktop, and googled the internet. Finally I figured out the solution to enable/install/use the cool spinning cube!!!

You can find the completion Guide from https://help.ubuntu.com/community/CompositeManager/CompizFusion.

And here I just list the simply steps to get Compiz installed and run:


  1. Go to System -> Preferences -> Appearance, and select Visual Effects tab and click on Extra. You may be prompted to install restricted drivers and if so, please click Yes, if not: you will have a few effects enabled by default.

  2. Install CompizConfig Settings Manager. Just open a terminal windows and type the following command:


    sudo apt-get install compiz compizconfig-settings-manager


  3. Then go to System -> Preferences -> CompizConfig Settings Manager and enable Desktop Cube, Rotate Cube and Cube Reflection and Deformation. You can also select other settings as you wish.

  4. Go to General Options, on the last tab Desktop Size, set the Horizontal Virtual Size to 4. And now you will have a spinning cube. See this:

    To trigger it, press Ctrl + Alt + LeftClick or Ctrl + Alt + LeftButton on the mouse and drag to spin it.

    You may also use Ctrl + Alt + DownArrow to unfold it and then LeftArrow/RightArrow to move around the unfolded cube.


  5. Now you can go back to CompizConfig Settings Manager to try some other cool effects.


Although the spinning cube is cool, but Compare iPC OSx86 which running on my Dell Desktop, I will still prefer OSx86, because it's real of Mac OS.

Tuesday, March 24, 2009

iPC OSx86 running on IBM NetVista 8307

Update on 20-May-2009:

Donot upgrade Mac OSx86 10.5.6 to version 10.5.7 on your IBM Netvista 8307, it will kill your Mac.

You can try it but you should make sure you had image backup for your original system 10.5.6.

=====================

Since I am running iPC OSx86 on my Dell Dimension 1100 machine. And my friend also likes it and want to install it on his IBM NetVista 8307. Because I gained lots of experiences for the installation on my Dell, so today I managed to install iPC Mac OSx86 (Leopard) on IBM NetVista 8307 successfully with one try only:

  • Intel® Celeron P4 2.8GHz

  • 1 GB SDRAM (Suggest to have at least 512MB)

  • 40GB IDE Hard Disk Drive

  • IDE DVD-ROM Drive

  • Video: Integrated Intel® Extreme Graphics

  • Audio: Integrated SoundMax Audio (AC97 Compliant)

  • Network: Integrated Intel Pro/1000MT Ethernet



Almost same options should be selected as Dell Demension 1100, but some are different, please refer to the following list:

  1. iPC OSx86 10.5.6 Base System

  2. Kernels: 9.5.0 Voodoo Kernel

  3. Video Drivers -> AGPGart 2.7.1

  4. Audio Drivers -> AC97 Audio

  5. Chipset Drivers -> LegacyAppleIntelPIIXATA drivers

  6. USB Drivers -> PCGenUSBEHCL Drivers

  7. Fixes and patched:


    Seatbelt.kext 10.5.5

    PS/2 Keyboard fix

    ApleSMBIOS ToH

    IOUSBMassStorage Fix

    Finder 10.5.5 + Keyboard.prefPane

    USB Mount Fix


And that's it! Enjoy and have Fun!

Saturday, February 28, 2009

Installed iPC OSx86 10.5.6 on Dell Dimension 1100

Updated on 8-May-09:
After a few re-try, I finally figure out a few things which is not done correctly in my previous post. Please refer to the end of this post.


After a few hours trying and searching on the Internet (Most information are came from http://www.osx86project.org/), although my Dell Dimension 1100 is not listed in the HCL of any version of iPC OSx86 which included v10.5.6, but I still managed to install iPC OSx86 v10.5.6 (Leopard) on my Dell Dimension 1100 Desktop PC which with the following configuration:

  • Intel® Celeron P4 2.6GHz

  • 1 GB SDRAM (At least 512MB)

  • 80GB IDE Hard Disk Drive

  • EMPREX DVD Writer (IDE)

  • Video: Integrated Intel® Extreme Graphics 2

  • Audio: Integrated 2.1 Channel Audio

  • Network Interface Card: Integrated Broadcom440x 10/100 Ethernet



Here are the steps to install from DVD:


  1. Boot from DVD, Select English as Default Language.

  2. Use Disk Utility to configure the partition,


    • Select the hard drive on the left sidebar

    • Click on partition

    • Select a "1 partition volume scheme" and choose Mac OS Extended (journaled) as format.

    • Finally click the option button and choose GUID as the partition scheme.

  3. Now you are in the home stretch, and at the easiest part. It's all downhill from here. Install Leopard following the on screen instructions, the only thing to remember before clicking the Installation button, is to click Customize and un-select "Additional Fonts".

  4. And also in order to make iPC work on your Dimension 1100, you need to manual select the following package:
    (Note: The red ones are removed, and the blue ones are newly added.)


    • iPC OSx86 10.5.6 Base System

    • Kernels: 9.5.0 Voodoo Kernel

    • Video Drivers -> AGPGart 2.7.1 Intel GMA950 (No QE/CI) (Will figure it out later)

    • Audio Drivers -> AC97 Audio AD1980

    • Ethernet Drivers -> AppleBCM440XEthernet Drivers Intel 82566MM/DC

    • Chipset Drivers -> LegacyAppleIntelPIIXATA drivers

    • USB Drivers -> PCGenUSBEHCL Drivers Patched USB Drivers

    • Power Management

    • Fixes and patched:
      Seatbelt.kext 10.5.5

      PS/2 Keyboard fix

      ApleSMBIOS ToH

      ACPI Fix

      CPUS=1 One Core Fix

      IOUSBMassStorage Fix

      Finder 10.5.5 + Keyboard.prefPane

      USB Mount Fix

      IntelCPUPMDisabler

      Patch DSDT


    That's the bare minimum for system so that it boots up fine and all devices have drivers.

  5. Just wait around 20 minutes, the system will prompt restart or says will restart after 30 seconds.

  6. The most important thing here, you should "On the first boot make sure to boot with the -f boot flag! Do this to make sure that all installed kexts are loaded properly." And it's only required once. You can find the same note on the license agreement page before you install iPC OSx86 Software.

  7. Ok! After reboot, you should go into the welcome screen and continue your 1st time configuration for Your MAC!!!



























Tips:

  1. Here is work around for Audio:

    First make sure by the clock you have the sound icon and you can move the slider. If you can do both please follow these steps to enable audio.

    Goto Applications...Utilities and select Audio Midi Setup. Now in the Audio Devices section you should see a checkbox with Properties For to the left. Select that dropdown list and select the second option which will have the same name. Once you do this the left side input will be removed and the right side output will now have options.

    Under the Audio output section look for the drop down box with 2CH-16bit. Select the drop down and change it to 6CH-16bit. Now click on configure speakers button. Now change the left front drop down to "3" and click on the button right above that has the text Left Front and if you hear sound your set. Also make sure to change right front to "6" and click on the botton to make sure sound is heard. Once sound is heard from both speakers your sound is now working and itunes and anything else can have stereo playback from the onboard audio of the Dell Dimension 1100.




  2. Manually Change the Screen Resolutions:

    Edit the following file by using VI tool or other editor in Application Terminal.


    # sudo -s
    password: xxxxxxxx

    # vi /Library/Preferences/SystemConfiguration/com.apple.Boot.plist


    To automatically use a certain graphics mode


    For VESA 2, Add:


    <key>Graphics Mode</key>

    <string>1280x1024x32</string>


    For VESA 3 (Dell Dimension 1100 & IBM NetVista 8307), Add:


    <key>Graphics Mode</key>

    <string>1280x1024x32@85</string>


    Then save the file and reboot the PC, Enjoy!


  3. Don't give up! Even your PC is not listed in the HCL (http://wiki.osx86project.org/wiki/index.php/Main_Page) of iPC OSx86, but you always can find the similar configurations for your PC. And if you have questions, I am willing to answer any question that I know, please leave your comments.



Added on 3-Apr-09:

  1. The USB mouse which connected to KVM via PS2 adapter is not working on OSx86. And after I switched to PS2 Mouse, it's working fine with KVM.


  2. Some of my Friend tried on IBm ThinkPad T41, it's working fine but except Wireless LAN and Network Interface Card. My next step, I will try to buy a second hand T41 and give a try.


Added on 6-Apr-09

  1. The package selection of customize installation was not quite fit the original drivers on Dell Dimension 1100 Desktop, so I made a few changes, please refer to the red and blue changes in the above section.

  2. On the 1st reboot, you should do it with the -f options, this is in order to load installed kexts correctly. I didn't notice this at all, since I didn't really go through whole license agreement page. I suggest everyone who would like to install OSx86 should go through it.

  3. The QE(Quartz Extreme)/CI(Core Image) is not working for my video correctly. I will try to figure out this part.

  4. And I pretty happy with my current setup, and it's working more smoothly than before. Specially when it's booting up.


Added on 8-May-09

I found some problem with my Network Card, sometimes it couldn't get the IP address from DHCP server, since the network card driver is not load properly. So I just add the following boot flags into com.apple.Boot.plist:

# vi /Library/Preferences/SystemConfiguration/com.apple.Boot.plist


And add:

<key>Kernel Flags</key>
<string>-f -v</string>


And reboot your PC, then the problem is gone.

Comments System

Disqus Shortname