I've uploaded a PKGBUILD for ibus-unikey to the ArchLinux AUR. You can install it with yaourt like this:
yaourt -S ibus-unikey
If you don't want to build from the source, you have to install all the dependencies first:
pacman -Sy gcc gconf gtk2
And then download and install the binary package
Then add the following to your .bash_profile

export XMODIFIERS=@im=ibus
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus

PS: Ok, there is no spyware/malware/rootkit in this binary package! If you don't trust me, don't use this method and build the package yourself (this is the way I recommend)
I always use PostgreSQL for every project in my company, both in development and production. Recently, I have to use MySQL (version 5.1.36) in my new project because the client uses MySQL for deployment. The first step I have to do is to setup MySQL on my laptop for the project development, I'm using ArchLinux so the steps are straight-forward:
  • Install MySQL with the pacman: pacman -S mysql
  • Start it up: /etc/rc.d/mysqld start
  • Set the root password: /usr/bin/mysqladmin -u root password 's3cr3t'
  • Execute the recommended script to secure the new MySQL installation. Basically, the script will remove the test database, the anonymous users and only allow connection from localhost: /usr/bin/mysql_secure_installation
Here come the gotchas!
I open up MySQL Administrator and connect to the new 'shiny' server with the user 'root', everything is fine. I create a new user, then a new catalog and grant all the neccessary permissions for the new user to use the new catalog. I fire up Tomcat which contains my web application (Spring + Hibernate), the application creates a connection pool (c3p0) at startup to improve performance, but it failed with the error message Connection refused". Hmm...strange! Googling for a while, I was suggested to put this into my /etc/hosts.allow the following line:
mysqld: 127.0.0.1:ALLOW
Restart my web application, now the error message is different Communications link failure .... Open up the configuration of MySQL (/etc/my.cnf), I found out that the skip-networking is on! Here is the documentation about this entry:
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
Comment that entry (by adding the # before it) and restart the mysql server. My web application now can startup properly!
Gotchas solved.
PS: I'm totally new to MySQL, this is my way I made my application work with MySQL, if you have a better setup, I'm glad to know :)
Sound system on Linux is confusing, both for end users and developers. When I was using Fedora, I used Alsa for all of my sound needs, from listening to music, filming and gaming. Recently, I've switched to Arch Linux and installed OSS4 for my sound. The sound quanlity is quite better than Alsa but I've got an annoying problem: all the gstreamer-based music player uses CPU too much, about 40%-60% (rhythmbox, totem, exaile) when playing mp3 files. After googling, I found this, try this on my system:
/usr/sbin/vmixctl detach /dev/dsp
/usr/sbin/vmixctl attach -r /dev/dsp
What it does is to detach the virtual mixer and reattach without recording setting. The CPU usage down to 6-10%, cool!
But after reboot, the CPU usage of gstreamer-based music player still high. It seems that our hack is not persisted. So I have to edit the /etc/rc.d/oss to detach and reattach without recording ability, here is my /etc/rc.d/oss:
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
start)
     stat_busy 'Starting Open Sound System'
     if /usr/sbin/soundon
     then
             add_daemon oss
             /usr/sbin/vmixctl detach /dev/dsp
             /usr/sbin/vmixctl attach -r /dev/dsp
             stat_done
     else
             stat_fail
     fi
     ;;
stop)
     stat_busy 'Stopping Open Sound System'
     if /usr/sbin/soundoff
     then
             rm_daemon oss
             stat_done
     else
             stat_fail
     fi
     ;;
restart)
     $0 stop
     $0 start
     ;;
*)
     echo "Usage: $0 {start|stop|restart}"
esac
Now, all the gstreamer-based applications are now playing nice with my CPU, but my box lost the ability to record sound :(. If you have a better solution, please share with me.