Princess Charmaine’s Honey Store

August 2nd, 2009

Hey all, princess Charmaine now has a small honey store (http://store.ourfeistyprincess.com/).  As we are all new in running a online store, please bare with us if we made any mistake.

Feisty Char Needs Bullets to Fight!

April 29th, 2009

I seldom do this.  In fact, I never did it before.

Feisty Char needs bullets to fight!

Please have a look at her blog and help if you can.

Making Compiz on Ubuntu 9.04 Work in X3100 Display Chips

April 28th, 2009

Finally I backed up all my files and installed Ubuntu 9.04 (Jaunty Jackalope).  When my flashy new
system boot up, I tried to set my “Visual Effect” to “Extra” but it keeps failing.

After a little bit of googling, I found a solution on Ubuntu Forum which resolve the problem by:

  1.  Edit /usr/bin/compiz file
    $ sudo vi /usr/bin/compiz
  2. Go to line 69 (in vi, just do “:69” and press enter)
  3. Comment out line 69, by putting a “#” sign in front of the line.

Then you can logout the current user and login.  You should now be able to set your “Visual Effect”!!

Ubuntu 9.04… Almost

April 6th, 2009

VMWare Kep Map for HP 8501p Laptop Ubuntu 8.10

March 27th, 2009

Problem: On my HP 8510p Laptop running Ubuntu 8.10, the key mapping for VMWare is screwed up.

Solution: Simple solution is to do

$ echo 'xkeymap.nokeycodeMap = true’ > ~/.vmware/config

Making Canon LBP3300 Work with Ubuntu

March 17th, 2009

Problem: In my office I have a Canon LBP3300 with a network card configured.  It used to run with a Windows machine as a print server and now that it has a network card, I would like to print to it.  Apparently. it is not as simple as I think it would be on Ubuntu.

Solution: The installation steps for those who are interested:

  1. Is easier to do everything as root
    $ sudo -i
  2. Get the driver from Canon

    # wget http://software.canon-europe.com/files/soft31118/software/CAPTDRV180.tar.gz

  3. Untar and install the driver

    # tar xf CAPTDRV180.tar.gz
    # cd CANON_UK/Driver/Debian
    # dpkg -i cndrvcups-capt_1.80-1_i386.deb cndrvcups-common_1.80-1_i386.deb
    # /etc/init.d/cups stop
    # mkdir /var/ccpd
    # mkdir /var/captmon
    # mkfifo /var/ccpd/fifo0
    # chmod 777 /var/ccpd/fifo0
    # chown root /var/ccpd/fifo0
    # chmod -R a+rX /usr/share/cups/model
    # /usr/sbin/lpadmin -p LBP3300 -m CNCUPSLBP3300CAPTK.ppd -v ccp:/var/ccpd/fifo0 -E
    # /usr/sbin/ccpdadmin -p LBP3300 -o net:192.168.1.200

  4. Now apparmour in Ubuntu create a bit of problem for the driver and need to be addressed:

    # vi /etc/apparmor.d/usr.sbin.cupsd----- /etc/apparmor.d/usr.sbin.cupsd -----
    /var/run/cups/ rw,
    /var/run/cups/** rw,
    /var/spool/cups/ rw,
    /var/spool/cups/** rw,
    # needed for Canon CAPT driver ### <-----insert
    /var/ccpd/** rw, ### <-----insert
    # third-party printer drivers; no known structure here
    /opt/** rix,
    ----- /etc/apparmor.d/usr.sbin.cupsd -----

  5. Start the services which we stopped before

    # /etc/init.d/cups start
    # /etc/init.d/ccpd start
    # /etc/init.d/apparmor restart

  6. You should be fine from here.

Apple Website is Having a Problem??

March 3rd, 2009

Apple.com Error

Install Oracle 9i (9.2.0.4) on CentOS 4.7

February 5th, 2009

Problem: Oracle 9i is old but still there are people who is using it.  There is quite a bit of steps that need to be taken to install Oracle 9i on CentOS 4.7 (I am not sure if Oracle 9i will ever work on CentOS 5).  There are information (bits and pieces) on the Web, I want to record down step by step instruction of installation of Oracle 9i on CentOS 4.7

Solution: The installation is not very hard:

  1. Install CentOS
  2. Install the the compat packages (with dependencies):
    yum install compat-gcc-32 compat-gcc-32-c++ compat-libstdc++-296 compat-l
    ibstdc++-33
  3. Get the Oracle patch p3006854_9204_LINUX.zip, unzip and run it
    unzip p3006854_9204_LINUX.zip
    cd 3006854
    sh rhel3_pre_install.sh

    • Basically patch 3006854 is to create libwait.so
    • The source code of libwait is:
      #include <errno.h>
      #include <sys/syscall.h>
      #include <sys/types.h>
      #include <sys/wait.h>
      pid_t
      __libc_wait (int *status)
      {
      int res;
      asm volatile ("pushl %%ebx\n\t"
      "movl %2, %%ebx\n\t"
      "movl %1, %%eax\n\t"
      "int \$0x80\n\t"
      "popl %%ebx"                : "=a" (res)
      : "i" (__NR_wait4), "0" (WAIT_ANY), "c" (status), "d" (0), "S" (
      0));
      return res;
      }
    • To compile a .so, use gcc -O2 -shared -fpic -xc libwait.c -o libcwait.so
    • You need to add the libwait.so into /etc/ld.so.preload
  4. Replace gcc with the older gcc (version 3.2):
    cd /usr/bin/
    mv gcc gcc34
    mv gcc32 gcc
  5. Add the following parameters to /etc/sysctl.conf:
    # Oracle parameters
    kernel.shmall = 2097152
    kernel.shmmax = 2147783648
    kernel.shmmni = 4096
    # semaphores: semmsl, semmns, semopm, semmni
    kernel.sim = 256 3200 100 142
    fs.file-max = 65536
    net.ipv4.ip_local_port_range = 1024 65000
    kernel.msgmni = 2878
    kernel.msgmax = 8192
    kernel.msgmnb = 65535
  6. Issue the command /sbin/sysctl -p
  7. Add oracle user:
    groupadd dba
    groupadd oinstall
    useradd -c "Oracle software owner" -g oinstall -G dba oracle
  8. Add the followings to oracle’s ~/.bash_profile:
    # Oracle setting
    export LD_ASSUME_KERNEL=2.4.19
    export ORACLE_BASE=/opt/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
    export ORACLE_SID=p9test
    export ORACLE_TERM=xtermexport NLS_LANG=AMERICAN
    export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
    export PATH=$PATH:$ORACLE_HOME/bin
  9. Now, login as oracle user and run the runInstall
  10. You should be able to install Oralce 9i without any problem.

Kill All Processes of A Particular User

January 30th, 2009

Problem: I was having this problem that need to kill all processes of a user in a cron job and start the processes again using a in a particular user space.

Solution: Might not be the most elegant solution.  However, I chose to go with pkill and su.  So, a sample bash file:

#/bin/bash
/usr/bin/pkill -u userid
su - userid -c /path/to/startup

Then, just run the bash in a cron job.

Totem Player Can’t Leave Full Screen Mode

November 16th, 2008

Problem: All of a sudden, my totem player in Ubuntu 8.10 start up in full screen mode and can’t leave full screen mode.

Solution: There is a simple solution for this:
rm ~/.config/totem/state.ini