Search

email-reminder: Never forget a birthday or an anniversary again!

July 13th, 2008 edited by Tincho

Article submitted by François Marier. Guess what? We still need you to submit good articles about software you like!

Email-Reminder is a simple tool to define events for which you want to receive a reminder by email. These reminders (sent out daily by a small cronjob) can be either on the day of the event and/or a few days beforehand.

Events can be:

  • birthdays
  • anniversaries
  • weekly, monthly and yearly events

Sample Reminders

Here is an example of what you get in your inbox for an upcoming birthday:

From: Email-Reminder
Date: Tue, 12 May 2007 04:00:22 -0400 (EDT)
To: Francois Marier <fmarier@gmail.com>
Subject: Trent Reznor’s birthday

Hi Francois,

I just want to remind you that Trent Reznor is
turning 42 in 5 days.

You can reach Trent Reznor at trent@example.com.

Have a good day!

–
Sent by Email-Reminder

And here is one on the day of an anniversary:

From: Email-Reminder
Date: Tue, 29 Jul 1996 04:00:11 -0400 (EDT)
To: Francois Marier <fmarier@gmail.com>
Subject: 15th anniversary of Prince Charles and Lady Diana

Hi Francois,

I just want to remind you that the 15th anniversary
(Crystal) of Prince Charles and Lady Diana is today.

Have a good day!

–
Sent by Email-Reminder

Event Definition

Events for each user are defined in an XML file (~/email-reminders) in that user’s home directory, click here to see a sample file. You don’t actually have to define each event by hand in the XML file though. Email-Reminder comes with a simple GTK user interface:

email-reminder GUI 1 email-reminder GUI 2

Availability

Email-Reminder has been in Debian since Sarge and in Ubuntu since Dapper. It is licensed under the GPL.

More Information

You can find out more about Email-Reminder by visiting its homepage and subscribing to its news feed.

If you want to get involved, see the roadmap and feel free to contribute some patches!

Posted in Debian, Ubuntu | 6 Comments »

aiccu: add IPv6 connectivity to your machine

July 6th, 2008 edited by Alexey Beshenov

Article submitted by Caspar Clemens Mierau. Guess what? We still need you to submit good articles about software you like!

It’s time: no reason should prevent you from adding IPv6 connectivity to your machine. Of course it’s still an issue, as most ISPs don’t provide native IPv6. So in most cases the easiest way for you is to set up a tunnel to an IPv6 broker. There are currently several free brokers. I’ll show a simple way of getting IPv6 connectivity with the aiccu and SixXS.

Apply for an account

First you have to apply for an account on SixXS. Please note: as a kind of ISP, Sixxs really need valid information from you. You may give them a link to your Xing or LinkedIn profile.

Your application will be checked and (probably) approved. Wait for the mail. After that go to the SixXS website, request a new tunnel, and pick an entry point near you. This step also needs to be approved. Wait for the mail (it takes up to a day).

Set up aiccu

Now let’s get it running. Install the package aiccu (apt-get install aiccu). During installation you will be asked, which broker you are using. SixXS is already preconfigured, so choose it and input your account information. If everything is fine, aiccu will check SixXS and ask for your tunnel information.

Open a terminal and run ifconfig sixxs—it should show a new network interface with an IPv6 address. Now let’s check IPv6. Open Firefox and go to http://www.kame.net/. If the turtle logo is moving, your are using IPv6, if it does not, you don’t.

The SixXS credit system

You should understand the SixXS credit system. It’s used to limit users in repeating bad actions and to make sure they maintain their tunnels. For example if a static tunnel is down it will cost you some credits, thus you better keep it up. One could see the credit system as a bank, you got a credit limit and you can’t go over it and buy everything you want, but when you earn credits because your tunnel is up you can do a lot with it.

Security issues

Note that all your IPv6 traffic will be directed through the broker, so you have to take care of the security.

IPv6 content

Check http://www.sixxs.net/misc/coolstuff/ for interesting IPv6 content: high traffic news servers, the IPv6 freenode server and so on. Always keep in mind, that not every application is ready for IPv6 and many applications need to be configured for IPv6. With Debian/Ubuntu you should be able to use at least Firefox, Thunderbird, Pan, and Irssi.

aiccu is available in Debian since Etch, and in Ubuntu since Feisty

Happy networking!

Posted in Debian, Ubuntu | 9 Comments »

Debian- administration .org on rinetd

July 2nd, 2008 edited by Tincho

Unusual non-article ahead:

Debian-administration.org has a nice article about rinetd entitled “Easily forwarding arbitrary TCP connections with rinetd”, go and check it, it is an interesting package I didn’t know about!

Posted in Debian, Ubuntu | Comments Off

file: classify unknown files on the console

June 29th, 2008 edited by Alexey Beshenov

Article submitted by Caspar Clemens Mierau. Guess what? We still need you to submit good articles about software you like!

Somebody just sent you a mail with attachments that don’t have usable file extensions so you don’t really know how to handle them. Audio file? PDF? What is it? The same problem might occur after a file recovery, on web pages with upload features, etc.

While you can try to give the file an extension and open it with a software you think might be suitable, the better way is to let your computer find out what is all about. As a GNU/Linux user you probably already think “There is surely a command line tool for this”. Of course there is: the file by Ian Darwin.

It often gets automatically installed by dependencies. In any case, aptitude install file will help you. file depends on libmagic which provides patterns for the so called “magic number” detection.

Let’s assume we have the following directory with unknown files:

$ ls -l
total 2152
-rw-r--r-- 1 ccm ccm    4118 2008-03-30 06:32 unknown.0
-rw-r--r-- 1 ccm ccm   10220 2008-05-06 02:23 unknown.1
-rw-r--r-- 1 ccm ccm   12693 2008-05-06 02:23 unknown.2
-rw-r--r-- 1 ccm ccm   25933 2007-10-26 07:41 unknown.3
-rw-r--r-- 1 ccm ccm    2121 2007-10-26 07:41 unknown.4
-rw-r--r-- 1 ccm ccm     185 2007-10-14 20:14 unknown.5
-rw-r--r-- 1 ccm ccm 1189011 2008-05-17 22:37 unknown.6
-rw-r--r-- 1 ccm ccm  824163 2008-02-02 05:02 unknown.7
-rw-r--r-- 1 ccm ccm   82367 2007-09-20 06:18 unknown.8
-rw-r--r-- 1 ccm ccm    8872 2006-04-24 12:43 unknown.9

Now we want to know what’s inside those black boxes. Therefore we just call file * on the console:

$ file *
unknown.0: XML
unknown.1: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
unknown.2: ASCII C program text
unknown.3: PDF document, version 1.4
unknown.4: LaTeX 2e document text
unknown.5: perl script text executable
unknown.6: gzip compressed data, from Unix, last modified: Wed Oct  8 16:27:09 2003
unknown.7: Ogg data, Vorbis audio, stereo, 44100 Hz, ~192003 bps, created by: Xiph.Org libVorbis I (1.0)
unknown.8: PNG image data, 492 x 417, 8-bit/color RGBA, non-interlaced
unknown.9: HTML document text

Hey, that’s all. Pretty impressive, isn’t it? file does even not only distinguishes binaries and text files, it even tries to guess what programming language a text file is written in. And the magic is not that much magic: for example, in case of the ZSH script it just sees a shebang pointing to the zsh in the first line of the file, a PDF file typically starts with “%PDF” and so on. It’s all about patterns.

file provides you with some command line options that make it’s usage even more helpful. The most interesting is -i as it prints out MIME-types instead of verbose file types. If you are a web developer and want to know the exact MIME-type for a file download, this can save you a lot of time:

$ file -i *
unknown.0: text/xml
unknown.1: application/x-object, not stripped
unknown.2: text/x-c; charset=us-ascii
unknown.3: application/pdf
unknown.4: text/x-tex
unknown.5: application/x-perl
unknown.6: application/x-gzip
unknown.7: application/ogg
unknown.8: image/png
unknown.9: text/html

Great, isn’t it? The Apache web server also uses libmagic for this purpose. With file you just use a wrapper for the same task.

file is available in Debian and Ubuntu for a long time.

Posted in Debian, Ubuntu | 8 Comments »

zsh: a REALLY nice alternative for bash

June 18th, 2008 edited by Tincho

Article submitted by Danilo Martins. Guess what? We still need you to submit good articles about software you like!

After years using ZSH instead of BASH, I still don’t understand why isn’t everybody using it. ZSH is a complete shell that will certainly make your life easier. Give it a try.

First of all, you need it installed (duh). APT and its super cow powers will do this for you. You can simply use:

$ sudo apt-get install zsh

and you should be all set. Alternatively, you can install the package “zsh-beta”, but it tends to crash once in a while… ZSH is available on any repository of Debian and Ubuntu.

To try it out, you can simply type zsh, but you wouldn’t be very happy with the result. Let’s personalize it first. First of all, create a file named .zshrc on your home directory. Inside, you should put the text listed here (note: see the commented lines —be sure to try each of them out sometime)

Editor’s note: I’ve moved the sample script to a separate link, to ease cut&paste. Also, note that if you run zsh from Debian testing/unstable for the first time without a .zshrc file, it will greet you with an initial configuration dialog.

Now do run zsh. If you see a different prompt (specially if you did not comment the prompt lines on the .zshrc example above), it’s working. Now, it’s time you see what you can do with this.

First example. Lets suppose you’re doing a long command (cat /etc/mailcap | grep "^audio" | sed s/mplayer/gmplayer) and forget the command syntax for the sed program. You simply move your cursor to the command “sed” and press ALT-H. This should open the man page for sed. After you close the man page, you will automatically be returned with the command you were typing.

Second example. You’re connecting to a remote host using SSH. You remember that you want to use the X11 forwarding, but you don’t remember how to do this. Then, you type “ssh -” and press TAB. Yes, ZSH auto-completes not only files, but also command parameters. Be sure to try it out with whatever command you want to use.

Third example. You have a SSH key to a remote host, and you wish to copy a file from there using SCP. But you do not remember exactly where the file is. You simply type “scp user@remotehost:/home/myuser/myf”, press TAB and watch ZSH doing its amazing trick. Not only ZSH auto-completes files and parameters, but also remote files (remember that for this to work you need to have the RSA/DSA key on the remote host).

Fourth example. You want to install a Debian package (I love this one), but you don’t remember (or are too lazy to) type the whole name of the package. Instead, you simply type “apt-get install mysql-client” and press TAB, and watch ZSH magically auto-completing the package name. If you have more than one, it will list all available below, and if you keep pressing TAB it will complete through each one of them, one at a time. And yes, not only ZSH auto-completes files, parameters and remote files, but it also auto-completes package names. Well, I think we had enough of the “auto-complete” examples, didn’t we?

Fifth example. Yesterday you used a loooooong command and you are too lazy to type it all again. You also do not want to press UP until it appears. Instead of it, you simply type the beginning of the command and try the ALT-P combination. ZSH will auto-complete your command from the history. You can keep using ALT-P and swapping to the previous entries. If you missed it, ALT-N gets you to the next.

Last example. You typed apt-gey install foo bar foo2 bar2 foo3 bar3 foo4 bar4 ... foo239 bar239 and pressed ENTER. Oh, shit, apt-gey does not exist. Instead of pressing UP, HOME, going to “gey” and changing it to “get”, you can simply use ^gey^get. This is a shortcut to “repeat the last command, but all occurrences of “gey” are now “get”.

If you liked the way ZSH works and want to use it as your default shell, you can always use the chsh command, and put /usr/bin/zsh there. It’s now your default shell.

Enjoy!

Posted in Debian, Ubuntu | 34 Comments »

« Previous Entries Next Entries »