Article submitted by Dean Serenevy. We are running out of articles! Please submit good articles about software you like!
You’ve heard of book and movie collection organizers, but Robby Stephenson’s tellico is a general purpose collection manager. This application can be used to store information about arbitrary collections of whatever tickles your fancy. Tellico is available from the tellico package in Debian since Sarge and in Ubuntu since Dapper. Tellico is a KDE application, but works fine in other desktop environments.
The BasicsLike any good book or movie collection application, tellico presents the user with a multi-pane window that groups entries by some customizable criterion (I’ve grouped by director below), lists entries by some fields (customizable), and shows thumbnails.
Selecting a list entry shows a more detailed view and a larger thumbnail. Clicking the image in this view launches your image editor.
Most of the built-in collection types include search sources to make adding new entries easy. Tellico has default search sources for Amazon.com (US, Japan, Germany, United Kingdom, France, and Canada), IMDb (movie database), z39.50 servers (bibliographic database), SRU servers (bibliographic database), PubMed (Medicine bibliography), CrossRef.org (bibliographic database developed by a consortium of publishers), and some others. You can also write your own script that performs the search and returns entries in a supported format.
The search box will filter results based on regular expression queries. Complex filters can be named and will be saved with the collection file.
Beyond Books and MoviesTellico’s built-in list of collection templates is already quite impressive. It provides default templates for books, bibliographies, videos, music, video games, coins, stamps, trading cards, comic books, and wines. However, users are free to modify, add, or remove fields in these collections or even create custom collections with arbitrary fields.
For example, I keep a collection of hyperplane arrangement examples in a custom tellico file. Tellico happily keeps a fully group-able and search-able record of my coefficient fields, polynomials, and other fields.
Editing a custom entry looks just like editing a standard record type. Fields are grouped by customizable categories.
Modifying the collection fields is wonderfully simple. Your fields may be any of several field types including: text, paragraph, choice, checkbox, table, URL, date, and image. Field upgrading is supported between compatible field types.
Fields may be auto-formatted as names or titles if you wish. You can also control whether the field should support auto-completion (using existing entries in your collection), multiple values, or whether the field should appear in the grouping combo box.
The paragraph field type supports basic HTML markup (used here in my bibliography collection). The red letters are KDE’s spell-check attempting to be useful.
I use the table field type in my recipe collection.
Beyond the ApplicationTellico can import and export data to and from many sources (Bibtex, CSV, PDF metadata, Alexandria, …). It can export your collections (even custom collections) to HTML and generate HTML reports in several styles. Tellico even has limited support for sending citations to OpenOffice.org Writer (though I have never used this feature).
Moreover, since Tellico stores its data in a fully documented XML file you can write XSLT or use any XML parser to transform the data file however you like.
Tellico supports loan tracking for any collection type. It also translated into more than ten languages.
The not so goodTellico is somewhat laggy when loading hundreds or thousands of images from disk and occasionally when switching from thumbnail view to entry view. However, switching between entries is always fine and collections with fewer images are quick and responsive.
AlternativesThere are many special-purpose collection managers (most of which are listed on the tellico homepage), but tellico is one of the earlier general purpose managers. Some applications (such as GCstar) are becoming more general-purpose as they mature. Others (such as Stuffkeeper) are simply younger applications and are not yet stable. Tellico is a well-designed application and therefore can give even the special-purpose collection managers a run for their money.
Article submitted by Paulus Esterhazy. Last article of 2008! We hope 2009 will be full of good articles about Debian and Ubuntu packages. But we can’t do it without your help, please submit good articles about software you like!
Have you ever wrestled with tar(1) and other Unix archive tools? Wondered why every tool has its own arcane syntax and nonstandard behavior? And why on earth is it impossible to use unzip(1) to unpack multiple archive files?
The good news is that, in the Unix universe, you can be sure that someone else has asked himself the same question before and, perhaps, solved it. And so it is. The atool package supplies a set of commands that hide the complexities and lets you work with compressed file archives in a sensible manner.
Arguably the most useful commands included are apack, aunpack and als which as their names suggest create an archive, and extract or list its contents. In addition, acat uncompresses an archive file and outputs the file contents to standard output, whereas adiff compares two archives and shows the differences between their contents. These commands work as you would expect them to, and the author has stuck to the Unix conventions where possible.
The details, however, are worth a look. Some examples:
Note that for each atool command the archive file name precedes the names of the files to add or extract on the command line. Compare aunpack -e archive1.tgz archive2.tgz and aunpack archive1.tgz file.txt.
As you can see, atool commands automatically determine the file type by looking at the extension, but they resort to using file(1) if the simpler heuristic fails (you can override the guess using the -F switch). Most commonly used archive types are supported, including tar+gzip, tar+bzip2, zip and rar; a notable omission in the version available in Debian Sarge and Ubuntu 8.04 is the relatively new LZMA compression format (lzma(1)), but the active upstream author has already added support for it. You can also extract a .deb package by forcing the ar archiving method using the switch -F a.
Atool is blessed with the virtue of simplicity and its options are explained in the helpful manpage, which thankfully doesn’t follow the Unix convention of leaving out examples. Here’s one last gem from the documentation. If you frequently work with archives you get from the internet, you probably follow this procedure: Check archive type, check that the archive contains a top-level directory, unpack the archive, change to the directory extracted. These steps can be combined by adding the following function definition to your $HOME/.bashrc or $HOME/.zshrc:
aunpack () {
TMP=$(mktemp /tmp/aunpack.XXXXXXXXXX)
atool -x --save-outdir=$TMP "$@"
DIR="$(cat $TMP)"
[ "$DIR" != "" -a -d "$DIR" ] && cd "$DIR"
rm $TMP
}
After adding these lines, you can “reload” the configuration file in your shell using source ~/.bashrc or source ~/.zshrc. Now running aunpack automatically changes the current directory to the one just extracted. Note that adding this snippet is necessary to achieve the desired behavior becausing a directory change is effectively useless unless it is performed in the context of the running shell.
Atool was written in perl by Oskar Liljeblad. It is available in all current Debian and Ubuntu releases. Besides atool, there are a few other tools that aspire to be the Swiss army knife of archivers, for example deco. These programs, however, are not as full-featured and mature as atool.
Article submitted by Kris Marsh. If you celebrate Christmas, you can give to Debian Package of the Day a nice present: a good article! :-)
Ever wanted to monitor a directory every second and see differences in filesizes per second? Or for that matter, run any program once a second and highlight differences in time? Well you can, and you have been able to since forever as it’s installed by default on the majority of Linux distributions. watch is part of the procps package, available in Debian and Ubuntu.
Here is an example for checking a directory:
watch ls -l
To highlight changes in each program run, you can use the -d flag:
watch -d ls -l
And to run the command every N seconds, use -nN (by default, watch runs every 2 seconds):
watch -n1 -d ls -l
Finally, to make the diff highlighting “sticky” (i.e. stay on permanently after a change is detected), use: -d=cumulative
Other examples:
watch -d=cumulative -n1 ls -lt /var/log
watch -n60 from
watch -n10 free -m
watch -n1 -d 'netstat -an | grep ESTABLISHED'
… you get the point. If you’re a system administrator, or just maintain Linux machines in general you’ll probably spot a bunch of places where you can use this straight away.
Article submitted by David A. Thompson. We’re running out of articles! If you like Debian Package of the Day please submit good articles about software you like!
Grumble… a postgresql server on an old Sun workstation isn’t visible to another old Sun workstation which (in theory…) is storing data on the postgresql server. The culprit was a misconfigured firewall. Rather than wading through a bunch of iptables commands, it seemed time to revisit the world of iptables front-ends on the off-chance there was an undiscovered treasure I’d missed on earlier visits. It turns out that there was one: ferm.
A revisit to firestarter, a straightforward GUI interface, ended when firestarter segfaulted and then, when started again, automatically started its firewall. Fortunately, I had altered the firestarter rule set and opened port 22 before firestarter segfaulted. Otherwise I would have been hundreds of miles away from an inaccessible server. After firestarter crashed again with a memory error, I decided to move on…
Like several other firewall front-ends, ferm is aware of the issues associated with working on servers hundreds of miles away from one’s physical location. Ferm starts with a default configuration which leaves the default SSH port open. Even better, ferm has a ‘try-before-you-buy’ feature (shared with a few other packages such as firehol): ferm --interactive activates a specific ruleset and, if a user response isn’t given within 30 sec, the system reverts to the previous ruleset.
Rather than using a GUI interface (e.g., firestarter, gnome lokkit, guarddog, kmyfirewall, knetfilter, …), ferm is configured via a text configuration file and can be controlled in a straightforward manner from the console. This may be a desirable feature for running on a box with limited disk space as GUI interfaces generally require the presence of X windows-related packages, often along with several KDE- or Gnome-related packages.
My main concern wasn’t with whether the application had a GUI or console interface but was with whether the application facilitated straightforward configuration of an iptables ruleset (translation: it shouldn’t take 20 min of reading documentation to get a simple firewall up). Other front-ends (e.g., shorewall and firewall builder) appear to be designed for complex rule-sets and require a substantial investment of effort to learn the syntax of configuration files or a ‘rule-making language’.
Along with ferm, another front-end, firehol seemed to also hit the mark with respect to having a straightforward syntax. Unfortunately, I found that firehol ended up being a time-consumer. In my experience, preparing a firehol configuration file which didn’t trigger multiple errors from firehol/iptables did not prove to be straightforward. In contrast, ferm gave me no such problems. A few tweaks of the default system configuration file - primarily opening a few ports -
proto tcp dport ssh ACCEPT; proto tcp dport http ACCEPT; proto tcp dport https ACCEPT; proto tcp dport postgres ACCEPT;
- and a simple /etc/init.d/ferm restart and things were running smoothly. Minimal effort, satisfying results…
The bottom line is that, for simple rulesets, using ferm is definitely easier than preparing iptables rules by hand. However, ferm can also be used to put together more complex firewall rulesets. It uses a reasonably powerful configuration language (including support for variables, function definitions, and arrays) which facilitates addressing more complex situations than the one I faced. To top it off, ferm seems to be under active development with bugs being squashed and features being added relatively regularly.
ferm has been available in Debian since Etch and in Ubuntu since Dapper.
Article submitted by Raman Pandarinathan. We’re running out of articles! If you like Debian Package of the Day please submit good articles about software you like!
As a parent, have you ever wondered if kids can use FOSS to have fun and learn at the same time? As a teacher, have you ever wondered how to teach using a computer and FOSS tools? The answer is gcompris.
Gcompris combines fun and learning. Each activity is designed and developed with creativity in mind, and it has a nice interface for children.
My children have learned some computer basics like mouse usage, it has also helped them to understand basic arithmetic, colour identification and many other things. Tuxpaint is also included, so children can draw to their imagination.
Gcompris is a collection of over 90 educational activities for children. The activities are classified into mathematics, computer discovery, puzzles, strategy games, amusement activities, experimental activities and reading activities.
MathematicsThis has more than 20 activities classified into calculations, geometry and numeration. The activities are planned to teach basic arithmetic, geometry, money usage, etc.
For example, below you can see a screen shot of an activity that consist in finding series of numerical operations. Here the final answer is 15 and should be derived in two steps. The child has to select the numbers and operators from the top and form equations to get the final answer.
PuzzlesThe puzzle activities include: drag and drop pieces to rebuild paintings, build a given shape with seven pieces, drive the crane and copy the model, tower of Hanoi, sudoku and the fifteen game.
Below is a screen shot of the Crane activity. The objects in the left grid should be placed in the same position as in the right side grid. The crane can be operated by clicking on the four arrows at the bottom.
Computer discoveryThese activities help children learn basic skills of computers. Bellow is a screen shot of the keyboard activity in which the child has to push the ball to Tux. In order to do it, both shift keys should be pressed simultaneously, as if pushing the ball with the hands. If they are pressed simultaneously the ball will travel in a straight line and reach Tux, if not the ball will drift and fall into the sea.
Strategy GamesSome of them are chess, arranging four coins in a row, bar game (don’t use the last ball), and oware (shown below).
Amusement ActivitiesThe amusement activities include Tuxpaint, a simple football game, and an animation creator.
Below is a screen shot of the animation creator. If you want to create an animation, you first select an image and put it somewhere. Then take a snapshot using the camera icon. Now move it to the next position and take another snapshot. Repeat until you reach the desired position. Finally click on the film icon and you’ll see the animation.
Experimental activitiesThis section lets the children learn various things which require thinking in a series of steps. Things like the water cycle and operating canal lock lets the child learn systemic thinking.
Below is a screen shot of the activity about the water cycle. First the sun raises, water evaporates and clouds are formed. When you click on the cloud it starts raining and the rain fills the water tank. Operating the water inlet gives Tux a shower.
DiscoveryThis section is about learning several common things like colour names, clock reading, symmetry, etc. The activity shown in the screen shot is about identifying colours: you must identify the colour from the name displayed.
Reading ActivitiesThese are activities about learning the letters, words and matching them with images. Reading can be practised both horizontal and vertical.
Below is a screen shot where the child has to drag and drop the image onto the correct name.
As part of my Linux Users Group activity, I give talks and demos about FOSS frequently. Whenever I see kids and parents among the audience, the first thing I do is to demonstrate gcompris, and it’s a sure hit. The kids love it and parents realize its educational value.
Here are some photos of one such event held in a public park at Chennai, India.
Pros and consThere is another similar package named childsplay - also available in Debian.
Availabilitygcompris was a part of Debian even in the Sarge days and it’s been in Ubuntu since Dapper (if not before!).
Article submitted by Justin Hamade. Guess what? We still need you to submit good articles about software you like!
Always wondering if your debian server needs an update? Apticron is a simple script that will email you when new versions of any package installed are available. This is very helpful for security related issues. The e-mail shows what has changed in the new version, obtained using apt-listchanges. It also tells you the repository where it comes from (ie. etch-security) and the urgency of the release (ie. high).
The configuration files are located in
By default emails are sent to root. If you want root emails sent to yourself you can add your email to root in /etc/aliases and run newaliases.
apticron will run daily and let you know each day if there is any packages that require updating. Here is an example of one of its e-mails:
apticron report [Sun, 08 Jun 2008 06:48:58 -0700]
========================================================================
apticron has detected that some packages need upgrading on:
myserver.mydomain.com
[ 192.168.1.1 ]
The following packages are currently pending an upgrade:
linux-image-2.6.18-6-686 2.6.18.dfsg.1-18etch5
linux-image-2.6-686 2.6.18+6etch3
========================================================================
Package Details:
Reading changelogs...
--- Changes for linux-latest-2.6 (linux-image-2.6-686) ---
linux-latest-2.6 (6etch3) stable-security; urgency=high
* Update to 2.6.18-6.
-- dann frazier Tue, 22 Jan 2008 22:47:16 -0700
linux-latest-2.6 (6etch2) stable-security; urgency=high
* The arm build of 6etch1 is missing from 4.0r1.
Since the latest security update of linux-2.6
(2.6.18.dfsg.1-13etch1)
requires this new ABI, and an updated linux-latest-2.6 facilitates
the
migration to the new ABI. Closes: #438617
— dann frazier Mon, 20 Aug 2007 17:01:18 -0600
linux-latest-2.6 (6etch1) stable; urgency=high
* Update to 2.6.18-5.
— dann frazier Thu, 24 May 2007 17:05:09 -0600
========================================================================
You can perform the upgrade by issuing the command:
aptitude dist-upgrade
as root on luxor.mcrt.ca
It is recommended that you simulate the upgrade first to confirm that the
actions that would be taken are reasonable. The upgrade may be simulated by
issuing the command:
aptitude -s -y dist-upgrade
–
apticron
cron-apt is a similar tool that can perform any action apt-get and aptitude can do. For example, it can automatically perform an upgrade when new packages available. However this is not recommend and can be a security risk.
apticron has been available in Debian since (at least) Etch and in Ubuntu since Dapper.
Article submitted by Olivier Schwander. Guess what? We still need you to submit good articles about software you like!
There are lots of different tools for managing your time: Mozilla has a standalone solution: Sunbird and another one based on Thunderbird: Lighting, KDE has Korganizer, and Gnome has the young gnome-agenda and the very popular Evolution, and we must not forget the most famous web based tool: Google Calendar.
All these applications are based on a graphical user interface, and use either iCalendar or the older vCalendar as the data formats.
What about people who prefer console based interfaces and want to edit the data with their favourite text editors? The best solution is remind: it uses an easy but powerful language for describing events. A simple example, this event happens every Tuesday at 13:00 and lasts one hour:
REM Tue AT 13:00 DURATION 1:00 MSG Group meeting
You always forget your appointments? Remind can help you:
REM Tue +1 AT 13:00 +120 *5 DURATION 1:00 MSG Group meeting
It will begin to bother you one day before the date, and will display warnings two hours before, every five minutes. The language is really powerful, and is able to express arbitrary complex date calculations (first Monday of a month, excluding holidays, moon phases). To look at the events of the day, simply run:
$ remind Reminders for Thursday, 10th July, 2008 (today): Write Debaday post today at 3:00pm
Remind can import and export iCalendar files, and generate HTML and Postscript from your calendar. You can choose to have reminders sent by email, or showed by a pop-up window but you’ll need to start remind with some special arguments for that, see the Remind FAQ at the 43folders wiki which has a lot of useful tips for remind.
You can also use it through user-friendly interfaces: tkremind, a Tk based front-end, but it hides some of the power from remind; and wyrd, a curses based interface which eases the editing of events and lets you use all of the power of remind.
AvailabilityRemind has been available in Debian since Sarge (perhaps even longer), and in Ubuntu since Dapper.
Article submitted by Cameron Dale. Guess what? We still need you to submit good articles about software you like!
Do you want to help out the Debian (or Ubuntu) project with some mirror bandwidth but don’t know how? Do you want to contribute somehow to Debian’s infrastructure, but you’re not a coder? Tired of getting slow download speeds when the mirrors are overloaded after a new release? Then Apt-P2P is for you.
After installing the apt-p2p package and making some minor changes to apt’s sources, all the files you download with apt (or aptitude, synaptic, gnome-apt, etc…) will be shared with other users, and any files you download will use other users (peers) to download from. However, if no other users have the file you want there’s no need to worry, Apt-P2P will happily fall back to downloading directly from the mirror so your download will not fail.
How it works
Apt-P2P is a daemon that runs in the background, responding to any requests from apt for files to download, and sharing any downloaded files with other users. The sharing is all done using HTTP, so it operates as both a server for the requests from apt and other peers, and as a client to download from other peers and mirrors. Also, if you go to http://localhost:9977/ in your browser on the machine Apt-P2P is running on, you will get a nice statistical display of what it is doing.
The main operation of Apt-P2P is the maintenance of a Distributed Hash Table (DHT) used to find and store peers to download from for each file. Whenever you download a file, apt-2p will first lookup the SHA1 hash of the file in the DHT. If it is found and has peers listed, then the downloading will occur from the peers (if there are only 1 or 2 peers, the mirror is used as well to speed up the download). If it is not found then the file is requested directly from the mirror. Once the download is complete, a new value is added to the DHT using the SHA1 hash of the file as the key, and including your contact info, so that other peers can then find you to download the file from.
That’s just a brief overview, but there are many hidden details that make things go smoother. For example, for larger files the SHA1 hashes of pieces of the file are stored in the DHT as well, which allows downloaders to break up large files among several peers to get better download speeds (similar to BitTorrent). For more information, you can go to the Apt-P2P home page: http://www.camrdale.org/apt-p2p/.
Comparison with other P2P programsOther than DebTorrent, there aren’t any other peer-to-peer downloaders available for apt. There was apt-torrent, but it was never packaged in Debian, and now seems to be dead (no updates in 18 months). Comparing Apt-P2P with DebTorrent, Apt-P2P:
Apt-P2P is available in testing (lenny) and unstable (sid), and will be available in Intrepid for Ubuntu. It can be installed by aptitude install apt-p2p.
First, it is VERY important to set up port forwarding if your machine is behind a firewall or router/NAT. The default port you need to forward is 9977, both UDP and TCP. More information on how to determine if you are reachable can be found here.
Setting up apt to use Apt-P2P as a proxy is easy, especially if you have used other proxy software (e.g. apt-proxy, apt-cacher, approx) in the past. The configuration change is the same, simply adding a localhost:9977/ to the front of the entries in your /etc/apt/sources.list file. For example, if you previously had this:
# Official deb http://ftp.us.debian.org/debian etch main contrib non-free deb-src http://ftp.us.debian.org/debian etch main contrib non-free # Security Updates deb http://security.debian.org/ etch/updates main contrib non-free deb-src http://security.debian.org/ etch/updates main contrib non-free # Unofficial deb http://ftp.debian-unofficial.org/debian etch main contrib non-free restricted deb-src http://ftp.debian-unofficial.org/debian etch main contrib non-free restricted # Backports deb http://www.backports.org/debian etch-backports main contrib non-free deb-src http://www.backports.org/debian etch-backports main contrib non-free
Then, if you only want to share the official and backported packages, you would change it to this:
# Official deb http://localhost:9977/ftp.us.debian.org/debian etch main contrib non-free deb-src http://localhost:9977/ftp.us.debian.org/debian etch main contrib non-free # Security Updates deb http://security.debian.org/ etch/updates main contrib non-free deb-src http://security.debian.org/ etch/updates main contrib non-free # Unofficial deb http://ftp.debian-unofficial.org/debian etch main contrib non-free restricted deb-src http://ftp.debian-unofficial.org/debian etch main contrib non-free restricted # Backports deb http://localhost:9977/www.backports.org/debian etch-backports main contrib non-free deb-src http://localhost:9977/www.backports.org/debian etch-backports main contrib non-free
Then, run an apt-get update and start installing packages.
The apt-p2p package is fairly new, so it’s available only in the testing and unstable distributions of Debian, and in the just released Intrepid Ibex, from Ubuntu.
Article submitted by Carlos López González. Guess what? We still need you to submit good articles about software you like!
For a long time 2D animation software has been dominated by proprietary software. Other common multimedia tasks such as video playing, editing, raster and vector 2D graphics and 3D graphics or animation are currently being covered properly by free software / open source (FOSS) but there wasn’t enough FOSS alternatives for computer aided 2D animation.
Synfig increases the 2D animation software available with a brilliant and professional piece of software.
Synfig was primary developed by Voria, an animation company founded by Robert Quattlebaum who was also the lead software engineer of the software. In 2004 Voria shut down and was discontinued. Fortunately Robert decided to license Synfig under the GNU GPL and turned it over the free software community to develop and use.
Synfig has no comparable alternative software in the FOSS world. Unlike other FOSS that can be used to produce 2D animation (ktoon, pencil) in the “traditional” frame to frame animation, the Synfig workflow is based on vector primitives and their interpolation in time. This drastically reduces the amount of work to produce professional animations because the manual tweening from pose to pose is eliminated, without the need to draw each frame individually.
But this is not the only feature of Synfig…
In Synfig, every primitive or transformation is parametrically generated, which gives extreme flexibility during animation and doesn’t restrict artistic expression. Also, those parameters are calculated on a float point basis obtaining smooth results at any size and any frame rate. Additionally it is possible to link any compatible parameter between any two or more different layers, even placed in different canvases or even convert most of the parameters into a mathematically calculated formula, this allows Synfig to produce particle effects, path based brushes, vectors dynamically linked to any place of a curve and other interesting stuff.
In Synfig there are an extensive set of primitives and transformation layers: Blurs (3), Distortions (6), Colour Filters (5), Fractals (2), Geometry Primitives (8), Gradients (6), Transform (3), Stylize (2) Text, Plant, Duplicate, etc. which provide a complete set of tools in the artist’s hand.
Finally in Synfig is easy to reuse libraries, group scattered layers to manage them like a single one, there are 22 different blend methods… If you want to dig synfig visit its web page. You can find there more info about the usage, the features and its development. Behind it, there is a small but friendly community.
All those features make Synfig a great application but it has also some weak points: there are some missing features not completely developed like the support of sound or saving and loading colour palettes.
On the other hand although the interface of Synfig-Studio can be strange for the first contact (most of the actions are found in the right click context menu), once you understand how it works it is very efficient. I’ve been working with it during last year and I’m completely in love with it. I only miss a quick render engine for editing animation because the current one is quite slow for a normal workflow.
Although it is relatively young it has definitely turned into a program that any 2D artist must have on their GNU/Linux box. It’s been available in Debian since Lenny and in Ubuntu since Feisty.
Storage is becoming cheaper and cheaper: you can find hard drives that cost less than a dollar per GiB. Buying an external hard drive to make backups (or even having a backup server) is a must if you value your work and what you have stored in your computer. However, doing backups should be easy enough to be done on a regular basis. The more automated, the better.
So, I find no excuse not to do regular backups and looked for a tool easy-to-use but powerful. rdiff-backup is a python script that helps doing local and remote incremental backups. To backup your $HOME to an external hard drive mounted in /media/backup simply do:
$ rdiff-backup $HOME /media/backup/home_backup
If after some days you want to backup your new files, run the same command to update the backup.
Now, in /media/backup/home_backup you have an exact copy of your home as it was when you did the last backup. If you want to restore a directory, you can just copy it:
$ cp -a /media/backup/home_backup/src/myprogram ~/src/
Which is equivalent to:
$ rdiff-backup --restore-as-of now /media/backup/home_backup/src/myprogram ~/src/
Of course, you can restore previous versions of the file. For example, to restore the source of myprogram as it was a mounth ago:
$ rdiff-backup --restore-as-of 1M /media/backup/home_backup/src/myprogram ~/src/
You can see all the incremental backups you have done executing:
$ rdiff-backup --list-increments /media/backup/home_backup
If you run out of space in your backup device and you’re sure you don’t need the backups you made three years ago, you can remove them with:
$ rdiff-backup --remove-older-than 3Y /media/backup/home_backup
rdiff-backup works exactly the same with remote directories. You need to have ssh access and rdiff-backup must be installed in the remote(s) machine(s). Note that in any example above, you can change the local directories to remote ones, so you can backup a remote machine locally, or do a backup of this machine to a remote backup-server. For example, say backup.mysite.org is your backup server. You can backup regularly using:
$ rdiff-backup local-dir/ user@backup.mysite.org::/remote-dir
If you use RSA or DSA authentication, you can even put that in a cron job.
See rdiff-backup documentation and other examples to discover all the functionality of this package.
Similar packagesFrontends for rdiff-backup:
There are a ton of other programs to make backups. I will list here some of them (but this list is no where near complete) that are similar to rdiff-backup:
Pros:
Cons:
rdiff-backup has been available in Debian since Sarge (perhaps even longer), and in Ubuntu since Dapper.
Article submitted by Todd Troxell. Guess what? We still need you to submit good articles about software you like!
This tool lets you discover what libraries and programs are using up memory. It is very simple to use. Here is an example of its output (the -w makes memstat not truncate lines at 80 columns):
gaius% memstat -w
256k: PID 5465 (/lib/ld-2.3.6.so)
368k: PID 13019 (/var/db/nscd/passwd)
3352k: PID 13914 (/usr/lib/gconv/gconv-modules.cache)
8k: /usr/bin/memstat 5465
12k: /lib/libcap.so.1.10 13019
256k: /lib/libncurses.so.5.5 13914
88k: /lib/ld-2.3.6.so 5465 13019
256k: /lib/libncurses.so.5.5 13019
1212k: /lib/tls/libc-2.3.6.so 13914
32k: /lib/tls/libnss_compat-2.3.6.so 13914
24k: /lib/tls/libcrypt-2.3.6.so 13914
12k: /lib/tls/libdl-2.3.6.so 13914
144k: /lib/tls/libm-2.3.6.so 13914
76k: /lib/tls/libnsl-2.3.6.so 13914
40k: /lib/tls/libnss_files-2.3.6.so 13914
36k: /lib/tls/libnss_nis-2.3.6.so 13914
60k: /lib/tls/libpthread-2.3.6.so 13914
28k: /lib/tls/librt-2.3.6.so 13914
88k: /lib/ld-2.3.6.so 13914
1212k: /lib/tls/libc-2.3.6.so 5465 13019
12k: /lib/tls/libdl-2.3.6.so 13019
144k: /lib/tls/libm-2.3.6.so 13019
76k: /lib/tls/libnsl-2.3.6.so 13019
480k: /bin/zsh-beta 13019
212k: /var/db/nscd/passwd 13019
788k: /usr/bin/irssi 13914
148k: /usr/lib/libpcre.so.3.12.0 13019
176k: /usr/lib/perl5/auto/Irssi/Irssi.so 13914
80k: /usr/lib/perl5/auto/Irssi/Irc/Irc.so 13914
80k: /usr/lib/perl5/auto/Irssi/UI/UI.so 13914
12k: /usr/lib/gconv/CP1252.so 13914
24k: /usr/lib/gconv/gconv-modules.cache 13914
76k: /usr/lib/libz.so.1.2.3 13914
584k: /usr/lib/libglib-2.0.so.0.1200.4 13914
1128k: /usr/lib/libperl.so.5.8.8 13914
12k: /usr/lib/libgmodule-2.0.so.0.1200.4 13914
1240k: /usr/lib/i686/cmov/libcrypto.so.0.9.8 13914
248k: /usr/lib/i686/cmov/libssl.so.0.9.8 13914
8k: /usr/lib/zsh-beta/4.3.2-dev-1/zsh/terminfo.so 13019
24k: /usr/lib/zsh-beta/4.3.2-dev-1/zsh/zutil.so 13019
56k: /usr/lib/zsh-beta/4.3.2-dev-1/zsh/compctl.so 13019
116k: /usr/lib/zsh-beta/4.3.2-dev-1/zsh/complete.so 13019
196k: /usr/lib/zsh-beta/4.3.2-dev-1/zsh/zle.so 13019
--------
13480k
This output lists many libraries and processes loaded into memory and their sizes. First of all, processes and the size of their private memory are listed. This does not include their shared memory. Afterwards, shared objects are listed, and finally the total is listed.
In case you are wondering, shared object are libraries like /lib/tls/libc-2.3.6.so that are shared across all processes that need them to save memory and make things run faster. Instead of loading this library into memory for every process, Linux loads one copy and uses this for any process that wants to use the library. Therefore, you may notice that these values sometimes do not add up to the amount of memory you see used on your system. If you look at top(1) you will see two columns related to memory: RSS and VSZ. For each process, RSS is the amount of memory used by the process, and VSZ is the amount used counting shared objects. To add up memory correctly, you must count each shared object only once for the system.
It is possible to output per user statistics by running memstat as an unprivileged user. When run as root, memstat will list everything on the system.
Memstat works by scanning files in /proc and then searching for binaries in the paths listed at /etc/memstat.conf. The default file should be sufficient for most cases. If you have libraries or binaries in a non-standard place, you may need to modify this file to get accurate results.
Memstat was authored by Joshua Yelon. It is available in all current Debian and Ubuntu releases.
Article submitted by Noel David Torres Taño. Guess what? We still need you to submit good articles about software you like!
One of the packages I manually install in every new installation is smartmontools. I’ve some expertise in managing computers and networks, and it is a fact that pirate hackers and software bugs are not the main cause of problems in small and medium installations. Hardware is.
Thus, you have hardware that can fails, and Murphy says that if it can fail, it will. The point is not to avoid hardware failures, which would be impossible, but to detect them early or even prevent them.
Particularly for hard disks, the tool in charge is smartctl from the package smartmontools. IDE disks (if they’re not of the age of dinosaurs) have an integrated self-testing tool called SMART which means “Self-Monitoring, Analysis and Reporting Technology”. Modern SCSI disks have it too if they’re SCSI 3 or newer. It happens that inside the disk chipset there are routines to check parameters of disk health: spin-up time, number of read failures, temperature, life elapsed… And all of those parameters are not only registered by the disk chipset, but they have designated security limits and both parameters and limits can be checked by software who access the disk using the appropriate I/O instructions.
And that software is smartctl, a piece of the smartmontools deb package. Of course, since they access the disk in a raw way, you need to be root to use these commands.
smartctl can ask the disk for its smart identification:
# smartctl -i /dev/sda smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF INFORMATION SECTION === Model Family: Fujitsu MHV series Device Model: FUJITSU MHV2060BH Serial Number: NW10T652991F Firmware Version: 00850028 User Capacity: 60,011,642,880 bytes Device is: In smartctl database [for details use: -P show] ATA Version is: 7 ATA Standard is: ATA/ATAPI-7 T13 1532D revision 4a Local Time is: Mon May 12 02:39:31 2008 CEST SMART support is: Available - device has SMART capability. SMART support is: Enabled
More interesting, smartctl can ask the disk for its parameter values:
# smartctl -A /dev/sda smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF READ SMART DATA SECTION === SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000f 100 100 046 Pre-fail Always - 124253 2 Throughput_Performance 0x0004 100 100 000 Old_age Offline - 18284544 3 Spin_Up_Time 0x0003 100 100 025 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 099 099 000 Old_age Always - 1199 5 Reallocated_Sector_Ct 0x0033 100 100 024 Pre-fail Always - 8589934592000 7 Seek_Error_Rate 0x000e 100 087 000 Old_age Always - 1761 8 Seek_Time_Performance 0x0004 100 100 000 Old_age Offline - 0 9 Power_On_Seconds 0x0032 079 079 000 Old_age Always - 10866h+57m+47s 10 Spin_Retry_Count 0x0012 100 100 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 1199 192 Power-Off_Retract_Count 0x0032 099 099 000 Old_age Always - 283 193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 6953 194 Temperature_Celsius 0x0022 100 100 000 Old_age Always - 45 (Lifetime Min/Max 14/58) 195 Hardware_ECC_Recovered 0x001a 100 100 000 Old_age Always - 62 196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 459276288 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x000e 100 082 000 Old_age Always - 22371 203 Run_Out_Cancel 0x0002 100 100 000 Old_age Always - 1533257648465 240 Head_Flying_Hours 0x003e 200 200 000 Old_age Always - 0
As you can see, there are some attributes marked as “Pre-fail”. If any of these attributes goes beyond its threshold, the disk is about to fail in hours, maybe minutes.
Even if there are more options to smartctl , the last ones I will comment here are -a and -t.
smartctl -t launches a disk test. It needs a parameter indicating the type of the test, and in the longest case it can last for tens of minutes and will check the electrical and mechanical performance as well as the read performance of the disk, going through all its surface. smartctl -a, in its turn, shows all available information about the disk, including self testing results. Since tests will span minutes or tens of minutes, we can not see them happening. All what we will get when launching tests is like:
# smartctl -t long /dev/sda smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION === Sending command: "Execute SMART Extended self-test routine immediately in off-line mode". Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful. Testing has begun. Please wait 41 minutes for test to complete. Test will complete after Mon May 12 05:44:03 2008 Use smartctl -X to abort test.
Here, we’re being informed that (maybe) we will get a slightly lower performance on the disk for the next 41 minutes, since the test has started. It is completely background, or better ‘underground’, since it does not happen under the kernel control at all: everything is happening internally to the disk, and all what we can get is the result.
smartctl -a, in turn, show a very large amount of SMART information about the disk: almost all stored SMART information parsed for us. It is usually better to use a more specific switch, see the man page for details.
Finally, I want to comment that there is a daemon in the smartmontools package, smartd, who can take care of doing tests for you. It works by running smartctl in a periodic way (typically every 30 minutes) and logging all errors and parameter value changes to the syslog. The default configuration in Debian will also mail root if there’s any problem detected. I will not explain here about it, because I want you to read its (short and easy) documentation, but remember that in order to use it you must enable it in /etc/default/smartmontools.
The smartmontools package has been available both in Debian and Ubuntu since a long time ago.
Article submitted by Andrew Caudwell
Logstalgia (inspired by glTail) is a website traffic visualization tool that replays or streams Apache access logs as a pong-like battle between the web server and an unrelenting army of requesting hosts. It is rendered using OpenGL, so you’ll need a 3D accelerated video card to run logstalgia.

Requests appear as colored balls (the same color as the host) which travel across the screen to arrive at the requested location. Successful requests are hit by the pong paddle while unsuccessful ones (such as 404s) are missed and pass through.
The paths of requests are summarized within the available space by identifying common path prefixes.
Related paths are grouped together under headings. For instance, by default paths ending in png, gif or jpg are grouped under the heading Images. Paths that don’t match any of the specified groups are lumped together under a Miscellaneous section. Groups can be customized to the page layout of your website fom the command line by specifying a heading, an associated regular expression and a screen percentage.
The simulation can be paused at any time by pressing space. While paused, individual requests can be inspected by passing over them with the mouse.
Logstalgia can read from either a file or standard input. To replay an apache log just run:
logstalgia /var/log/apache/access.log
You can combine Logstalgia with other tools like tail and ssh to watch the access.log of your web server in real time. eg:
ssh user@yourserver.com tail -f /var/log/apache/access.log | logstalgia -
Check out a video of Logstalgia in action:
Logstalgia is available in Debian since Lenny and in Ubuntu intrepid. A version of the package for Debian Etch is available on the homepage.
Article submitted by Toni Zimmer.
There will be a day when you need access to your Debian box from another place than home, for example to get files from your home server with scp or if you’re running a webserver, an irc proxy, a ftp server, a mail server…
Most likely your ISP gives you a dynamic IP address. This problem can be solved by getting a static DNS name, so you can connect to your home even if your IP keeps changing. First of all you have to create an account with your favourite dyndns provider. I use dyndns.org but there are others, such as easydns.com, dslreports.com or zoneedit.com. You can use others if you know ddclient supports its protocol.
There you can specify the hostname (combined with a domain name) for your computer. You can enable mail routing if you want to setup a home mail server.
When you install ddclient you will be asked for the dyndns service provider where you created your account. After that you must enter the complete (or fully qualified) domain name of your computer (something like dpotd.gotdns.org) and your account name (including the password, which will be stored in plaintext in /etc/ddclient.conf!). Now you have to chose the interface that connects you to internet. ddclient will get your IP address from there, so you shouldn’t be behind a NAT. Afterwards you will be asked if you want to start ddclient when connecting with PPP and if you want ddclient to run on system startup or not (probably you will use the first or the second choice). If you choose to run ddclient on startup, you can enter a delay between address checks (default are five minutes, so every five minutes your system will tell your current IP address to your dyndns service provider).
Your settings are stored in /etc/ddclient.conf and look like this:
# Configuration file for ddclient generated by debconf # # /etc/ddclient.conf pid=/var/run/ddclient.pid protocol=dyndns2 use=if, if=eth0 server=members.dyndns.org login=dyndnsloginname password='dyndnsloginpassword' dpotd.gotdns.org
If everything is okay, wait a couple of minutes for the DNS information to populate and then you will be able to do something like ssh dpotd.gotdns.org or w3m dpotd.gotdns.org
ddlient is available in Debian since Sarge and in Ubuntu (universe) since Dapper.
Article submitted by Anton Kavalenka.
Firebird SQL server is popular because it is free, open, lightweight and secure. Firebird is based on the Interbase SQL server, and can be accessed by the same client libraries.
FlameRobin is a X-platform GUI application that makes the life of Firebird/Interbase admins easier. It’s a very light-weight solution (implemented with wxWidgets) as opposed to Tora, which tries to be universal, but is very huge and takes a while to load. FlameRobin starts almost instantly, but being lightweight doesn’t mean to be poor in features. Some of them are:
Using Firebird and FlameRobin included in Debian it is possible to backup a database from Windows, restore it on Linux and take off SQL server load from workstation. This is the only way to move database between 32-bit and 64-bit architecture. It is a feature of Firebird (or maybe bug). On the same architectures database files can be simply copied.
The SQL Editor has syntax highlighting and auto-completion. SQL statements can be entered, load, saved and executed. You can prepare a query and view the execution plan without executing it.
FlameRobin is available in Debian since Etch and in Ubuntu since feisty.
Article submitted by Karl Erlandson. Do you think there are better alternatives to the packages posted here? Help us! Submit good articles about software you like!
No one likes to sit at home and wait for their favorite show to come on anymore and many have turned to buying hardware to record them for later viewing. Popular solutions to this problem include the expensive and proprietary TiVo and cable/satellite boxes with built-in TV recorders.
MythTV aims to solve these problems without the need to rent a cable box ($15/month) or buy a TiVo (~$200). An older computer can be used and all that needs to be purchased is a simple TV card, which can be found for under $30 on eBay. An HDTV card will cost you more, and will also require a more recent computer. If your TV card doesn’t come with a remote control, a controller will have to be purchased separately.
As of last year, the TV guide info used for MythTV in North America is no longer free. Unfortunately, if you live in the USA or Canada, you now have to pay a subscription fee if you want to access the TV guide info, but the cost is negligible at $20/year and going down with every new subscriber. There is a free trial period available. If you live in another country, you may find TV listings for your country in XMLTV.
Features
What MythTV gives you that those other boxes don’t is freedom, it’s open source so you can do whatever you want with your machine. For example, you can set it to automatically skip commercials (a feature that surprisingly works!).
MythTV can be divided into two main programs, the Backend and the Frontend. The Backend refers to the program that actually records programs and must be installed on a computer that has a TV tuner. The Frontend program allows you to view content from the Backend. Importantly, the Frontend program can be installed on the Backend or as a stand-alone program on any computer. With a Frontend only install, you can watch what you’ve recorded in any room of your house. They will also have the ability to watch live TV (with options to pause, rewind, fast forward).
MythTV also offers many recording options with the ability to record a show daily, weekly, once, only in a certain timeslot, etc. Since it is open source, various improvements have been added. An interesting plugin was developed that overcomes the problem of recording sports when games go on longer than scheduled. This program actually checks the web to see if the game it is recording has gone into extra time and adjusts the recording time to end later.
MythTV will organize your music and video libraries and allow all that downloaded content to be played on your home entertainment system. Album and DVD art can be automatically downloaded from IMDB. I have to say that the music system could use a lot of work.
Other options include the ability to schedule your recordings over the internet, watch your shows over the internet, display weather alerts, and notify you of new emails on screen.
MythTV is not available as a Debian package due to licensing/legal issues, but it is on debian-multimedia. To enable this repository, add this to your /etc/apt/sources.list:
deb http://www.debian-multimedia.org/ stable main
(instead of stable, put “testing” or “unstable” if you use that flavors of Debian). Now run apt-get update. The MythTV wiki provides instructions to install it in Debian stable (Etch), Debian unstable (Sid) and Ubuntu. The Ubuntu community has its own set of installation instructions. I found the KnoppMythWiki very useful in setting up my machine. They also offer a MythTV distribution.
Article submitted by Hugo Carrer.
As any other Debian user I love writing obscure commands on my terminal. I love too having so many open terminals that I have to come up with a special system to find the one where my favorite obscure command is running on.
To be able to enjoy this I need a very fast multitabbed terminal emulator: mrxvt.
Some of the things I like the most about mrxvt are for example,
After installing it would look something like this:
![]()
You can change this rather old fashioned look by copying the example config file from
/usr/share/doc/mrxvt-common/examples/mrxvtrc.sample.gz
And placing it in ~/.mrxvtrc
The file is full of comments helping you with the meaning of each option. Of course you can find all available options in the man page. Some useful shortcuts are Ctrl-shift-t to open a new tab and Ctrl-shift-m to show the menu.
So, after playing, trying and tweaking for a little while you can get a futuristic look for your terminals. Like this one of me sketching this article on an emacs session inside mrxvt (Note all those beautiful tabs up there)
Downsides? Well it depends on the kind of user,
To sum up, it’s the perfect application to config during those boring rainy weekends and then show off to your friends at work.
mrxvt is available in Debian stable and in Ubuntu too.
Article submitted by Raman Pandarinathan.
DevTodo is a simple command-line-based package to keep todo lists. Lists are prioritized and hierarchical. Each task in the list has a priority (very high, low, medium etc.) and a given task can be linked to another todo database, making the list hierarchical. The lists are stored as an XML file (.todo) in the current directory, so if you manage multiple projects, you can have different todo lists and DevTodo will update the information based on your current working directory.
As the Todo list is stored in an XML file, you can use an XSLT template to export it to other formats. In Debian, you can find templates to export to HTML and PDF in /usr/share/devtodo.
Managing your todo listsBasic commands are:
With the use of some small shell scripts, when you cd into a directory with a .todo in it, DevTodo can display the Todo items for that directory. There are scripts for bash and tcsh in /usr/share/doc/devtodo/examples. To enable it under bash, add this to your .bashrc:
if [ -f /usr/share/doc/devtodo/examples/scripts.sh ]; then . /usr/share/doc/devtodo/examples/scripts.sh fiPros and Cons
DevTodo is available in Debian since Sarge and in Ubuntu (universe) since Dapper.
EasyTag is a graphical utility to edit the descriptive ID3 tags for your music files. One will think primarily of MP3 files, but it also does other formats, such as Ogg, FLAC, MP4/AAC, MusePack, Monkey’s Audio files and WavPack files (APE tag).
EasyTag’s screen real estate is divided into three windows. The left window shows you the directories of your file system. The middle window shows you the music files in your currently selected directory. The right window is further subdivided into top and bottom information boxes: the top shows you the technical information about the file (bit rate, frequency, mode, size, and time), and the bottom shows you the actual ID3 fields.
The ID3 fields are pretty complete as they let you fill in all the relevant info you could want to put in, e.g., title, artist, album, year, genre, personal comments. You can also attach a photo to the file.
Once you start up EasyTag, it will search your home directory for any and all music format files. This behavior is either helpful or annoying; if it’s the latter, you can simply stop the search and go to the directory of your choice. It will resume the search from there.
Tagging filesThere are three ways to tag music files with EasyTag:
Manual tagging is pretty much self-explanatory (and tedious.)
Automatic Fill Tag relies on the filenames of your music files to automatically fill in the ID3 entries. EasyTag has a couple dozen formats that cover almost every imaginable case.
Automatic CDDB tagging only works if files are sorted per album and if the actual CDDB entry exists. You don’t actually have to have the CD on hand: you can search for the album ID through EasyTag. Once found, it will label the files for you.
All in all, a great way to manage and maintain information on your music files.
AvailabilityEasyTag is available in Debian since at least Sarge and in Ubuntu (universe) since Dapper.
Bonus article this week, submitted by Anthony Bryan and Tatsuhiro Tsujikawa.
If you’re a frequent downloader and comfortable on the command line, then you need to try out aria2. aria2 is a cross platform download utility, similar to graphical download managers except that it uses less system resources.
aria2 has a number of invaluable features such as download resuming, BitTorrent and Metalink support, segmented downloading, downloading a single file from one or multiple servers (including integrated BitTorrent and HTTP/FTP transfers), downloading many files at the same time, automatic error recovery/repair (BitTorrent and Metalink downloads only), etc.
aria2 is a command line application, but don’t let that scare you off. You can use aria2fe, a graphical front end, if that makes you more comfortable.
Keep in mind that aria2 is more for heavy downloading, and if you want a webspider then wget would be a better choice.
How to use itThe easiest way to invoke aria2 is by typing aria2c URL/fileName
$ aria2c http://host/image.iso
The URL can be either a regular URL to a file, a URL to a .torrent file, or a URL to a .metalink file. For BitTorrent and Metalink downloads, there are extra options available such as throttling upload speed, only downloading selected files, changing listening ports, and seed time and ratio. To pause a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory.
Downloading identical files from multiple sourcesaria2 supports multiple URLs for the same file. You can specify them on the command line (space separated) and aria2 will download from multiple URLs at the same time.
$ aria2c http://host/image.iso http://mirror/image.iso
This command will split the download between multiple servers. aria2 can even download the same file from BitTorrent and FTP/HTTP at the same time, while the data downloaded from FTP/HTTP is uploaded to the BitTorrent swarm.
Repairing damaged downloadsaria2 can repair downloads with errors by using the information in .torrent or .metalink files.
$ aria2c -M test.metalink --check-integrity=true
The -M option specifies a local file called test.metalink to get the information to repair the download.
Parameterized URLsYou can specify set of parts. The following command will download part of the same file from 3 servers, don’t forget to escape the parameter to avoid shell expansion.
$ aria2c -P 'http://{host1,host2,host3}/file.iso'
You can specify numeric sequence using []. This command will download image000.png through image100.png from the same server.
$ aria2c -Z -P 'http://host/image[000-100].png'
The -Z option is required if the all URIs don’t point to the same file, such as the above example.
Other optionsaria2 has a lot more options, you can for instance use:
aria2 has many other options. To read the man page, type:
$ man aria2cAvailability
aria2 is available on most Linux distributions. Official Debian and Ubuntu package are available:
Community & developersaria2 is actively maintained and developed by Tatsuhiro Tsujikawa. Bug reports, feature requests, and forums are found on SourceForge.
LinksArticle 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:
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-ReminderEvent 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:
AvailabilityEmail-Reminder has been in Debian since Sarge and in Ubuntu since Dapper. It is licensed under the GPL.
More InformationYou 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!
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 accountFirst 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 aiccuNow 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 systemYou 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 issuesNote that all your IPv6 traffic will be directed through the broker, so you have to take care of the security.
IPv6 contentCheck 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!
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!
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.
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 below (note: see the commented lines —be sure to try each of them out sometime)
### Uncomment the following line if you want to use the "command not found" Ubuntu command #. /etc/zsh_command_not_found ### These are a really nice view of the command line. If you do not like it, comment all lines. PS1='\033[30;47m\u:\w>\033[0m ' prompt='%U%n%u:%B%~%b# ' PROMPT2='%_> ' echo "\e[1;9]\e[8]" RPS1='< %U%m%u >‘ ### General config sets LS_COLORS=’no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33; 01:ex=01;32:mi=5;31;46:or=5;31;46:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;3 2:*.bat=01;32:*.deb=01;31:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh= 01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=0 1;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.ppm=01;35:’ LS_OPTIONS=”-