Mar 30, 2009

Mail notification for Mutt (and Gmail, Thunderbird, and etc)

I've introduced basic configuration for Mutt in recent posts. But we still have a problem: how do I get notified when I have new mail?

Gmail users might also have similar problem. We certainly don't want to login to Gmail every 2 minutes. Of course gtalk can solve this problem. But what if one has several Gmail accounts, or even have Gmail AND Yahoo accounts? (If you don't use Mutt, you can directly go to the Mail Notification part)

First, we need to let fetchmail to download new mails every, say, 5 minutes. This could be done by setting up a crontab job. Edit the crontab list in your terminal:

crontab -e


Then add the following line.

*/5 * * * * fetchmail -v >/dev/null


"*/5" means fetchmail will run every 5 minutes, and the part after ">" means there won't be any output.

OK, now fetchmail will download your emails automatically.

Mail Notification

The extra software you need to install is Mail-Notification.

sudo apt-get install mail-notification


You can run it from System -> Preference -> Mail Notification. In the Mailbox list, you can add your Mutt's mbox type mailboxes. Remember to check "Auto start Mail Notification upon session opening". Now once there is new mail in your mailboxes, a notification will appear in the status area.



Note that "Mail Notification can monitor multiple mailboxes concurrently, and supports Evolution, Gmail, IMAP, Maildir, mbox, MH, Mozilla products (Mozilla, SeaMonkey, Thunderbird, …), POP3, Sylpheed, Windows Live Hotmail and Yahoo! Mail mailboxes." (Description and screenshot are from http://www.nongnu.org/mailnotify/)

So, if you are a Gmail user, you can also use Mail Notification to check if there's new mail in the server. This is really a handy software.


Mar 29, 2009

How to hide menu and tool bar in GVim

By default, GVim has a menu and tools bar, like this:

But most of the time, the reason why people use GVim or Vim is that they don't need to use mouse - the powerful keyboard shortcut is enough for an efficient editing. So it seems like a waste of space to have this menu and tools bar. Here I will introduce a tip to hide the menu and a keyboard shortcut to recall it.

In your .vimrc file, add the following lines.

"Toggle Menu and Toolbar
set guioptions-=m
set guioptions-=T
map <silent> <F2> :if &guioptions =~# 'T' <Bar>
\set guioptions-=T <Bar>
\set guioptions-=m <bar>
\else <Bar>
\set guioptions+=T <Bar>
\set guioptions+=m <Bar>
\endif<CR>


The next time you use GVim, it will automatically hide the menu bar. And you can use F2 to recall it and hide it again.


Note that you can change the second and third lines to the following(with a "+" sign), and GVim will start with a menu bar and you still can toggle with F2 key.

set guioptions+=m
set guioptions+=T

Mar 28, 2009

Ubuntu guitar software for guitarist

I play a little guitar. Yesterday I came across a problem: how do I play gp5, gp4 or ptb in Ubuntu? In Windows, we have Guitar Pro, which is not free, but I think it's an easy job to get a serial number...But how about in Ubuntu?

The answer is Tuxguitar.

With TuxGuitar, you will be able to compose music using the following features
  • Tablature editor
  • Score Viewer
  • Multitrack display
  • Autoscroll while playing
  • Note duration management
  • Various effects (bend, slide, vibrato, hammer-on/pull-off)
  • Support for triplets (5,6,7,9,10,11,12)
  • Repeat open and close
  • Time signature management
  • Tempo management
  • Imports and exports gp3,gp4 and gp5 files
Here's the screenshots:
http://www.tuxguitar.com.ar/screenshots.html


When I installed the Tuxguitar, there's a soundbank error. The solution is already on the website:
http://www.tuxguitar.com.ar/tgwiki/doku.php?id=doc:error_soundbank

Other than Tuxguitar, I'd like to introduce another useful software Gtick. This is not only for guitarist.
http://www.antcom.de/gtick/

Gtick supports different meters (Even, 2/4, 3/4, 4/4 and more) and speeds ranging from 10 to 1000 bpm. It's really useful for beginner musicians.


Mar 27, 2009

Install Ubuntu 9.04 (Jaunty Jackalope) Beta in your virtual machine

Well, Ubuntu 9.04 beta is out. But as a Linux newbie, I don't really want to install it directly in my computer -- it's still a beta version. So a good idea to experience while it's still hot is to install it in a virtual machine. Here's a step by step guide:

Install Virtualbox

A complete community document could be found at:
https://help.ubuntu.com/community/VirtualBox


OK, let's get started. Run the following command:

sudo apt-get install virtualbox-ose
sudo apt-get install virtualbox-ose-modules-`uname -r`
sudo adduser $USER vboxusers
sudo apt-get install util-linux


The document mentioned something about module problem for kernel version 2.6.24-22 or higher, which is no longer a concern.

Then logout and relogin.

Install Ubuntu 9.04 in Virtualbox

If you have a multi-core CPU, start virtualbox this way. In your terminal:

taskset -c 1 virtualbox


This will force virtual box to use only one core.

In the virtualbox, click "New", then name your virtual machine. In the OS type menu, select "Linux 2.6".

Then you need to assign memory to your virtual machine. I give it 512M out of my 2G memory. And I selected dynamic size virtual hard drive. This is pretty much it. Other things are quite straight forward.

Before you start your virtual machine, in "CD/DVD mount" section on the right, mount the Ubuntu 9.04 iso, which can be downloaded here.

Then press start, and enjoy!

Mar 26, 2009

Ubuntu 9.04 is out today!

Although it's not out yet...Check out their website later today.

Link.

Mar 25, 2009

Multiple Inbox View in Gmail


Gmail is probably the best webmail so far. Now it is possible to have multiple inboxes view through a new Gmail Lab application: Multiple Inboxes.

Just go to setting -- Labs, enable the
Multiple Inboxes application, the n save setting. When you get back to the inbox view, you'll see three inboxes awkwardly lie there...Then go to the setting -- Multiple Inboxes. Here you can define what kind of inboxes do you want, and the layout you want.

For example, you can type "label:Important" in Pane 0, then all the emails labeled as Important (you can set a filter to auto apply label to incoming messages) is displayed in a seperate inbox in the inbox(es) view.

For the layout, I recommend Below the inbox.

Enjoy!

Mar 24, 2009

Linux Kernel 2.6.29 Released !


Original Link

Here's the full article:

Quote:
"It's out there now, or at least in the process of getting mirrored out.

The most obvious change is the (temporary) change of logo to Tuz, the Tasmanian Devil. But there's a number of driver updates and some m68k header updates (fixing headers_install after the merge of non-MMU/MMU) that end up being pretty noticeable in the diffs.

The shortlog (from -rc8, obviously - the full logs from 2.6.28 are too big to even contemplate attaching here) is appended, and most of the non-logo changes really shouldn't be all that noticeable to most people. Nothing really exciting, although I admit to fleetingly considering another -rc series just because the changes are bigger than I would have wished for this late in the game. But there was little point in holding off the real release any longer, I feel.

This obviously starts the merge window for 2.6.30, although as usual, I'll probably wait a day or two before I start actively merging. I do that in order to hopefully result in people testing the final plain 2.6.29 a bit more before all the crazy changes start up again.

Linus"

Mar 19, 2009

Funny Video: road to erotic comics...

Check this out...Although it's not about Linux...



Great, huh? Anyway, here's an useful tip if your are interested.

In your .bashrc file, add the following line:

alias ins="sudo apt-get install"

Then when you need to install something, just type:

ins something

However the bad thing is that when you're TABing if you're not sure about the package name, there won't be any suggestion.

You can also alias other frequently used commands like:

ls -al

Mutt Color Configuration

Since Mutt is a text based email client, it doesn't have fancy themes like Evolution, Thunderbird. But one can still configure the color theme for better viewing experience.

Configuration of Mutt's color theme is pretty easy. Just follow this style:

color [object] [foreground] [background]


Here is a color theme I developed. It contains color for index, pager (including header, seven level of quoted message), marker, highlight of Email address and link location, and etc.

Enjoy!


# Colours for items in the index
color index brightcyan black ~N
# Hmm, don't like this.
#color index brightgreen black "~N (~x byers.world)|(~x byers.x)|(~x langly.levallois123.axialys.net)|(~x the.earth.li)"
color index brightyellow black ~F
color index black green ~T
color index brightred black ~D
mono index bold ~N
mono index bold ~F
mono index bold ~T
mono index bold ~D

# Highlights inside the body of a message.

# URLs
color body brightgreen black "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*"
color body brightgreen black "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
mono body bold "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*"
mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"

# email addresses
color body brightgreen black "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
#mono body bold "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"

# header
color header green black "^from:"
color header green black "^to:"
color header green black "^cc:"
color header green black "^date:"
color header yellow black "^newsgroups:"
color header yellow black "^reply-to:"
color header brightcyan black "^subject:"
color header red black "^x-spam-rule:"
color header green black "^x-mailer:"
color header yellow black "^message-id:"
color header yellow black "^Organization:"
color header yellow black "^Organisation:"
color header yellow black "^User-Agent:"
color header yellow black "^message-id: .*pine"
color header yellow black "^X-Fnord:"
color header yellow black "^X-WebTV-Stationery:"
color header yellow black "^X-Message-Flag:"
color header yellow black "^X-Spam-Status:"
color header yellow black "^X-SpamProbe:"
color header red black "^X-SpamProbe: SPAM"


# Coloring quoted text - coloring the first 7 levels:
color quoted cyan black
color quoted1 yellow black
color quoted2 red black
color quoted3 green black
color quoted4 cyan black
color quoted5 yellow black
color quoted6 red black
color quoted7 green black


# Default color definitions
#color hdrdefault white green
color signature brightmagenta black
color indicator black cyan
color attachment black green
color error red black
color message white black
color search brightwhite magenta
color status brightyellow blue
color tree brightblue black
color normal white black
color tilde green black
color bold brightyellow black
#color underline magenta black
color markers brightcyan black
# Colour definitions when on a mono screen
mono bold bold
mono underline underline
mono indicator reverse


Related Links:
Multiple accounts in Mutt
Mutt Tutorial

Mar 18, 2009

HOWTO: Remember the Milk in Ubuntu

Remember the Milk (RTM) is a popular getting things done (GTD) website. It could also be accessed from Ubuntu desktop. Here's how.

TasqueTasque is a software in Linux, which support RTM. However, it is not included in default Ubuntu source. So you need to add the following source:

deb http://ppa.launchpad.net/tasque-packagers/ubuntu hardy main

To add the source, visit System-Administration-Software Sources-Third Party Sources-Add

Then install it in terminal

sudo apt-get install tasque


Ok. The following are easy, just login via Tasque.

Screenlets
You can also put RTM on your desktop. Here's how.
1. Install latest screenlets. The deb package could be downloaded here.
2. In the screenlets configuration window, click install and choose Convert Web Widget. then copy the following to the box:

<script src="http://gmodules.com/ig/ifr?url=http://www.rememberthemilk.com/services/modules/googleig/rtm.xml&up_showNoDue=false&synd=open&w=320&h=300&title=Remember+The+Milk?=all&country=ALL&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>

3. If there is an error about gtkmozembed, run the following command

sudo apt-get install python-gnome2-extras


Ok. Done.



Mar 17, 2009

Various Linux related Cheat Sheets

It is always easier to have cheat-sheet by hand, isn't it? Here I collected some popular Linux software (Linux/Unix basic commands, LaTeX, Emacs, Mutt, Ubuntu, Vim) cheat-sheets for your reference, as follows.

Latex cheat sheet
Vim cheat sheet
Linux/Unix command cheat sheet
Ubuntu cheat sheet
Emacs cheat sheet
Mutt cheat sheet

Link
(It's in my domain. Don't worry.)
Welcome to Non-geek's
Linux Handbook!

or if you will, Linux Cookbook.

Read my READY-TO-USE
RECIPE-LIKE
tutorials on Linux applications~

Subscribe if you are willing to follow.

If you find the post useful, please click the donate button on the upper right corner. Any amount is useful.