Virtualbox 4 on Ubuntu 11.04 w/ kernel version 2.6.38

After I upgrade my office box for testing Ubuntu 11.04 (natty), my virtual box is broken w/ no error messages. After I try to start it as root, the message shown. The major problem is there no suitable kernel module for virtualbox.

After surveying this document: I am failing to build VirtualBox driver for Linux 2.6.38, I clean up my system and finally found the bug.

First it’s recommended for you to purge the whole system’s old packages to make it clean by using:

# aptitude purge virtualbox-ose virtualbox-ose-dkms
# dpkg --list |grep "^rc" | awk '{print $2}' | xargs sudo dpkg --purge
# locate -e virtualbox | xargs -n 1 rm -rf

Second, after I reinstall virtualbox, the problem exists. In that time I check my kernel version by uname -a and found the strange thing. My box is just install the generic version kernel, but boot w/ the -pae version. Tragedy, my box did not install the corresponding header version which is the major reason.

So I use the commend to install it by apt-get install linux-headers-....-pae and then the dkms module built and ran correctly.

Third, the default instillation of virtualbox-ose is no with the guest-additional package. The package is useful for sharing, mounting, seamless mode and etc features between host and guest OSes. That, I recommend you to install it.

GCIN overspot problem on skype with qt-static

As the same time I upgrade my system, I also encounter that my GCIN IME cannot be used the overspot feature on skype (it will disappear). And some strange problem like I cannot use ctrl+space to switch IMEs.

The solution is also simple, that is, to modify the gtk-immodules settings of the global system. Because in the newer Gtk version, the configure file changed that my poor system cannot find it.

The detail step is listing as:

 $ sudo gtk-query-immodules-2.0 > /etc/gtk-2.0/i686-pc-linux-gnu/gtk.immodules

And modify gcin’s setting from “zh:jp” to “*”. Then, the step is to setup the modules to make QT/XIM based program works.

$ vim ~/.xprofile
And add the following settings:

export QT_IM_MODULE=gcin

Then the overspot feature works (although in skype, it just stick at the left-top corner of program).

xorg-server 1.9.4 with Gallium and xf86-video-ati-6.14

About a month ago, I’ve upgrade my Gentoo box to xorg-server 1.9.4, which is a long time since last upgrade. Despite much more conflict packages with uninteresting solution steps, there are some note can be shared.

The Gallium, a new 3D environment proposed by free-desktop, is a new feature for some graphic chip user. My ATI Radeon chip is luckily to have it.

With enable it, my gentoo box will hang on X started at first. After surveying some resources such as radeonBuildHowTo, the solution is easy and I’ve post my solution to gentoo’s bugzilla(#350280).

The crux is due to some kernel options I didn’t enable it, such as:

# CONFIG_FB_RADEON is not set

where is referenced from the radeonBuildHowTo above (detail).

Finally, my gentoo box is worked w/ Gallium, and the detail system info is listing:


OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on softpipe
OpenGL version string: 2.1 Mesa 7.9.1
OpenGL shading language version string: 1.20

If you have the same problem, try it and I hope it is useful.

gitweb + smart http

As the requirements for http-type push and pull, we must set up much more things. This post is a short report for how to set it up but discard the detail of how to install the packages.

1. git-http-backend:

As the resources from manual git-http-backend, we need to generate a configuration and its corresponding settings.

# vim /{the apache configs directory}/git-more.conf

And filled out settings like:

SetEnv GIT_PROJECT_ROOT {git repository root}

ScriptAliasMatch \
"(?x)^/git/(.*/(HEAD | \
info/refs | \
objects/(info/[^/]+ | \
[0-9a-f]{2}/[0-9a-f]{38} | \
pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
/{path to git-http-backend}/$1

ScriptAlias /git/ /{path to gitweb.cgi}/

And Don’t forget to enable the WebDav for the repositories directory, like:

<Directory "{repositories root}">
Options Indexes FollowSymlinks ExecCGI
Allow From All
Dav On

On the other hand, also the ExecCGI permission for the cgis. But there also problems when we use git push

Continue reading “gitweb + smart http”

mysql’s “SET NAMES”

One of my friend encounter a prblem after reconstruction of mysql server. The process is too detail and complex to write down that I only point out the result.

After surveying some resources of the “SET NAMES XXX” command for mysql connection, I realize that the charset settings of client, connection, server, and result are important for an old website. For eample, webpages use big5 but databases use big5 or other more strange settings.

From the resources: [轉載]MySQL 的 “SET NAMES xxx” 字元編碼問題分析, we can use the separate commands for more detail settings:

SET character_set_client = big5;
SET character_set_results = big5;
SET character_set_connection = utf8;

when the tables use utf8 but pages uses big5 and the server default settings are utf8.

Anyway, trying this solution if there is no other choices. 😀

bash_complete in gentoo

To enable this feature, gentoo will have come auto completion/notify for command. But in gentoo, there are some tricky should be note.

1. install gentoo-bashcomp, it will also imstall bash_completion and mush more syntax file

# emerge gentoo-bashcomp

2. enable the syntax of gentoo

# eselect bashcomp enable --global gentoo

3. for other syntax, IMPORTANT: the base must be enable by default

# eselect bashcomp enable --global base ssh info man

After enabling base and ssh, you can use ssh<TAB><TAB> to get the listing you have connected. And the man and info are also useful when we want to search for partial command. Enjoy it 😀

Switch the tomcat listings options

This post is about how to override default tomcat options for each apps. For the default settings we used for tomcat will listings the directories when there is no feasible welcome pages. But we want to do separate settings for each apps.

After some search, according to this page: EnablingOrDisablingDirectoryListingsUsingWeb.xml, the answer is clear. That is, opening the configure file (web.xml) in what we want set up, and add the corresponding  <servlet> and <servlet-mapping> section as the example below.


<!– Add a mapping for our new default servlet –>

Then finished.