Oct 20, 2009

Funny login message with fortune

Fortune is a nice piece of code that prints out a random epigram. Epigrams are divided into several categories. To make it print an epigram upon logging in the console, we need to install it first:

sudo apt-get install fortune

As per step 2, we need to add this to ~/.bashrc file
if [ -x /usr/games/fortune ]; then /usr/games/fortune -s fi

Now, every time you log in to your console you will see some funny text as a welcome message generated by fortune like:
You are a very redundant person, that's what kind of person you are.

Or like this:
You will be run over by a bus.

Oct 12, 2009

Access your Box.net account as a folder in ubuntu

Box.net is offering 1GB of free space for your storage. It is also a great substitution for micro$oft sharepoint. I wanted to access the box.net account directly from my Desktop. To accomplish that I have created a launcher on the Desktop. To create a box.net free account visit http://box.net/ to check the howto proceed with reading :)

At first install davfs2 support by typing:
$ sudo apt-get install davfs2

Create a file (this will be a launcher icon) on yout desktop by typing in console. You can use any editor you like, my fave is vi so I will use that:
$ vi ~/Desktop/Box.desktop

Paste this thing into the Box.desktop file:
#!/usr/bin/env xdg-open

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Link
Icon[en_US]=gnome-panel-launcher
Name[en_US]=Box
URL=dav://www.box.net/dav
Name=Box
Icon=/usr/share/icons/Human/48x48/places/folder-remote.png

Now just doubleclick on the desktop icon. You will be prompted for login and password. You can make ubuntu remember your password by selecting remember password forever. You can also edit file /etc/davfs2/secrets to store your password and login there.

Oct 8, 2009

Creating fancy server message with figlet

Every time you log in to the server you can see a message that is shown on the terminal. The message comes from the file /etc/motd (message of the day). If you want the users to notice your message, you can make it a little bit fancy :) You can use figlet to do that. Figlet can create multiple types of ascii text messages in nice font. More about this tool is available on http://www.figlet.org/

To install figlet type in command prompt: sudo apt-get install figlet

Now, to create Fancy server name text and center it horizontally (as image shows), use this command:
$ figlet -f block -c "Fancy server name" > /etc/motd

You can use more types of fonts specified with -f option, but only one at a time. To list a directory with available figlet fonts use:
$ figlet -I2

Oct 7, 2009

Remove external media with Ejecter

Ejecter is an utility to safely, easily remove external media. A simple menu that sits in the system notification area, providing you a quick way to unmount external peripherals such as usb pendrives, cd/dvd, external hard disks and so.

To install ejecter on ubuntu type in console: sudo apt-get install ejecter
To check more info about ejecter go to homepage: https://launchpad.net/ejecter

Oct 6, 2009

Red notebook personal diary and journal

RedNotebook is a graphical diary and journal helping you keep track of notes and thoughts. It includes a calendar navigation, customizable templates, export functionality and word clouds. You can also format, tag and search your entries.

To install it type in console: sudo apt-get install rednotebook

Red notebook includes theese features (author promissed more functions later) :
  • Enter text for individual days and navigate using a fancy calendar
  • Add Categories to days and fill them with content
  • Tag your entries
  • Format your text bold, italic or underlined
  • Insert Images, files and links to websites
  • Links and mail addresses are recognized automatically
  • (Live) Search
  • Automatic saving
  • Backup to zip archive
  • Word Clouds with most often used words and tags
  • Templates for each weekday and arbitrarily named ones
  • Export the journal to HTML, Latex or plain text
  • Graphical preferences dialog
  • You can have multiple journals
  • RedNotebook is open source software, you are free to use and redistribute it under the terms of the GPL
  • The data is stored in plain text files, no database is needed
Check the homepage at http://digitaldump.wordpress.com/projects/rednotebook/

Oct 4, 2009

Monitor your boot with bootchart

Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process. Resource utilization and process information are collected during the boot process and are later rendered in a PNG, SVG or EPS encoded chart.

To install botchart type in console: sudo apt-get install bootchart

Bootchart collects various statistics from /proc utilising a shell script which collects the info. After the next boot you will find detailed performance chart created by java application showing your boot in /var/log/bootchart directory and also a tarball containing logs.

The only thing I don't like about bootchart is, that after some time you will find a lot of logs and images in the bootchart folder while there is no script to delet them after some time. We can fix this by creating a cron job:

At first use your favourite editor to edit crontab:

To edit crontab with nano:
sudo crontab -e

To edit crontab with vi:
export EDITOR=vi; sudo crontab -e

Add this line to root crontab if you want to delete files older than 30 days:
@reboot /usr/bin/find /var/log/bootchart -type f -mtime +30 -exec rm {} \;
To find out more about bootchart - check the bootchart web at http://www.bootchart.org/

Sep 29, 2009

Monitor your weight with pondus

Pondus is a personal weight management program written in Python and Gtk+2 released under the GPL. It aims to be simple to use, lightweight and fast.

The data can be plotted to get a quick overview of the history of your weight. You can choose from kilograms / pounds metrics.

A simple weight planner allows to define "target weights" and this plan can be compared with the actual measurements in a plot. More info is available at http://www.ephys.de/software/pondus/