Debian Squeeze minior tweaks

Yes, I upgraded from Debian Lenny to Squeeze because I need ibus to replace scim as my default Chinese input program. So far the experience with ibus is good but the same was half-true with Squeeze. I spent quite some time to make Squeeze more comfortable to use.

Touchpad tapping and scrolling

I need to create an option file under /etc/modprobe.d to enable tapping and scrolling. Just create a file with any name under modprobe.d and put the following line into it:

options psmouse proto=imps

Undervolting core2duo CPU

Under Windows you have the convenient way to use rmclock to undervolt the CPU to reduce the heat generated by CPU operations. Linux has the equivalent method, but only a little harder. The answer is Linux PHC. To implement it as quickly as you can, the following steps are involved:

Compiling and installing it is fairly easy. You just need to have kernel-headers and build essentials (gcc, libc, make, etc). You do not need the kernel source to compile this kernel module.
Find the workable voltage for your CPU. You can use rmclock in Windows to select the voltage and write down the number or search the Internet for the limit of the undervolting for your CPU.
Use PHCTool (old version) to convert the voltage into VIDs (voltage IDs) for Linux PHC.

PHCTool

The voltage for my T7200 are translated into these four PHC VIDs 24 23 19 19. To pass these values, I edited /etc/init.d/rc.local and put the following two lines at the bottom of that file. Since I have two CPU cores, two lines are needed:

echo "24 23 19 19" > /sys/devices/system/cpu/cpu0/cpufreq/phc_vids
echo "24 23 19 19" > /sys/devices/system/cpu/cpu1/cpufreq/phc_vids

Underclocking Nvidia Geforce Go 7200

I have little luck with underclocking Geforce Go 7200 on my HP DV2000t laptop. By the way, this laptop is very hot and noisy so I don’t think I am gonna buy a HP lappy again. I basically followed the instructions by Artem and ended up putting the following lines into my /etc/X11/xorg.conf, but I am not sure if it worked or not. Maybe I should change the driver and try again?

Section "Device"
    Identifier     "NVIDIA GeForce"
    Driver         "nvidia"
    Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3333; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"
    VendorName     "NVIDIA Corporation"
EndSection

ibus input method

ibus works great under Debian Squeeze. Just remember to run ibus-setup first and enable the pinyin input method for ibus to handle.

disabling auto-starting services

Bum (Boot-up Manager) is a great tool to view the system services and disable them. It is better than rcconf and sysv-rc-conf.

bum

Capturing screen

The screenshot was taken by shutter under gnome. shutter is quiet powerful to use and its plugins can perform almost everything you want in a screen capturer. But it’s still a diamond in the rough because I struggled a little bit trying to find the resize function under this program. It turned out that resizing is supported by a plugin and it hides under the ‘screenshot’ menu. The screenshot of bum above is a an art of creation by shutter.

Convert mp3 tags into UTF-8

Install python-mutagen package first and then run this command in the directory of the mp3 files.

find .  -iname  "*.mp3"  -execdir  mid3iconv  -e  GBK  {}  ;

Java based program ID3iconv is also know to perform the same task.

Some say by setting an environment parameter in /etc/X11/Xsession.d/95setenv like this will save the hassle of running the tag conversion when you have new music

 echo "GST_ID3_TAG_ENCODING=GBK" > /etc/X11/Xsession.d/95setenv

Right now I am using Exaile as the music player. Too bad it does not allow me to sort music by directory sources like foobar in Windows.

More to come about the movie/music player and other cool stuff under Linux.

What I expect in Windows 8

Here is what I expect from the next version of Windows from Microsoft — Windows 8 (Windows Eight).

  • Very fast barebone installation. All drivers and a basic desktop should be up and working within 15 minutes after the installation media is booted. Users of the old Windows should be blown away by the speed of Windows 8.
  • This barebone installation should be completely free of charge for the end users and everyone can download a free copy from the Microsoft website. The activiation machanism should be completely eliminated.

A real cashcow

How can Microsoft make profit? You may ask. Here is what I suggest: with the barebone Windows up and running, users will be immediately presented options to quickly access the best applications and services they need.

  1. An assortment of free applications, either made by MS or other developers, should be presented to users. There should be a forum or user group for every application available the list. MS can charge users a little fee if they need technical support and even share the revenue with application developers. This strategy kills two birds with one stone: tightly integrate the Internet with the desktop OS and bond the developers and Microsoft in a win-win situation.
  2. Likewise, MS should gather the best web services on the Internet and users should be able to use them with a few clicks. It should be so convenient for users to set up a universal account and use it with twitter, gmail, youtube or facebook, to name a few. Ms does not need to outcompete these services or provide its own secondary services like hotmail or bing search. Instead, MS can cleverly fuse these services with the operation system, making it a much better experience than users on other platforms such as Mac OS or Linux. Do you know how painful it used be to install a flashplugin under Linux?
  3. Deliver information in a timely, authoritive and accessible manner. MS can cooperate with live media and news providers such as lastfm, wikipedia and BBC to deliver information and entertainment to the doorstep of the users. How wonderful it would be.
  4. All these three services can be fused smartly into one instant-messenger program — a Google wave style — initiating program. Call it ‘smart portal’, ‘star trek’ or even ‘MS assistant’ as long as it does the job mentioned above, MS would be unbeatable.

To my Linux buddies

No I am not a traitor even though I devised this best strategy for Microsoft to dominate the world for a few score of years. Linux fans should be rested assured that the last thing Microsoft wants to listen is a piece of advice from a dual booting Linux-Windows user. Maybe Linux community should use this strategy?

To Bill and Steve

Yes, I am ready to be hired and put your dream of friendly world dominiation into reality. It is interesting when I poped into a speech excerpt by the Microsoft CEO: “The fifth [computing] revolution is about more than personal empowerment and social interaction; we literally will get the tools to help us better understand and address global issues that affect billions of people, including education, healthcare, science, and environmental change.”

How can this revolution be possible when you only have a few Windows and fail to keep the door wide open and bring the best of the software world and the Internet to the doorstep of the users? Search me.

What the perfect MS Windows is like?

Windows 7 has just been released in the market, and it has got a lot of media attention. Still it is just an upgrade of the previous Windows and another step forward on the familiar design track of Microsoft. As time goes by, this will not work very well on this Internet age. Here I offer some advice to MS on how to make a better OS in this Internet age.

The very first thing — the starting point and the foundation of a revolutionary Windows release — should be integration of the OS itself with the flow of information. Let’s face it: the sole function of an OS is to facilitate the flow of information. So far, Windows just give you a tool to process information rather than deliver information right to the door. Bill Gates has to think one step ahead — what a typical user actually need right after installing a new OS? How much work does the user have to do in order to actually getting his daily life on a computer started?

So far, all the Windows versions are just like an unfurnished house, and the users have to labor hard and attend to many chores just to start living in it. This is too much work for users and a better Windows should be like a hotel room that well anticipate users needs and provide for them.

Let me elaborate on this with specific suggestions:

  • Present to users a list of wonderful free applications in the software world. There are hundreds of free, powerful easy-to-use applications available in the wild world. MS can make the user’s day by present to them this list classfied with its functions and a short description, or even a popularity rate and help the user install them with a few clicks. Those good applications will make the Windows a humble servent presenting a tray of gems to the user, and people will buy Windows simply to use the applications they love.
  • Make Windows highly componentized. Windows should scale its installation choices from a barebone installation with minimal services, a server, a media station and an Internet Information Station. And people should easily combine or remove components without hassel. Most people will still have the default installation that suits every body, but there should be a choice that the user can installation a minimal Windows version and expand it the way he likes — have his own browser, media player, email client and instant messenger. Instead of obstructing this from happening, MS should do all it can to make it happen. MS just need to keep this in mind: a winner OS is a one that facilite rather than control or obstruct what its users want to do. What’s more — this will make Windows resource-efficient and safer.
  • Forget its MSN search, the windows media player, the live space and hotmail. There are secondary services and products compared to the leading providers such as google. These secondary services waste MS’s engery and money, and make it forgetting what an OS is truely supposed to do — to provide the best services and the faciliate the information flow. It should make itself the best platform for discovering and delivering the services its users need.

The perfect Windows I envision should be called ‘the Information OS’ that takes users on a joyous ride in the torrent of information flow — nothing less, nothing more. I’ll leave the details to Mr. Bill Gates to figure out.

Two handy screen capture tools

Both Snag-It and Hypersnap are ovekill for getting fast screenshots for a blog post. My search led me to two light-weight screen caputure tools.

GPL licensed Greenshot is a quick and no hassel screenshooter. Just press a few global shortcuts and you can easily get shots for a region, a window or the whole desktop in a blink of an eye. For example, I can just press ALT+Printscreen to get a shot of this window and automatically save it to a folder for later use.

If you want more advanced features like adding a watermark or resizing an image in a row after you capture a screen, WinSnap is the tool to use. Unfornately it is not free and it covers your screenshots with its logo if you use the unregistered version — rending the so-called trial time totally useless. Still, It is sweet to witness its power to process a caputured file based on the “effects” you designated and make it immediately available for use. The following screenshot has a water mark and is resized from the original one.

WinSnap.png

How to avoid WordPress cropping images into thumnails

I am always frustrated with the way WordPress handles pictures in a post: when you upload an image, WordPress automatically crops it into a thumbnail, a medium and a large sized picture. The result is a crowded upload folder and a mess of file names that makes it hard to pinpoint the picture you really want to show to the readers. It’s time for change.

What I want to do is really simple: show the picture in the post with the exact size I upload it. One way of doing it is uploading the image via ftp and just link the url of that image in the post. Also you can use flicker or Picasa to insert pictures into your post. The handy weblog client Zoundry Raven integrates these two online ablum service in its program.

But the easier way and faster way for my goal is directly changing the media settings under Media Settings of WordPress and set all the values to zero. This will prevent WordPress generate a few copies of the image with various sizes in your upload folder and you have a sense of super cleanness and orderliness.

wordpress media setting

Quickly delete an unwanted song in Foobar2000

When I play music with foobar2000, there are certain music files I don’t like and I want to immediately delete them for good when they start playing. The plugin foo_deletecurrent does exactly this job and it works great with the latest foobar2000 (as of version 0.9.6.8).

The foo_fileops plugin that comes as a default for foobar2000 0.9x installation can not delete the music file that is playing, and I personally think it is useless.

Just put the foo_fileops.dll into the “components” directory of your foobar2000 installation directory and configure a shortcut to delete a music file. I personally use Ctrl+Q to do the job.

If you can’t find the original file, you can download from this blog: foo_DeleteCurrent

A few nice WordPress themes

Browsing WordPress forum, I came across a few nice themes that I may consider using in the future. Tarski and Dkret3 will always be the themes of my choice. Both are well designed, with the former more suitable for serious topics and the later for more casual writing.

The first one in the ranking is dfblog . It’s clean but not plain.

Atahualpa from bytesforall is also nice. Its author also makes other themes.

Simplixity is an ‘everything is gray’ theme by a 22 old U.S. guy. The theme is mostly in gray color.

Other themes like Simplex and Cleanr are also on my list for consideration. Both are made by the same person. The latter is worth my especial attention because its designer says:

Cleanr focuses on typography. Big fonts lets your users find it easy to read even from a distance. Cleanr focuses on space. It always looks better when you have some space around you.

Big fonts and spaces are always the main reason for me to modify a stock theme.

Other themes to consider:

A promotional theme called Free WP Premium Theme. I am wary about these premium stuff, but this theme looks good.

Setting the global size limit of Postfix mail

Only one parameter and some basic math are required to set the size limit of an email message under Postfix.

To set the size limit of a message, edit /etc/postfix/main.cf and set message_size_limit=. The unit should be the number of bytes.

Now do some math: to allow sending a message of no more than 10MB, the number should be 1024*1024*10 bytes, which equals 10485760. Just fill this number to the other side of the equation.

Remember:

1KB = 1024Byte
1MB = 1024KB
10MB = 10240KB = 10*1024byte*1024byte

This is indeed confusing and I just showed how I suck at math. For detailed information, read this wikipage.

Modify the logo area in NCleanBlue Theme for CMSMS

Locate the code section that contains the following lines and comment it out:

{* ... the big star that holds the version number, you may remove it here and the style sheet where it is marked. *}

For information on how to comment out html codes, refer to this page on WordPress site.

How to install CMS Made Simple in Debian/Lenny

Installing CMSMS (cms made simple) involves usually steps of most PHP based programs. But on Debian/Lenny, php5-gd needs to be installed for a fully functional CMSMS.

In the installation self-test in step 2, I was prompted that GD libraries were missing. Search revealed that I need to install php5-gd for the GD library. The use of the package is described as follows:

This package provides a module for handling graphics directly from PHP scripts. It supports the PNG, JPEG, XPM formats as well as Freetype/ttf fonts.

So it’s clear that the package provides graphic support for PHP. Installing this package under Debian/Lenny will also install some truetype fonts, which isn’t necessary under shell environment. It is possible to remove the truetype fonts package by force, but that isn’t worthy of the hassle.