Long time no post here. Recently, I reported 3 bugs to QTerm project and patches were provided. This is my first time to contribute an open-source project.

Then I was able to build my private patched debian package of QTerm with the guide here. I just use the official debian package meta info found in this mirror site. Some notes to take:
1. The path should be like: /home/<your_name>/packages/<your_project>/
2. Before running “dpkg-buildpackage -rfakeroot”, check the debian/control file to see what packages is required to build.
3. The revision of package seems to be controlled by debian/changelog.

My private build file can be found in my skydrive:
– For Hardy(8.04): QTerm 0.5.7
– For Lucid(10.04): QTerm 0.5.11

The article is originally inspired by this one: http://www.openrce.org/articles/full_view/23. The undocumented parameters in MSVC++ compiler are: /d1reportSingleClassLayout<classname> and /d1reportAllClassLayout.

A simple example:

The dumped layout:

You see: When using virtual inheritance, an additional vbptr is added into class layout. There is also a separated section containing the virtual base class, with vbptr pointing to it. So, the object size of virtual inheritance is bigger than non-virtual inheritance.

Now, here is a complex example:

The dumped layout:

The layout of CDerive class is so complicated. First, it has 3 base classes, 1 field and 1 virtual base section. The the first 2 base classes(CBase2, CBase3) have their vbptr pointed to the address of the virtual base section.

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/