As starting with version 4.4, the size of Qt source grows extremely fast. It take hours or even a entire afternoon to build it with full feature enabled. Since I do not use advanced features like Webkit or Phonon, I always build Qt with them disabled. I will show and explain my configure parameters in 4.3 and 4.6 in both windows and linux build in this article.

Windows Build

v4.3, just disable the qt3support module:

v4.6, more modules are disabled:

Qt4.4 added concurrent, webkit, phonon and xmlpattern code, and the format of help files was changed.

Qt4.5 added the gtkstyle. In configure script, -make and -nomake switch are added. But official support for VC6 and VS2002 were dropped. Actually, VC6 generates incorrect code.

Qt4.6 added javascriptcore backend for QtScript module. So I added the “-no-script” switch.

Maybe you have noted, there’s no “-no-make” switch exists before Qt4.5. So, how to exclude building of demos and examples? I looked into the v4.5 source code of configure.exe(located in $QTSRC/tools/configure), and found all “no-make” parts are just excluded by writing to a .qmake.cache file. After running configure, the .qmake.cache file may have a line like:

Now just keep the first 2 entries.

Linux Build

From v4.6, there’s only one all-in-one source package, no separate platform-specific source packages are provided. I firstly chose the qt-everywhere-opensource-src-4.6.3.zip. But even its configure script did not run. Finally, I found it’s a line ending issue, and we need to convert it first using dos2unix utility.

Now convert line endings:

The first 3 lines ensure running of configure script. The last line ensures correct generation of makefiles. Without it, no separated debug info are generated and you may also encounter errors when linking the assistant application as described in QTBUG-5471. The qt-everywhere-opensource-src-4.6.3.tar.gz with *nix line endings does not need above steps and may have less undiscovered build issues.

I’ve tested this approach under Hardy(Ubuntu8.04) and Lucid(Ubuntu10.04). Under Lucid, the dos2unix/unix2dos utility seems to be renamed to fromdos/todos. Just replace the command name.

We can configure it now:

v4.3, as easy as windows:

v4.6, we do not have s60 and gesture switches:

After running configure, modify the .qmake.cache file to remove unnecessary entries.

I read this article when Lucid was just released. It works good, but there’s no window icon in the title bar(See my previous screen-shots).

Then I tried to modify the theme files. Take “Radiance” theme as example:

Change the last line into:

This will set your window button order. And every time you switch to “Radiance” theme, no confirm dialog will prompt to tell that the button order will be changed. Then:

Search “menu_focused_normal”, there are four lines regarding graphics drawing of menu: “menu_focused_normal”, “menu_focused_prelight”, “menu_unfocused_prelight”, “menu_unfocused_prelight”. Add first line into “menu_focused_*” and remove the image tag, and use second line to replace the image tag in “menu_unfocused_*” too.

OK, you’re done.

lucid_menu_icon

Update Feb 17, 2012: You can simply run:

In company, I use VNC to control remote machines. But in GDM stage, this does not work. Maybe VNC server in Ubuntu is a service in Gnome session. The solution is to use XDMCP(X Display Manager Control Protocol). Using Ubuntu, “xnest” package should be installed on both server and client side. It’s a nested X server that simply relays all its requests to another X server, where it runs as a client:

In server side,  go to System –> Administration –> Login Window, or simply run “gdmsetup”. Go to “Remote” tab, set value to “Same as Local”.

In client side, go to Applications –> Internet –> Terminal Server Client, or simply run “tsclient”. You’ll find the XDMCP protocol type can be selected now. Enter your server address to connect.

Here’s my screenshot. The output of command “who” and “ifconfig” had different IP addresses:

ubuntu_xdmcp

Since xnest sends and receive all X Server data, it consumes a lot of bandwith. On my laptop using wireless networking, it’s somewhat slow.

I installed Cairo-Dock when installing Lucid. And it automatically enabled some desktop effects. Nowadays, I found these effects make my desktop less responsive. So, I decided to turn off them. First, I thought they were compiz effects. I was wrong. Actually, they are metacity compositing effects and come with gnome 2.22 and later versions.

To disable them, run:

And this command to enable them:

Additional info:
http://blogs.gnome.org/metacity/category/compositing/

Since I chose SVN as my VCS in google code, a SVN GUI client may be helpful. I found kdesvn. It’s free, powerful, and just there in the Ubuntu repository:

The 2nd line is used to fix the bookmark issue in kdesvn :).

Then invoke the line below first:

This will create a default configuration directory for SVN in ~/.subversion/. In fact, any SVN command will do. There are configuration files located in /etc/subversion/. But they seems to be of no use.

Note, kdesvn will use SVN configuration files when perform operations. Now, we need to edit them.

1. Proxy

Uncomment and modify the following lines in [global] section:

It seems that we can use separate settings for different host groups. This is not verified, leaves to you.

2. Password

SVN 1.6 added gnome/gnome-keyring and kde/kwallet credentials management support. Some additional options were introduced.

2.1 SVN 1.4.6 (Ubuntu 8.04, Hardy)

Uncomment and modify the following lines in [auth] section:

You’re done. The 1st option prevents SVN from saving plain-text password locally. The 2nd even stops caching the credentials. Then every time you need an SVN authentication, a prompt appears.

Note: you cannot find an option in kdesvn’s configuration to set a user/password values. The application just use cached key values in ~/.subversion/auth/ directory.

2.2 SVN 1.6.6 (Ubuntu 10.04, Lucid)

If you do not want to save password, set the 2 values as that in Hardy. But they are deprecated and moved to ~/.subversion/servers.

Uncomment and modify the following lines in [global] section:

Then the ~/.subversion/config file:

Uncomment and modify the following lines in [auth] section. Set to empty:

You’re done! All SVN behaviors are consistent with that in Hardy.

If you want to integrate with gnome-keyring or kwallet, modify the line to contain “gnome-keyring”, “kwallet” or both. Gnome-keyring does not integrate well with SVN, so I chose kwallet and have a test.

In kdesvn, go to Settings –> Configure Kdesvn –> Subversion, check the “Store passwords into KDE Kwallet” option. It’s the default configuration. Make sure that the option and the “password-stores” value are consistent. Otherwise, our kdesvn fail to commit code. When a kdesvn prompts to ask for username/password, check “Store password (into KDE Wallet)” option. Then you can view your saved login information in KWallet Manager application:

Some other screenshot of kdesvn in Lucid:

Main Window:

lucid_kdesvn

Revision Tree:

lucid_kdesvn_2