Fix Window Button Order in Lucid

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:

Remote Control in GDM Stage

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.

Metacity Compositing

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/

Using SVN in Ubuntu

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

2 Projects on Google Code

1. QSkin: http://code.google.com/p/qskin/
QSkin is a framework for easier skinning Windows GUI applications. It uses hook technologies, so applications can apply a skin with almost no changes.
The initial ‘Q’ comes from my last name. 🙂

2. QAnsiEditor: http://code.google.com/p/qansieditor/
QAnsiEditor is a program to edit Ansi graphics. It aims to run on multiple platforms base on Qt library.

I will start to code the 2nd project first. Hope I can update it daily.
Release early, release often. =.=

Compact Gnome Theme in Hardy

Refer to: http://martin.ankerl.com/2008/10/10/how-to-make-a-compact-gnome-theme/

I chosen the Glossy theme and made a compact one. I tried to make smallest changes and it was enough.

Modify the name and comments, save.

Add the following line:

Ok, now let’s compare the result:

theme_glossy

theme_glossy_compact

某list 备份

gcc-3.4
g++-3.4
build-essential
wxwidgets-dev
glib-dev
libgtk2-dev
qt-dev
cairo-dev
patch
cvs
automake
autoconf
doxygen
cmake
bison
flex
xulrunner-dev
libxml2-dev
tcl
tk
vim
java
language-support-fonts-zh
language-support-input-zh
scim-bridge
flash
apache
libapr
libaprutil
ruby
php5
python

Dynamic Volumns

In early days of August, I finished reading the book <<windows internals 4e>>: http://www.amazon.com/Microsoft-Windows-Internals-4th-Server/dp/0735619174

There’s a concept called dynamic volume. The volume type we commonly used are called basic volume. Basic volumes and dynamic volumes differ in ability to extend storage beyond one physical disk. The basic partitions are confined to one disk and their size is fixed. Dynamic volumes allow to adjust size and to add more free space either from the same disk or another physical disk.

I have done some experiment using dynamic volumes. I used VirtualBox for my virtual machine environment, since it can mount multiple disks.

dynamic_disks_1

By default, Windows choose basic volume types for installation. You can convert it manually in “Disk Management” component of MMC.

dynamic_disks_2

Then, you can create dynamic volumes of spanned, striped(RAID-0), mirror(RAID-1) and RAID-5 types. For Windows XP, only spanned and striped types are supported.

dynamic_disks_3

Here’s a screen-shot taken under Windows Server 2003:

dynamic_disks_4

Finally, here’s my colorful disk volumes:

dynamic_disks_5

GFW 翻墙工具

那众所周知邪恶的GFW 我就不多介绍了, 直接进主题:

1) gladder
这是firefox 的扩展, 利用的是在线代理. 缺点是https 不支持.

2) tor
基于tor 协议, 具体是什么我也不清楚. 对于firefox 来说有一个torbutton 的扩展, 很方便. 缺点是非常的慢…

3) your freedom
基于java 的代理工具, 具体实现好像跟tor 很像, 也不太清楚, 运行一个简单的jar 文件就搞定了. 能https, 速度的话最大64k/s, 个人觉得下片子够了, 呵呵.