Search

unclutter: hide the mouse cursor after a period of inactivity

March 27th, 2007 edited by lucas

Entry based on submissions from Oliver Kiddle, Tore Morkemo and Gwern Branwen. Yes! Three independent readers wrote about it, it must be good :-)
Remember, DPOTD needs your help, please contribute !

Do you ever find that occasionally the mouse pointer obscures just the bit of the screen with the word you’re currently reading? Having to move the mouse or guess the word under the pointer is only a minor irritation but it can be an irritation none-the-less.

Unclutter is a small but unique package for X11. What it does is very simple: if you aren’t using the mouse, it hides the mouse. This is useful simply because if you aren’t using the pointer, there’s no reason for it to be visible. This may not sound particularly useful, but making the mouse be invisible frees up screen real estate, prevents it from distracting you, and just generally makes for a much more pleasant experience, particularly when reading a document or using primarily keyboard-based applications.

Unclutter is easy to use. Just put a line like this in your .xsession, .gnomerc, “Startup Programs” or wherever you enter commands to be run at startup/login:

unclutter &

Now, if you stop moving your mouse, the cursor will disappear after 5 seconds.

Unclutter has a few nice arguments worth checking out:

  • -idle 2 : hide the mouse after 2 seconds, instead of the default (5).
  • -keystroke : tells unclutter to hide the mouse cursor when you start typing on the keyboard.
  • -not : don’t hide the cursor in windows listed as arguments.

There are more options, just check out the man page.

Unclutter is a maintained, stable & largely bug-free package which has been included in basically all versions of Debian and Ubuntu.

Posted in Debian, Ubuntu | 22 Comments »

figlet: a totally useless, therefore essential tool

March 25th, 2007 edited by Tincho

Entry submitted by arno. DPOTD needs your help, please contribute !

FIGlet is a command line tool. It’s purpose is to draw nicely formatted big characters. For example, the output of command figlet debian is:

_ _ _
__| | ___| |__ (_) __ _ _ __
/ _` |/ _ \ ‘_ \| |/ _` | ‘_ \
| (_| | __/ |_) | | (_| | | | |
\__,_|\___|_.__/|_|\__,_|_| |_|

To get more fancy outputs, FIGlet comes with a set of 18 fonts, and more than 400 fonts are available for download. For example, bubble font writes each character encircled in a bubble, and script font imitates handwriting. You can get the list of installed fonts, along with output samples, with command showfigfonts. Here is output of figlet -f script debian:

_
| | | o
__| _ | | __, _ _
/ | |/ |/ \_| / | / |/ |
\_/|_/|__/\_/ |_/\_/|_/ | |_/

FIGlet stands for Frank, Ian and Glenn’s LETters, because it was inspired by Frank’s email signature, written (mostly) by Glenn, and Ian helped. First version was written in spring 1991. FIGlet has since become a well known software in (and even outside) the UNIX world, and has been declined in multiple ways, like a XChat, or an Eclipse plug-in, a PHP class, and many web based FIGlets.

Related software

People who like to write fun stuff may also be interested in command banner from package bsdmainutils. It also outputs large characters, but unlike FIGlet, draws them vertically. It was not designed as a fun stuff, but as a way to separate printings documents from each other. Other tools have been designed specifically to write fun stuff. Among them, Cowsay is one of the most worthwhile. Toilet is very similar to FIGlet for Unicode systems. It comes with many new features, such as colour fonts, or HTML and SVG output.

Links:

So, FIGlet is a really nice software that will make your emails cool and pleasant. But please, do not overuse it in mailing lists!

FIGlet is available in both Debian and Ubuntu in all distributions.

Posted in Debian, Ubuntu | 11 Comments »

MultiTail: view multiple logfiles windowed on console

March 21st, 2007 edited by ana

MultiTail is an extremely configurable monitoring tool. With it one can monitor not only logfiles but also output of other commands as well (like rsstail, wtmptail (see users login and logout), nagtail (for nagios status).

MultiTail is a tool for the console. One can also run it, of course, in a terminal window.

When it runs, it can splitup the terminal in multiple smaller windows:

Lots of windows in Multitail

It can not only display in seperate windows but merge as well. So you can display the apache error logging merged with the access logging and if you like you can merge the output of, say, ping and rsstail as well. There are no limits to the number of windows or number of files/commands you merge.

Merging multiple outputs

A powerful feature is that it can apply colorschemes:

Color-schemes selection

Multitail in action inside a gnome-terminal:

Multitail inside Gnome Terminal

Colorschemes are available for all major applications (postfix, apache, sendmail, tcpdump, squid, etc), and adding new ones can be done easily.

Of course it can also filter out lines (or parts of lines) like with grep and sed but it can also convert parts of lines. E.g. in squid and qmail logging the timestamp can be converted to something more readable. It can also convert ip-addresses, errno-numbers and lots more. And if you would like to extend the conversions, you can let MultiTail invoke external scripts (perl, bash, python, etc.) for these conversions. Those external scripts can be used for the coloring as well.

Everything MultiTail can do can be configured in the configuration-file or via the commandline. As the number of options it has are quite large, it has on-line help as well. Also, if one doesn’t like commandline parameters then everything can be setup via interactive menus. When that is finished, MultiTail can write a shell-script to disk with which MultiTail can be started exactly like it ran previously.

It has too many features to list here, but they’re all listed here.

MultiTail is available in Debian stable (3.4.8), testing/unstable (4.2.0) and experimental (4.3.1) and in Ubuntu since Warty. The latest upstream version is 4.3.3. MultiTail is actively maintained. Requests for new functionality are very welcome and most of the time implemented in a few days. Bugreports too, of course.

Target users: everyone who uses the ‘tail’ command

Links:

Posted in Debian, Ubuntu | 1 Comment »

wajig: Simplified Debian administration front-end

March 18th, 2007 edited by Tincho

Entry submitted by Chris Lamb. DPOTD needs your help, please contribute !

Wajig is a simplified command line administrator for Debian written by Graham Williams.

It merges apt, apt-cache, dpkg and the start and stop scripts (among many, many others) into a single command, centralising typical Debian administration tasks and making commands easier to remember. Some commands are even overloaded to give them extra functionality.

For example, wajig install will accept the name of the package as an argument á la apt-get and aptitude:

$ wajig install lighttpd

But it will also accept a path to a local file:

$ wajig install ./lighttpd_1.4.13-9_i386.deb - install local package

Other useful commands that Wajig provides:

auto-download
Do an update followed by a download of all updated packages
bug
Check reported bugs in package using the Debian Bug Tacker
build
Retrieve/unpack sources and build .deb for the named packages
changelog
Retrieve latest changelog for the package
dependees
List of packages which depend on the specified package
installs
Install package and associated suggested packages
installr
Install package and associated recommended packages
installrs
Install package and recommended and suggested packages
install/dist
Install packages from specified distribution
large
List size of all large (>10MB) installed packages
last-update
Identify when an update was last performed
remove-depend
Remove package and those it depend on and not required by others
showdistupgrade
Trace the steps that a dist-upgrade would perform
showupgrade
Trace the steps that an upgrade would perform
start
stop
Start or stop a service

A full list is available from the Wajig homepage, and also running wajig list-commands.

Wajig is ideal for users who simply wish to administer their system with a minimal amount of fuss, but is perhaps even more useful for users wishing to learn more about Debian’s package system with a hands-on approach. For example, the --teaching/-t command line option toggles the display of the underlying commands being executed. Even power users may also find a use for Wajig when performing less common tasks, or when they are simply feeling lazy.

Wajig is run as a normal user, but will invoke sudo when necessary. Tab completion of commands inside a Bash shell is available too.

Wajig has been available for ages in both Debian and Ubuntu.

Posted in Debian, Ubuntu | 6 Comments »

MPD: The Music Player Daemon

March 14th, 2007 edited by Tincho

Entry submitted by Igor Stirbu. DPOTD needs your help, please contribute !

Music Player Daemon is a server that plays sound files and streams and can be controlled through remote clients. MPD supports Ogg-Vorbis, MP3, FLAC, Wave and AIFF for sound files and Ogg-Vorbis and MP3 for streams. Also has support for cross-fade.

MPD is a very flexible media player due to it’s client/server nature. MPD can be configured to use your sound card or interact with an icecast server and send the stream over the network. It can be controlled with clients that may reside on the same machine or all over the network.

When MPD starts, it reads first ~/.mpd.conf and then /etc/mpd.conf, if the former can’t be read. So it may be configured to run at startup or be started by any user. Here is the content of my .mpd.conf file:

# ~/.mpdconf
music_directory     "/home/igor/media/mp3"
playlist_directory  "/home/igor/.mpd"

state_file      "/home/igor/.mpd/state_file"
db_file         "/home/igor/.mpd/tag_cache"
error_file      "/home/igor/.mpd/error_file"
log_file        "/home/igor/.mpd/log_file"
pid_file        "/home/igor/.mpd/pid_file"

mixer_type      "alsa"
mixer_device    "default"
mixer_control   "PCM" 

filesystem_charset  "UTF-8"

audio_output {
    type        "alsa"
    name        "Local sound card"
}

audio_output {
    type        "shout"
    name        "Icecast2 stream ( http://keo:8000/stream.ogg)"
    host        "keo"
    port        "8000"
    mount       "/stream.ogg"
    password    "hackme"
    # quality     "7.0"
    bitrate     "128"
    format      "44100:16:1"
    # Optional Paramters
    user        "source"
    description "All your music are belong to us"
    genre       "rock"
}

This setup allows me to directly use my sound card when working on the computer where MPD runs or enable the icecast stream and listen over the network when using the laptop.

The modifications to icecast.xml are these:

    <hostname>keo</hostname>
    <mount>/stream.ogg</mount>

Nice features for MPD are available due to it’s configuration files. If you specify a pid_file you can use mpd --kill to stop the daemon. The state_file saves the state of the player (i.e. the playlist, the time and the name of the current song, the enabled outputs, etc.) If stopped gracefully, it writes the state_file and when started, resumes playback and restores the playlist.

Visit MPD’s home page for more information regarding releases, clients, FAQ. Packages for MPD are available in Debian since Sarge, and in Ubuntu since Hoary.

Clients

In Debian a few clients are available for MPD and more of them listed on the MPD web page. The one I use is Gmpc. It supports notification area integration, pop-up notification, playlist manager, server settings panel. There are ncurses, command line, web and other types of clients.

In the following screenshot, you can see a bunch of clients connected to the same mpd daemon: gmpc, pympd, ncmpc (ncurses), and phpMp2 (web).

MPD clients screenshot

Posted in Debian, Ubuntu | 8 Comments »

« Previous Entries