Getting the device UUID and filesystem

To check the available devices (hard disk, pen drive) you can use the command as follows (as root):

fdisk -l

To verify the active mount points you can run:

df

However, neither one shows the device file sytem information, required in some mounting tasks, such as NFS, autofs. If it was mounted using /etc/fstab, there you can find it. Furthermore, Ubuntu also requires UUID device in partition mounting, which is not provided by the previous tool (fdisk, df). To get these information you can execute the command as follows:

blkid

See ya

Installing VirtualBox 3.1 in Ubuntu

This post does not intend to explain how to create a virtual machine in Ubuntu. Since VirtualBox is not found on default repositories here we show how to install it using apt-get tool:

echo -e "\ndeb http://download.virtualbox.org/virtualbox/debian karmic non-free" >> /etc/apt/sources.list
wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-3.1 dkms

Read more:
http://www.howtoforge.com/installing-virtualbox-3.1-on-an-ubuntu-9.10-desktop

See ya

Correct cedilla in english keyboard

The layout of my keyboard is “USA Alternative international (former us_intl)”, so it does not has cedilla and other minor differences. Furthermore, even if I set the language to portuguese (br) when I press the combination [acute accent] + [C] it gives me Ć/ć instead of Ç/ç. Since I have to make it every time I format my notebook I automate the file changes using sed, but you can also open and change file using either editor (e.g gedit, kate). The turnaround is showed below:

sudo sed -i 's/wa/wa:en/' /usr/lib/gtk-2.0/2.10.0/immodule-files.d/libgtk2.0-0.immodules
sudo sed -i 's/Ć/Ç/' /usr/share/X11/locale/en_US.UTF-8/Compose
sudo sed -i 's/ć/ç/' /usr/share/X11/locale/en_US.UTF-8/Compose

You should restart gdm after to apply changes.

sudo /etc/init.d/gdm restart

See ya

Building QtOctave 0.8.2 from source

The current version of qtoctave provided by apt-get is 0.8.1. I experience some problems that freeze my qteditor. So I check for a bug and found that there is a newer version, which can have some bug fixes. However, when installing QtOctave I have to turnaround the following issues presented in the QtOctave blog:

1. Include in files below:

sed '1 i #include \' qtoctave_pkg/src/main.cpp
sed '1 i #include \' qtoctave/src/search_dialog.cpp.

2. Change the order of the CMakefileList.txt to:

TARGET_LINK_LIBRARIES(qtjs
${QT_QTUITOOLS_LIBRARY}
${Qt4_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
#${QT_QTSVG_LIBRARY}
${QT_QTSCRIPT_LIBRARY}

rather than

TARGET_LINK_LIBRARIES(qtjs
${Qt4_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
#${QT_QTSVG_LIBRARY}
${QT_QTUITOOLS_LIBRARY}
${QT_QTSCRIPT_LIBRARY}

3. Compile cmake in the current directory instead of create a directory build to insteas as is described in readme.

qtoctave-0.8.2$ cmake .
qtoctave-0.8.2$ make
qtoctave-0.8.2$ make install

See ya

Cluster SSH: execute the same command in multiple hosts

The routine of a network administrator include need to apply the same change over multiple hosts, such as install a certain package or setup an application. One alternative is make a script that spread your command in a list of hosts. However, the same command can have different results on different hosts, so it’s useful to follow, in the screen, if it was successful applied. Cluster SSH provide this issue. It can be instaled using apt-get:

sudo apt-get install clusterssh

Following some previews:

See ya