Sep 3, 2011

Disable Startup Sound in Ubuntu 11.04 Natty

Sometimes when I started my notebook at night, the startup music often disturbed my family. It was time-consuming for me to find how to disable the sound, but it takes only 3 minutes to do it. Here you go.

I found that there are two pieces of sound at startup:
  1. Sound for Login Screen
    • Go to the right-upper corner of your desktop
    • Select ‘Menu –> System –> Login Screen 
    • Check the option ‘Play login sound, and close the dialog
    • Go to the dialog Login Screen again, uncheck the option ‘Play login sound, and close out

    The option ‘Play login sound is unchecked by default, but login screen sound is played actually, which should be a bug.
  2. Sound after login
    • Go to the right-upper corner of your desktop
    • Select ‘Menu –> Preference –> Startup Applications 
    • Uncheck the option Gnome Login Sound, and close the dialog
The menu of your system may be a little different, but look for the two dialogs, Login Screen and Startup Applications.

FYI, the two pieces of music are located at /usr/share/sounds/, and you can replace them with your favorites.

Feb 10, 2011

Get back desktop icons

I am using Linux Deepin 10.06, a Chinese community distribution based on Ubuntu 10.04 LTS, using xfce4 as its desktop environment. For some reason, my desktop icons have disappeared. I found a lot of solution like going to

Settings > Settings Manager > Desktop
and selecting

Allow xfce to manage the desktop


However I did not find the option at all. This post mentioned xfdesktop. I tried the command, and the icons came back. There seem to be a lot of people who have problems with their desktop "disappearing" on xfce. Maybe the command xfdesktop can help you get back your xfce desktop icons.

Feb 5, 2011

Weather report powered by python

I would like to insert weather report to my diary automatically, so I googled "weather script python" - yes, I prefer python - and found a python script fetching weather report from Yahoo! Weather written by Thomas Upton

In order to use the script, I looked up the location ID for my city. I searched Yahoo Weather home page. The location ID is in the URL for the forecast page for the city. For example, the forecast page for Los Angeles is http://weather.yahoo.com/united-states/california/los-angeles-2442047/. The location ID of Los Angeles is 2442047.

Unfortunately, the script does not work for me. I checked the python source code, and found the feed URL is "http://xml.weather.yahoo.com/forecastrss?p=", which seems only for US zip code. So I modified the URL to "http://weather.yahooapis.com/forecastrss?w=", which works with the code from Yahoo Weather home page.

You can apply a patch if you would like, which I supply here:

--- weather.py 2011-02-05 21:40:02.000000000 +0900
+++ weather.py 2011-02-05 21:51:43.000000000 +0900
@@ -19,7 +19,8 @@

# Yahoo!'s limit on the number of days they will forecast
DAYS_LIMIT = 2
-WEATHER_URL = 'http://xml.weather.yahoo.com/forecastrss?p=%s'
+#WEATHER_URL = 'http://xml.weather.yahoo.com/forecastrss?p=%s'
+WEATHER_URL = 'http://weather.yahooapis.com/forecastrss?w=%s'
METRIC_PARAMETER = '&u=c'
WEATHER_NS = 'http://xml.weather.yahoo.com/ns/rss/1.0'

Aug 4, 2009

Facial Make-up of Heavenly King


I drew this one according to a photograph on the front cover of a magazine, which was taken from Nebuta Matsuri in Aomori city, Japan. The size of the face was drew larger than expected, so that there is no place for its helmet.

The Aomori Nebuta Festival (青森ねぶた祭り) is a Japanese summer festival that takes place in Aomori city, Aomori Prefecture, Japan. "Nebuta" refers to the float of a brave warrior-figure which is carried through the center of the city. The Nebuta floats are made of a wood base, carefully covered with Japanese paper, beautifully clolred, and lighted from the inner part with hundreds of light bulbs. The warrior-figures are gods (菅原道真 雷神と化す) or heroes (義経渡海), some of which are from Records of Three Kingdoms(呉軍の先鋒・鈴の甘寧)or Water Margin(水滸伝より「黒旋風・李逵と張順」). For more information, refer to:

Jul 18, 2009

Icons on Xfce Desktop come back


I am running Hiweed 2 RC3 (a Linux distribution based on Ubuntu), which uses Xfce as its desktop environment.

One month ago, for some unknown reason, all of the icons on my desktop disappeared after I restarted my computer. Today I was free to play with my computer and got the icons back as follows:
  • Go to Menu>Settings>Xfce Setting Center>Desktop
  • Click "Allow Xfce to manage the desktop".
Great! All icons came back, BUT, what on earth un-checked this?

Jul 12, 2009

Happy Birthday, Tianyi


Tianyi is the lovely girl of my friends, who are living in Paris.

This portrait was drawn from a photograph taken at her half year old. Her parents made a Christmas card using the photograph, so I drew this sketch.

Last time we met each other at Beijing, you just cried as long as you found I looked at you; next time I see you, I hope you could call me uncle in three languages

Happy Birthday, Tianyi!