遊龍

游龙
君不見黃河之水天上來,奔流到海不復回? 君不見高堂明鏡悲白髮,朝如青絲暮成雪?人生得意須盡歡,莫使金樽空對月。天生我材必有用,千金散盡還復來。烹羊宰牛且為樂,會須一飲三百杯。岑夫子,丹丘生,將進酒,杯莫停。與君歌一曲,請君為我傾耳聽。鐘鼓饌玉不足貴,但願長醉不願醒。古來聖賢皆寂寞,惟有飲者留其名。陳王昔時宴平樂,鬥酒十千恣歡謔。主人何為言少錢,逕須沽取對君酌。五花馬,千金裘,呼兒將出換美酒,與爾同銷萬古愁!

Sunday, June 22, 2008

Great Quotes from Richard M. Stallman

  1. "I could have made money this way, and perhaps amused myself writing code. But I knew that at the end of my career, I would look back on years of building walls to divide people, and feel I had spent my life making the world a worse place." (I like this one best. That's what `ethicalness' and `responsibility' means.)
  2. "When I do this, some people think that it's because I want my ego to be fed, right? Of course, I'm not asking you to call it "Stallmanix"!"
  3. "I'm always happy when I'm protesting."
  4. "Geeks like to think that they can ignore politics, you can leave politics alone, but politics won't leave you alone."
  5. "People sometimes ask me if it is a sin in the Church of Emacs to use vi. Using a free version of vi is not a sin; it is a penance. So happy hacking."
  6. "If programmers deserve to be rewarded for creating innovative programs, by the same token they deserve to be punished if they restrict the use of these programs."
  7. "Fighting patents one by one will never eliminate the danger of software patents, any more than swatting mosquitoes will eliminate malaria."
  8. "People said I should accept the world. Bullshit! I don't accept the world."
  9. "Giving the Linus Torvalds Award to the Free Software Foundation is a bit like giving the Han Solo Award to the Rebel Alliance."
  10. "Would a dating service on the net be ‘frowned upon’ . . . ? I hope not. But even if it is, don’t let that stop you from notifying me via net mail if you start one."
  11. "Once GNU is written, everyone will be able to obtain good system software free, just like air."
  12. "If you want to accomplish something in the world, idealism is not enough--you need to choose a method that works to achieve the goal. In other words, you need to be "pragmatic."
  13. "No person, no idea, and no religion deserves to be illegal to insult, not even the Church of Emacs."
  14. "Today many people are switching to free software for purely practical reasons. That is good, as far as it goes, but that isn't all we need to do! Attracting users to free software is not the whole job, just the first step."
  15. "If in my lifetime the problem of non-free software is solved, I could perhaps relax and write software again. But I might instead try to help deal with the world's larger problems. Standing up to an evil system is exhilarating, and now I have a taste for it."
  16. "I see nothing unethical in the job it does. Why shouldn't you send a copy of some music to a friend?"
  17. "'Free software' is a matter of liberty, not price. To understand the concept, you should think of 'free' as in 'free speech,' not as in 'free beer'." (This may be the most famous one. It does clarify what's the meaning of `free'.)
  18. "For personal reasons, I do not browse the web from my computer. (I also have not net connection much of the time.) To look at page I send mail to a demon which runs wget and mails the page back to me. It is very efficient use of my time, but it is slow in real time."
  19. "Playfully doing something difficult, whether useful or not, that is hacking."
  20. "Copying all or parts of a program is as natural to a programmer as breathing, and as productive. It ought to be as free."
  21. "To have the choice between proprietary software packages, is being able to choose your master. Freedom means not having a master. And in the area of computing, freedom means not using proprietary software."
You can find more HERE.

Monday, June 16, 2008

How to Boot Fedora 9 Live from the Hard Drive

I just wanna give Fedora 9 a try. After downloading the iso image of the Live CD. I tried several times to boot it from my hard drive but no luck. I almost quit and burn the iso image to a CD and boot it from the CD drive. Jeez, it took me almost ten minutes to get into the gnome desktop on my laptop (1.6GHz AMD Turion 64 processors, 512MB RAM). That's not standable. I can't imagine how slow the installation process would be. So I get back to my initial attempt: boot the Live system from the hard drive. I search the web but find almost nothing except in the Fedora forum a thread which talks the same thing though without a solution. I look around in the iso image. Finally I find something useful and with its help I successfully boot the Live system from the hard drive. In case of help to others, I write down the detailed steps below. (I assume you already have got a GNU/Linux in your box. Mine is Ubuntu.)

1. Get the ISO Image
Download an iso image of Fedora 9 Live CD/DVD from its website. Save it somewhere. In our case, ~/Distro/

2. Prepare your Hard Drive
Create a new partition on your hard drive using your favourite partition manager. GParted for gnome users, QtParted for KDE users. Or if you prefer the command line, cfdisk or fdisk is there for you. Anyway, create a new partition of size 1GB (750MB should be enough, but I am not sure, anyway, better more than less). In our case the newly created partition is `/dev/sda8'. Format it. We choose ext3. The name for SATA/SCSI hard drive is sdxn, while for IDE hard drive is hdxn (where x is the disk number, almost always a letter, and n is the partition number, counting from 1). You should be aware of what you have and choose the right name for your hard drive. But note that GRUB does not distinct them, any hard drive is simply called hdxn, where x is the disk number while n is the partition number (counting from 0). Don't confuse them. For more, read the GRUB manual, by typing the command `info grub' in your terminal.

3. Dump the ISO Image into the Hard Drive
Open a terminal, type in the following commands. Note that the su-way is for non-Ubuntu users. Ubuntu users, skip the first command su, add sudo to each command below if you prefer the sudo-way.)
su
cd /mnt/
mkdir fedora{ISO,Live}
mount -o loop -t iso9660 ~/Distro/Fedora-9-Live.iso fedoraISO
mount -t ext3 /dev/sda8 fedoraLive
cp -a fedoraISO/* fedoraLive/
umount /mnt/fedora*
Replace `Fedora-9-Live.iso' with the ISO image you get and `/dev/sda8' with the partition you created in Step 2.

4. Edit the GRUB Configuration
Open the famous `/boot/grub/menu.lst' file of GRUB using your favourite editor. Add the following lines to the end of the file.
# Fedora 9 Live
title Fedora 9 Live
root (hd0,7)
kernel /isolinux/vmlinuz0 root=/dev/sda8 rootfstype=ext3 rw quiet liveimg rhgb
initrd /isolinux/initrd0.img
Replace `root (hd0,7)' with `root (hdx,n-1)' if your partition is `/dev/sdxn' (or `/dev/hdxn'), `root=/dev/sda8' with `root=/dev/sdxn' (or `root=/dev/hdxn' ) , `ext3' in `rootfstype=ext3' with the file system type name you choose for the partition in Step 2, e.g., xfs. Save the changes to the `menu.lst' file.

5. Reboot and Done
Reboot and choose ``Fedora 9 Live'' from the GRUB menu.


That's all. I know you are curious how I make it, right? The key point is the options to the kernel. I get these options from the `isolinux.cfg' file lying in the same directory as the kernel, i.e., `/isolinux/'. Below is what's in the file. I am sure you will find it.
default vesamenu.c32
timeout 100

menu background splash.jpg
menu title Welcome to Fedora-9-Live-i686!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu color cmdline 0 #ffffffff #00000000
menu hidden
menu hiddenrow 5
label linux0
menu label Boot
kernel vmlinuz0
append initrd=initrd0.img root=CDLABEL=Fedora-9-Live-i686 rootfstype=iso9660 ro quiet liveimg rhgb
menu default
label check0
menu label Verify and Boot
kernel vmlinuz0
append initrd=initrd0.img root=CDLABEL=Fedora-9-Live-i686 rootfstype=iso9660 ro quiet liveimg rhgb check
label memtest
menu label Memory Test
kernel memtest
label local
menu label Boot from local drive
localboot 0xffff
Finally thanks to the Fedora team, you guys have done a really good job!


Tuesday, June 3, 2008

Enable the Advanced File Permissions Dialog in Nautilus -- The GUI Way

Recently on Tombuntu there's a post which tells you how to Enable the Advanced File Permissions Dialog in Nautilus by issuing the command in a terminal:

``gconftool-2 --type bool --set /apps/nautilus/preferences/show_advanced_permissions True'' (without the quotes, to disable the feature, simply replace `True' with `False')

If you feel more comfortable to achieve the goal through a GUI way. Here you go:

  1. press Alt+F2
  2. type gconf-editor and
  3. from the left pane in the pop-up window, choose app -> nautilus -> preferences
  4. go to the right pane, find out the show_advanced_permissions, check the box on its right
  5. close the window, done.

As you look around, you can change other configurations ``under the hood'' in the same way. It's said that ubuntu-tweak also lets you do many configurations easily, including enable this ``show advanced file permission'' feature in Nautilus, but I have not try it.

Goosh.org: The Unofficial Google Shell

If you are a shell lover, then you really will say "Wow, I'm Feeling Lucky!" after I tell you that there's a command line interface (CLI) for google now. Goosh.org, which bills itself "the unofficial google shell," puts a Unix-like CLI to Google on a web page using the magic of Ajax. Simply head to goosh.org and you will feel at home if you do much work in a shell daily.


You can type `help' to list all available commands.

Currently the function of these commands is very simple, it does what it is said to do. You can also see the usage of a command by typing ``help cmd'', where `cmd' is the command you want to learn. Note that there are aliases for most commands. They are similar to the aliases you create for commands in a real *nix shell. You can use these aliases instead of the full name of the corresponding commands. For example, type ``s goosh.org'' to search the web for `goosh.org'. This will give you the results in a similar format when you issue ``ls -l'' in a real *nix shell. Note that it gives you only 4 results. To get more, use the command `more'. When you want to go for a result, you have two choices: type command ``go num'' or ``open num'', where `num' is the number identifying a result. The former will open the result in the current tab, while the latter will open the result in a new window. There's no way to open the result in a new tab for the time being. That's annoying, I know, especially when you have a tabed brwoser like Firefox. If you do not want to go to the goosh.org page everytime, you can also add goosh.org to your Firefox search box using the `addengine' command. Now you can simply issue a command in your search box as if you are in the goosh CLI. After you press enter, it will send your command to goosh to be executed and get you to the goosh.org CLI with the result of the command displayed. Other commands let you request other services by gogole.

I like the idea of goosh though it's still not that smart as a real *nix shell, it lets me google more efficiently without always touching the mouse. It reminds me of an experimental search feature in google lab, keyboard shortcuts. These keyboard shortcuts are almost the same with those of Vim. Though it also can not open a search result in a new tab (I have suggested it do in the future but not sure whether google will implement the feature or not) I find it so useful that after a few days I can not go without it. For example, two days ago, I installed a Firefox add-on called google preview. With it on, I can not use those keyboard shortcuts properly (or say when using those keyboard shortcuts, I can not preview a search result). Anyway I simply uninstalled the add-on even though I find the thumbnails prefixing search results pretty nice ...

Thursday, May 29, 2008

Help Firefox Set a World Record!

With more than 14,000 improvements, Firefox 3 is faster, safer and smarter than before. I am not preaching the merits of Firefox 3. I have used Firefox 3 Beta 5 for a while. (I know the RC1 is out. I do not immediately upgrade to the RC version since it's still under test by the Ubuntu community. And I am so patient/lazy to wait. ;-) ) I do feel the improvements of FF3 over FF2. If you are a long time FF user, I am sure so do you. FF gets more and more popular. People feel like spreading it as much as possible. SpreadFirefox.com does great work. FF3 will come out soon. SpreadFirefox.com recently launches a great deal: Set a Guinness World Record.
All you have to do is get Firefox 3 during Download Day to help set the record for most software downloads in 24 hours - it’s that easy.

Have you attempted to set a World Record with no luck? Well, now is your chance to change that! Help set a Guinness World Record by pledging to download Firefox 3 today.
Click on the button below to join us in our mission to set a Guinness World Record for the most software downloaded in 24 hours! And then PATIENTLY (as I do) wait for the Shinny Download Day's coming!

Download Day - English

Wednesday, April 16, 2008

Play Ogg -- a Painless Switch


Play Ogg

OK, after reading the article in Free Software Foundation and learning some about Ogg in Wikipedia, you wanna switch to Ogg but find that you have hundreds of thousands of songs in mp3/wma format. How to convert that many mp3/wma files to ogg. It does take me some time to search for a nice converter which can not only do the conversion but also guarantee the quality of the output ogg files. In particular, you may need a converter which can do batch conversion. On Ubuntu, go to Applications -> Add/Remove, search for SoundConverter and then click Apply Changes to install. Or from the terminal, ``sudo apt-get install soundconverter'' (without quotes). After the installation, start it from Applications -> Sound & Vedio or from the terminal, ``soundconverter" (without quotes). The interface is very simple and clean. Choose Add File to convert only one file, choose Add Folder to convert all in one folder. The output files are in ogg format. On Kubuntu, you can find a similar tool soundKonverter. If you do not run *buntu, try to find these tools in your package repos. If you fail, go here to get SoundConverter, here to get soundKonverter.

SoundConverter does a good job in converting mp3 files, but performs poorly in converting wma files. Thus I tried to find another tool which can convert wma files to ogg files of better quality. After doing some search, I found OggConvert. You can install it in either way you do when installing SoundConverter on Ubuntu. Otherwise, you can get it here. The output file in ogg is almost of the same quality of the original wma file. But it can not do batch conversion. And it has not been updated for long.

There are some other tools or scripts but I do not try them one by one. You can find some here and here. Or you can do some search in google. If you find some other better tools, post a comment below to let me know. Thanks.

BTW, on Windows, you have another choice, MediaCoder. It's a nice tool but I just find its interface a little bit complicated and currently it lacks tutorial or documentation.

PS:
Aha, found this article in Linux.com. Very nice.

Saturday, April 12, 2008

Firefox -- Even God Uses to Browse Our Milky Way Galaxy


One of the pictures above is a photograph taken by the Hubble space telescope on December 17, 2002. The other is the one we can not be more familiar. Can you believe that?

You can find more photos of the same star, V838 Monocerotis, in Wikipedia. You may notice that the photos in Wikipedia are a little bit different from the one showed here, which has been rotated relative to the original one by Humble and some of the gas cloud may have been edited out around the "tail" of the fox.

Anyway, it's there, Uh? Now Firefox has been popular in the deep space, so any reason not to switch to the one even God also uses?! ;-)

The Jedi Code

There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.