Start emacs in terminal-mode

The first text-editor in Linux I ever used was pico. Then I was introduced to emacs and remained using for awhile. Nowadays, vi(m) is my favorite and default text editor of choice. Anyway, the main point of this post is to how to start emacs in terminal-mode instead of graphical mode.

Β Β Β  $ emacs -nw

That’s it. -nw actually does the trick.

Reference: How to get started…


Bash Command Shortcuts

How many times do you find yourself using arrow keys to scroll to the beginning or the end of line of the command line in bash terminal? Do you use backspace to delete every character of what you type to clear the command line? Well, if you answer “yes” to any of the two questions, continue reading.

I, myself, have been doing this a lot because I couldn’t remember the shortcut keys to do those tasks. So, I decided to write them here as a reference that could be referred to in the future. You can easily find the same or even thorough information on the web.

Useful Shortcut Keys
Key sequence What it does
Ctrl + U Delete to the end of line
Alt + D Delete to the end of current word
Alt + Backspace Delete to the start of current word
Ctrl + A Move to the start of line
Ctrl + E Move to the end of line
Ctrl + Left Arrow Move one word to the left
Ctrl + Left Arrow Move one word to the right

I hope those shortcuts could save you some time and the fingers from getting sore.

Installing Pidgin on openSUSE 10.2

If you’ve been using Gaim in the past, you probably know that it is no longer available now. The name of the program has been permanently changed to Pidgin. Even though Pidgin has been released for awhile, I’ve been still running Gaim Beta 2 until tonight. Well, not that I don’t want to install Pidgin, I just didn’t know how to do it. I tried to search for Pidgin openSUSE binary package in Google in the past for a few times without any success.

Tonight, while I was maintaining the repository list in my system, I finally could install Pidgin. So here is how you can achieve the same thing.

Add the following repository to the Yast (or Smart) package manager if it’s not already there:

type = rpm-md
name = GNOME-Community
baseurl =

Now, try to search for pidgin in Yast, you should see a list of packages containing: pidgin, pidgin-debuginfo, pidgin-devel, …etc. Please choose a minimum of two packages: pidgin and libpurple and install them. After finish the installation, you can launch pidgin from the menu.


Fig. 1 Pidgin main window

Pidgin Conversation Window


Fig. 2 Pidgin Conversation Window

How to kill defunct process

Defunct processes are corrupted processes that can no longer communicate between the parent and child one. Sometimes, they become “zombies” and remain in your system until you reboot your machine. You can try to apply “kill -9” command, but most of the time you’ll be out of luck.

In order to kill theses defunct processes, you have two choices:
1. Reboot your computer
2. Continue reading…

First, let’s find out if the system contains defunct process:

$ ps -A | grep defunct

Assume your output is as the following:

8328 ? 00:00:00 mono <defunct>
8522 ? 00:00:01 mono <defunct>
13132 ? 00:00:00 mono <defunct>
25822 ? 00:00:00 ruby <defunct>
28383 ? 00:00:00 ruby <defunct>
18803 ? 00:00:00 ruby <defunct>

This means you have 6 defunct processes: 3 of mono, and 3 of ruby. These processes exists because of poorly written application or unusual action taken by the user, in my case there must be some serious problem with the program I wrote in mono C# πŸ™‚

Now, let’s find the ID of the process and its parent’s:

$ ps -ef | grep defunct | more

The output from the above command:


kenno 8328 6757 0 Mar22 ? 00:00:00 [mono] <defunct>
kenno 8522 6757 0 Mar22 ? 00:00:01 [mono] <defunct>
kenno 13132 6757 0 Mar23 ? 00:00:00 [mono] <defunct>
kenno 25822 25808 0 Mar27 ? 00:00:00 [ruby] <defunct>
kenno 28383 28366 0 Mar27 ? 00:00:00 [ruby] <defunct>
kenno 18803 18320 0 Apr02 ? 00:00:00 [ruby] <defunct>

UID: User ID
PID: Process ID
PPID: Parent Process ID

If you try to kill the process with ID 8328 with the command “kill -9 8328”, it may not work. To properly kill it, you need to execute the kill command on its parent whose ID is 6757 ($kill -9 6757). Continue applying the kill command on all the PPID, and verify your result ($ps -A | grep defunct).

If the previous command display no result, well done, otherwise you may need to reboot your system.


Format Hard Disk with ext3

αžŠαŸ„αž™αžŸαžΆαžšαžαŸ’αž‰αž»αŸ†αž”αžΆαž“αž”αŸ’αžšαžΎαž”αŸ’αžšαžΆαžŸαŸ‹αž”αŸ’αžšαž–αŸαž“αŸ’αž’αž”αŸ’αžšαžαŸ’αžαž·αž”αŸαžαŸ’αžšαž€αžΆαžš Windows αž‡αžΆαž™αžΌαž›αž„αŸ‹αžŽαžΆαžŸαŸ‹αž˜αž€αž αžΎαž™αž“αŸ„αŸ‡ partitions αž“αŸƒ hard disks αž—αžΆαž‚αž…αŸ’αžšαžΎαž“αž‡αžΆ ntfsαŸ” αžαŸ’αž„αŸƒαž“αŸαŸ‡αžαŸ’αž‰αž»αŸ†αž…αž„αŸ‹αž”αŸ†αž›αŸ‚αž„ ntfs partition αž˜αž½αž™αž˜αž€αž‡αžΆαž›αžΈαžŽαžΆαž€αŸ‹ ext3 partition αžœαž·αž‰αžŠαŸ„αž™αžŸαžΆαžš hard drive αž€αŸ’αž“αž»αž„αž›αžΈαžŽαžΆαž€αŸ‹αžŸαŸ’αž‘αžΎαž–αŸαž‰αž αžΎαž™αŸ”β€‹ αžαžΎαž™αžΎαž„ format partition αž‡αžΆαž˜αž½αž™αž›αžΈαžŽαžΆαž€αŸ‹αžŠαŸ„αž™αžšαž”αŸ€αž”αžŽαžΆ? αž‚αž·αžαŸ—αž‘αŸ… αžαŸ’αž‰αž»αŸ†αž˜αž·αž“αžŠαŸ‚αž›αž”αžΆαž“αž’αŸ’αžœαžΎαž–αžΈαž˜αž»αž“αž‘αŸαŸ”

αžŠαŸ†αž”αžΌαž„αžαŸ’αž‰αž»αŸ†αžαŸ†αžšαž€αž€αž˜αŸ’αž˜αžœαž·αž’αžΈ αžŠαŸ‚αž›αž˜αž€αž‡αžΆαž˜αž½αž™ ខេឌីធ៊ី (KDE) αžαŸ‚αžšαž€αž˜αž·αž“αžƒαžΎαž‰αž˜αžΆαž“αž’αžΆαžŽαžΆαž˜αž½αž™αžŸαŸ†αžšαžΆαž”αŸ‹αž αŸ’αžœαž˜αž˜αžΆαž (format) αžŸαŸ„αŸ‡αŸ”β€‹ αž”αŸ’αžšαž αŸ‚αž›αž‡αžΆαž˜αžΆαž“β€‹ tools αž¬αž€αž˜αŸ’αž˜αžœαž·αž’αžΈαžαŸ’αž›αŸ‡αžŠαŸ‚αž›αž’αžΆαž…αž αŸ’αžœαž˜αž˜αžΆαž αžŠαžΎαžšαž›αžΎαžαŸαžŒαžΈαž’αŸŠαžΈ αž αžΎαž™αžαŸ’αž‰αž»αŸ†αž˜αž·αž“αž”αžΆαž“αž”αž‰αŸ’αž…αžΌαž›αžœαžΆ αžŠαžΌαž…αŸ’αž“αŸαŸ‡αž”αžΎαž›αŸ„αž€αž’αŸ’αž“αž€αžŠαžΉαž„αžˆαŸ’αž˜αŸ„αŸ‡αž€αž˜αŸ’αž˜αžœαž·αž’αžΈαž‘αžΆαŸ†αž„αž“αŸ„αŸ‡ αžŸαžΌαž˜αž˜αŸαžαŸ’αžαžΆαž”αŸ’αžšαžΆαž”αŸ‹αž•αž„αŸ” αž™αŸ‰αžΆαž„αžŽαžΆαž˜αž·αž‰β€‹ αžαŸ’αž‰αž»αŸ†αž”αžΆαž“β€‹αžŸαŸ†αžšαŸαž…αž…αž·αžαŸ’αžαž”αŸ’αžšαžΎ command-line αžŠαžΎαž˜αŸ’αž”αžΈαž αŸ’αžœαž˜αž˜αžΆαžαžœαžΆαŸ”β€‹ αžαŸ’αž‰αž»αŸ†αžŸαŸ’αž‘αžΎαž—αŸ’αž›αŸαž…αž”αŸ’αžšαžΆαž”αŸ‹αžαžΆ αž€αŸ’αž“αž»αž„αž”αŸ’αžšαž–αŸαž“αŸ’αž’αž›αžΈαžŽαžΆαž€αŸ‹ αžœαžΆαž˜αžΆαž“αž”αŸ’αžšαž—αŸαž‘ partitions αž‡αžΆαž…αŸ’αžšαžΎαž“ αžŠαžΌαž…αž‡αžΆαŸ– Reiserfs (the default one that SuSE 10.1 uses), ext3, zfx,… αŸ”αž›αŸ” αžαŸ’αž‰αž»αŸ†αž‡αŸ’αžšαžΎαžŸαž™αž€β€‹ ext3 αž€αŸ’αžšαŸ„αž™αž–αžΈαž”αžΆαž“αž’αŸ’αžœαžΎαž€αžΆαžšαžŸαŸ’αžšαžΆαžœαž‡αŸ’αžšαžΆαžœαž”αž“αŸ’αžαŸαž…αž”αž“αŸ’αž‘αž½αž… αž αžΎαž™αž…αŸ†αž–αŸ„αŸ‡αž—αžΆαž–αžαž»αžŸαž‚αŸ’αž“αžΆαž“αŸƒαž”αŸ’αžšαž—αŸαž‘ partitions αž‘αžΆαŸ†αž„αž“αŸ„αŸ‡ αžαŸ’αž‰αž»αŸ†αž–αž»αŸ†αž’αžΆαž…αžŠαžΉαž„αž…αŸ’αž”αžΆαžŸαŸ‹αž‘αŸαŸ”

ធូខេ αžŠαŸ„αž™αž–αž»αŸ†αž…αžΆαŸ†αž”αžΆαž…αŸ‹αž“αž·αž™αžΆαž™αž…αŸ’αžšαžΎαž“αž–αŸαž€ αž“αŸαŸ‡αž‚αžΊαžšαž”αŸ€αž”αžŠαŸ‚αž›αžαŸ’αž‰αž»αŸ†αž”αžΆαž“αž”αŸ’αžšαžΎαŸ–

αž”αŸ’αžšαžŸαž·αž“αž”αžΎαž•αžΆαž‘αžΈαžŸαžΉαž“ (partition) αžŠαŸ‚αž›αž’αŸ’αž“αž€αž…αž„αŸ‹αž αŸ’αžœαž˜αž˜αžΆαžαž”αžΆαž“αžαŸ’αžšαžΌαžœ mount αžšαž½αž…αž αžΎαž™ αž™αžΎαž„αžαŸ’αžšαžΌαžœ unmount αžœαžΆαž‡αžΆαž˜αž»αž“αŸ–

$ su
# umount /dev/hdc3

(αžαŸ’αž‰αž»αŸ†αž™αž€ /dev/hdc3​​ αž‡αžΆαž§αž‘αžΆαž αžšαžŽαŸ αž…αŸ†αž–αŸ„αŸ‡αž•αžΆαž‘αžΈαžŸαžΉαž“αžšαž”αžŸαŸ‹αž’αŸ’αž“αž€αž’αžΆαž…αž˜αžΆαž“αžˆαŸ’αž˜αŸ„αŸ‡αž•αŸ’αžŸαŸαž„)

αž”αž“αŸ’αž‘αžΆαž”αŸ‹ αž™αžΎαž„αž’αžΆαž…αž αŸ’αžœαž˜αž˜αžΆαžαžœαžΆαž‡αžΆβ€‹ αž”αŸ’αžšαž—αŸαž‘ EXT3αŸ–

# mkfs.ext3 /dev/hdc3 (αž…αžΆαŸ†αž’αŸ„αž™αžœαžΆαž’αŸ’αžœαžΎαž€αžΆαžšαž”αžΆαž“αž…αž”αŸ‹αžŸαž–αŸ’αžœαž‚αŸ’αžšαž”αŸ‹αž αžΎαž™)

αž˜αž»αž“αž“αžΉαž„αž™αžΎαž„αž’αžΆαž…αž”αŸ’αžšαžΎ αž•αžΆαž‘αžΈαžŸαž·αž“αžαŸ’αž˜αžΈαž“αŸαŸ‡αž”αžΆαž“ αž™αžΎαž„αžαŸ’αžšαžΌαžœ mount αžœαžΆαžŸαž·αž“αŸ” αž”αŸ‰αž»αž“αŸ’αžαŸ‚αž™αžΎαž„αžαŸ’αžšαžΌαžœαž˜αžΆαž“ αž€αž“αŸ’αž›αŸ‚αž„αžŸαŸ†αžšαžΆαž”αŸ‹ mount αž‚αžΊαž™αžΎαž„αž”αž„αŸ’αž€αžΎαž directory αžαŸ’αž˜αžΈ αž§αž‘αžΆαž αžšαžŽαŸβ€‹ storage:

# mkdir /storage
# mount /dev/hdc3 /storage

αž“αŸαŸ‡αž‚αžΊαž‘αžΈαž”αž‰αŸ’αž…αž”αŸ‹αŸ”β€‹ αž›αŸ„αž€αž’αŸ’αž“αž€αž’αžΆαž…αžŸαžΆαž€αž›αŸ’αž”αž„αž…αŸ†αž›αž„αž―αž€αžŸαžΆαžšαžŠαžΆαž€αŸ‹ αž•αžΆαž‘αžΈαžŸαž·αž“αžαŸ’αž˜αžΈαž“αŸαŸ‡αž˜αžΎαž› αžαžΎαžœαžΆαž˜αžΆαž“αžŠαŸ†αžŽαžΎαžšαž€αžΆαžšαžαŸ’αžšαžΉαž˜αžαŸ’αžšαžΌαžœαž¬αž’αžαŸ‹?

αž―αž€αžΆαžšαžŸαžΆαžšαž”αžΆαž“αžŠαž€αžŸαŸ’αžšαž„αŸ‹αž•αŸ’αž“αŸ‚αž€αžαŸ’αž›αŸ‡αŸ—αž–αžΈ αž‘αžΈαž“αŸαŸ‡αŸ”