Saturday, April 29, 2006

Bye Bye Blogger...

Yeah, I've moved to a new site -- suksit.com (That's my first name ^^). Because I miss some features that Blogger does not provide so I just create my own blog using Drupal.

However, thanks to Blogger for providing me a place to start blogging :)

Sunday, April 23, 2006

Emacs and X.Org rgb

Due to Blognone Tech Day 2006 effect, I came home and installed Emacs to try it out. emerge -av emacs went fine without any errors but when I try to start emacs from Terminal, here's what I got:
$ emacs
Undefined color: "black"
Googling around, I found that Emacs was looking for "rgb.txt" which did not exist on my system.

This is because I'm using X11R7.0 -- a completely modularized X Window System, and it doesn't come with all the tools like X11R6.x package. So I have to manually emerge -av rgb to get the rgb application.

After emerge finished, I tried to run Emacs again and still got the same error. Another google search, it suggested I should take a look at /etc/X11/xorg.conf for RgbPath. In my xorg.conf, it reads:
RgbPath "/usr/lib/X11/rgb"
But "rgb.txt" wasn't there, so where is it? I typed in locate rgb.txt and found that the file was in /usr/share/X11. Then I modified xorg.conf according to the path that locate told me:
RgbPath "/usr/share/X11/rgb"
Restarted X, called up Terminal, typed "emacs" then hit Enter... and wheeeee! Emacs popped up! Time to check it out!


ps. Now I know one Emacs command -- C-x C-c :P

Saturday, April 22, 2006

Blognone Tech Day 2006

Today I went to Blognone Tech Day 2006 seminar at Kasetsart University from 1.00pm to 5.30pm. The concept of the seminar was "Developer's Exchange", which was a mixed of various topics.

Each topic was described in a short and easy-to-understand way -- mainly to give the concept/overview about the topic and to introduce the presenter whom the audiences can contact later if they need more details.

Here're the topics covered today:
  • Ruby on Rails by Polawat Phetra
    I was late and by the time I arrived the presentation was almost finish. However, I still had a chance to see some demos and was impressed to see that your can create an AJAX-ed webpage with only a few lines of Ruby code.
  • Python on Zope by Sugree Phatanapherom
    Couldn't really catch up the details because I was sitting in the far back and could not see well. However, I think it's more difficult than RoR, and Sugree said there are not many hosts that support Zope. So just knowing that "Zope" exists is enough for me :)
  • Mono: Open Source .NET Framework by Wiennat
    A nice presentation about .NET Framework architecture, why Mono was developed and its features. BTW, Mono = Monkey XD
  • Emacs: Hacker's Text Editor by Poonlap
    Brief history of Emacs and introduction of its features. I've never seen a text editor that is capable of playing games, surfing internet, checking emails or even providing an AI to talk to. I just came back and emerged emacs right away, gotta try it!
  • IP PBX using Asterisk by Dome Charoenyost
    Completely lost about what the presenter said (out of my field, I guess). But we sure did enjoy the presentation and laughted a lot ^^
  • Linux Virtualization using Xen by Somphol Boonjing
    Shows another solution for virtual hosting on Linux. But I still think VMWare is better...
  • Game Theory by Jittat Fakcharoenphol
    Describes the Nobel Prize-winning theory of John Nash (there is a movie about him -- A Beautiful Mind). There were a bunch of examples, but I'm still not clear about how can it be used in real life =.=
  • Emerging Technology 2006 by ปรเมศวร์ มินศิริ
    Shows that the world is walking towards Web 2.0. In the future, all applications will run on internet and will be platform-independent.
  • Thai Word Breaking using ZWSP by Wason Liwlompaisan
    An idea of how to break Thai words correctly e.g. "ตากลม" can be separated into "ตา-กลม" and "ตาก-ลม" and both words do make sense. Lew's solution is to have a special Unicode character -- "ZWSP" (I guess it stands for something like "Zero-Width Space") -- inserted between each word. It seems to be an elegant solution but I still wonder how can we manage to input this special charecter between each word we typed?
Phew!... Quite a lot of topics in just 4 hrs and a half, right? However, it helps opening my vision about programming and new technology a lot. And I just love the Blognone t-shirt!! Hope there will be a seminar like this again :)

ps. Too bad I didn't get the Ubuntu Stickers :(

Tuesday, April 18, 2006

DOS vs UNIX line breaks

I was writing a shell script to parse some data in csv format generated by Microsoft Excel and was wondering why the script didn't work as I expected.

I took a look at the .csv file using more command and it looked OK to me...

Half an hour passed by and I still cannot figure the problem out, I used vi to open the csv file and saw that there were additional ^M characters everywhere in the file.

After googling around for a while, I found that the ^M's were there because the csv file contained "carriage return (\r)" characters, which is the default line break character in Windows, instead of "new line (\n)" characters as it should be. To fix this problem, I have to execute the command
tr "\r" "\n" < inputdata.csv > gooddata.csv
to remove all ^M's and after that my script worked just fine.

Xfce 4.4 beta1 released!

Image from Xfce Diary
Xfce is a lightweight desktop environment for various *NIX systems. Designed for productivity, it loads and executes applications fast, while conserving system resources.
Xfce 4.4 beta1 was released yesterday. Here are some new features:
  • Thunar File Manager a new file manager that replaces xffm.
  • Desktop Icons the most requested feature is now implemented.
  • Panel is completely rewritten. You can now add/remove as many panel as you wish, panel plugins can be downloaded at xfce-goodies, including xfapplet which allows you to use GNOME applet on Xfce panel.
  • Others
    • Preferred Applications allows you to choose default application for web browsing, mail reading etc.
    • Mousepad a notepad-like application for Xfce
    • Orage a calendar application for Xfce. I'll just use Google Calendar anyway ;)
More info and screenshots are available at Xfce Diary. Give it a try! And you may never want to use GNOME or KDE again XD

Sunday, April 16, 2006

Gmail File Space

If you are using Firefox and Gmail, there's a cool extension called gspace which allows you to use Gmail as your file storage. It's similar to Gmail Drive in term of functions -- to store and retrieve files from your Gmail account.

But unlike Gmail Drive, which can only be used on Windows, gspace runs on Firefox -- which means it can be used on (hopefully) any platform that supports Firefox. Well, at least it runs on my Gentoo Linux box :)

To use gspace, you'll need:
Just install the extension and restart Firefox and you're done. Start gspace by selecting Tools > GSpace menu in Firefox.

gspace UI looks just like an FTP client (screenshot from gspace website is here), you can select a file from your computer and upload it to your Gmail account, or download a file from your Gmail account to your harddisk. It's that simple!

Thursday, April 13, 2006

One thing I don't like about Blogger.com

Is that I cannot categorize my blog entries. At first, I think this blog will be about my experience using Linux and open source softwares. But after a while, I found that there are many things I want to write about and I just have a feeling that there should be a way to group the same kind of posts together using tag or category. It not only helps finding a post easier but also gives an overview of what my blog is about to the visitors.

Why didn't google implement this feature? Or maybe it's already there but I just don't know?

Now I'm looking for a Wordpress host and found some interesing ones e.g. Blogsome, Blogthing and Wordpress.com (actually I got these links from the closed signup page of Weblogs.us)

Hmmm... -_-a

Sunday, April 09, 2006

Bangkok International Book Fair 2006

Here're the books that I bought:

Thursday, April 06, 2006

Cool Firefox Wallpapers

Firefox Surf Gear
(image from OpenSourcePal.org)

I was looking for a new wallpaper at deviantART and saw this Nova - Mozilla Firefox wallpaper. The author's comment said he made it for the contest at OpenSourcePal.org so I followed the link.

There are many nice wallpapers there, all of them are related to open source softwares such as Firefox, Thunderbird, OOo, some Linux distros etc. If you're a Firefox fan, I'm sure you don't wanna miss it.

Fixing Azureus Error Messages

Every time I start Azureus(2.4.0.2) on my Gentoo Linux box, two error messages will pop up, saying
Open Error '' could not be opened: Not a file
and
Error Failed to access torrent file ''. Ensure sufficient temporary file space available (check browser cache usage).

That looks like Azureus tries to open a file with empty name every time it starts up. And if you take a look at the file /usr/bin/azureus, you will see that the line responsible for calling up Azureus reads:
java -cp $(java-config -p systray4j,azureus-bin 2>/dev/null) -Djava.library.path="${AZDIR}" org.gudy.azureus2.ui.swt.Main "$1"

So the problem is when we start Azureus with no arguments, $1 will become an empty string, and Azureus will try to find a file named '', which, of course, does not exist.

To fix this, we have to check whether $1 is empty or not, and then call Azureus in appropriate way. What I did is replacing that line with:
if [ "$1" == "" ]; then
java -cp $(java-config -p systray4j,azureus-bin 2>/dev/null) -Djava.library.path="${AZDIR}" org.gudy.azureus2.ui.swt.Main
else
java -cp $(java-config -p systray4j,azureus-bin 2>/dev/null) -Djava.library.path="${AZDIR}" org.gudy.azureus2.ui.swt.Main "$1"
fi

And no more error messages on startup! :)

Sunday, April 02, 2006

A story of destin… er distro’s.

I just bumped into this post @ CoffeeBuzz's Linux Blog.

(quoted from original post)
2 people (Bob and his girlfriend Claire) are completely new to Linux. Claire decides shes UBER l33T!?!!111 and decides to install Gentoo. Bob, being an experienced windows user decides to play it safe in GUI-land with ubuntu...

read more :)