Making Compiz on Ubuntu 9.04 Work in X3100 Display Chips
April 28th, 2009Finally 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:
- Edit /usr/bin/compiz file
$ sudo vi /usr/bin/compiz - Go to line 69 (in vi, just do “
:69” and press enter) - 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, 2009VMWare Kep Map for HP 8501p Laptop Ubuntu 8.10
March 27th, 2009Problem: 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, 2009Problem: 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:
- Is easier to do everything as root
$ sudo -i - Get the driver from Canon
# wget http://software.canon-europe.com/files/soft31118/software/CAPTDRV180.tar.gz - 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 - 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 ----- - Start the services which we stopped before
# /etc/init.d/cups start
# /etc/init.d/ccpd start
# /etc/init.d/apparmor restart - You should be fine from here.
Apple Website is Having a Problem??
March 3rd, 2009Install Oracle 9i (9.2.0.4) on CentOS 4.7
February 5th, 2009Problem: 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:
- Install CentOS
- Install the the compat packages (with dependencies):
yum install compat-gcc-32 compat-gcc-32-c++ compat-libstdc++-296 compat-l
ibstdc++-33 - 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.sointo/etc/ld.so.preload
- Replace gcc with the older gcc (version 3.2):
cd /usr/bin/
mv gcc gcc34
mv gcc32 gcc - 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 - Issue the command
/sbin/sysctl -p - Add oracle user:
groupadd dba
groupadd oinstall
useradd -c "Oracle software owner" -g oinstall -G dba oracle - 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 - Now, login as oracle user and run the
runInstall - You should be able to install Oralce 9i without any problem.
Kill All Processes of A Particular User
January 30th, 2009Problem: 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, 2008Problem: 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
Running VMware Console 1.0.7 on Ubuntu 8.10 Interpid
November 5th, 2008In case you have noticed that you keyboard does not work properly in VMware Console, try:
$ echo ~/.vmware/config <<EOF xkeymap.keycode.108 = 0x138 # Alt_R xkeymap.keycode.106 = 0x135 # KP_Divide xkeymap.keycode.104 = 0x11c # KP_Enter xkeymap.keycode.111 = 0x148 # Up xkeymap.keycode.116 = 0x150 # Down xkeymap.keycode.113 = 0x14b # Left xkeymap.keycode.114 = 0x14d # Right xkeymap.keycode.105 = 0x11d # Control_R xkeymap.keycode.118 = 0x152 # Insert xkeymap.keycode.119 = 0x153 # Delete xkeymap.keycode.110 = 0x147 # Home xkeymap.keycode.115 = 0x14f # End xkeymap.keycode.112 = 0x149 # Prior xkeymap.keycode.117 = 0x151 # Next xkeymap.keycode.78 = 0x46 # Scroll_Lock xkeymap.keycode.127 = 0x100 # Pause xkeymap.keycode.133 = 0x15b # Meta_L xkeymap.keycode.134 = 0x15c # Meta_R xkeymap.keycode.135 = 0x15d # Menu EOF

