D-Bus introduction in Perl

Sunday, March 8th, 2009

As stated in Wikipedia :

D-Bus (Desktop Bus) is a simple inter-process communication (IPC) system for software applications to communicate with one another.

This post provides a simple code snippet in Perl to help you getting started with D-Bus programming. (more…)

Gentoo : Managing software packages

Sunday, November 9th, 2008

In this post I’ll cover the basics one needs to know to install, upgrade and remove packages on a Gentoo linux system. (more…)

Linux : Using loop devices (eg : mounting an ISO file)

Sunday, January 13th, 2008

If you downloaded an ISO file and you want to mount it into your filesystem, you can proceed as follows :

spaghetti% sudo losetup /dev/loop0 cdrom.iso 
spaghetti% sudo mount /dev/loop0 /mnt 
spaghetti% ls /mnt 
Autorun.inf  setup.exe  setup.ico
spaghetti% 
[...]
spaghetti% sudo umount /mnt
spaghetti% sudo losetup -d /dev/loop0

This will use the feature known as “loop devices”, which lets you use a file as a device, and subsequently mount it as it would be one.

You can of course mount an ISO using loop devices, but there is more to it. You could for example mount a ciphered file containing an EXT2 filesystem.

Check out the man page for more details.

Linux : Taking control of Virtual Terminals (VT) from command line

Saturday, December 1st, 2007

When you use Linux in text mode (as opposed to with an X server), you readily have access to multiple Virtual Terminals (aka VT for short) by hitting one of your <Alt-Fn> keys (if you are running a X server, you’ll need to hit <Ctrl-Alt-Fn> simultaneously).

This lets you access one of the VTs which are initialized at boot time, but won’t let you create new ones even if your kernel configuration would allow more VTs. Furthermore, what if you want to deal with VTs from a script ?

This post covers the 3 commands which will let you control your VTs from the command line or from a script.

(more…)