Sunday, November 25, 2007

ScramDisk - GUI frontend for Truecrypt and more

Just discovered ScramDisk, and now I have an easy to use GUI front-end for my Truecrypt-volumes. I like ScramDisk a lot more than the Forcefield GUI, and it seems to be a lot more stable.

ScramDisk is easy to use and install. It lets you mount and create Truecrypt-volumes, but has also got its own encryption options.

It's a really nice package. Check it out.

Monday, November 5, 2007


I have used the Truecrypt for several years under WinXP. It is probably the best tool for encrypting (virtual) disk volumes out there. It is also open source, which is a must when it comes to encryption tools and security related software.

The WinXP-version of Truecrypt has a nice and easy to use GUI for creating and mounting volumes. No GUI is supported by Truecrypt for the Linux platform, however.

Below, I will cover how to make and mount a Truecrypt volume formated to the Ext3-file-system in Ubuntu 7.04. The installation of Truecrypt is quite straight forward and is covered in the documentation on their website.

After you have downloaded and installed Truecrypt, you need to prepare a partition that is going to host your encrypted volume. In my case, I just used Gparted (sudo aptitude install gparted) to make a new 10GB partition on one of my harddrives. You may also use external drives, USB-sticks or whatever.

Prepare a mount-point (an empty folder) where you want your Truecrypt volume. I have mine at /home/adder1972/Truecrypt.

The partition made by Gparted was named /dev/hda9. Ubuntu tends to automount everything. Make sure the volume is not mounted by entering

sudo umount /dev/hda9 (substitute for your volume name)

Now, we create an encrypted volume on our partition

sudo truecrypt -c /dev/hda9

Please refer to the documentation if you need an explanation for the options presented. The defaults should be OK for now, except you should choose "Filesystem: None" instead of "Filesystem:FAT". You don't need a key-file for now either. You will be asked to enter a password. Let us assume your mouse is connected directly to the computer; move it around randomly when asked. Otherwise, you will be asked to type 320 randomly chosen characters.

When finished, truecrypt-mount your partition

sudo truecrypt /dev/hda9

Now type

sudo truecrypt -l

The output will be something like this

/dev/mapper/truecrypt0 /dev/hda9

We want to use the Ext3-file system. We format the Truecrypt volume by

sudo /sbin/mkfs.ext3 /dev/mapper/truecrypt0

And then unmount

truecrypt -d

The volume is now prepared and ready to be mounted in your home folder

truecrypt /dev/hda9 /home/adder1972/Truecrypt

(Note that I don't use sudo here). To set the correct permissions

sudo chown adder1972:users /home/adder1972/Truecrypt

(substitute adder1972 with whatever is correct in your system).

Now, the volume is mounted and ready. When you need to use it after you have powered up your computer, rebooted or unmounted, you mount it using

truecrypt /dev/hda9 /home/adder1972/Truecrypt

and unmount it

truecrypt -d

(No sudo here)

This post is based on a forum entry at the Truecrypt forums and my own experiences

Monday, October 22, 2007

Updated Aptitude in Gutsy Gibbon (Ubuntu 7.10)

I use aptitude from the command line to update my system and to install packages. I have been running Ubuntu 7.10 throughout the beta-testing. I have noticed an error message every time I used "sudo aptitude update":

W: The "upgrade" command is deprecated; use "safe-upgrade" instead

I finally discovered that this is due to some changes made to the new version of Aptitude shipped with Ubuntu 7.10. The change is described in the man-pages for aptitude in Ubuntu 7.10.

The "upgrade" action/option is now called "safe-upgrade", and the old "dist-upgrade" is now "full-upgrade". Something to keep in mind if you encounter the error message.

Monday, October 15, 2007

Cron-job to delete unused thumbnails

I found that the hidden folder .Thumbnails (under /home/adder1972/) can grow very large after e.g. looking through a few years of pictures in my Pictures-folder. In Gnome (Nautilus) you can view hidden files and folders by pressing Ctrl + H. Here is a tip on how to delete unused thumbnails automatically.

Cron-job is a tool for running repetitive tasks in Linux. I made a cron-job for deleting the content of .Thumbnails if the file hasn't been accessed for a while. It provides a nice balance between conserving drive space and having thumbnails quickly available for the system.

I made a plain text document in the /etc/cron.d folder. I called the file "thumb", but that doesn't really matter. The file contains just one line:

0 21 * * * root find /home/*/.thumbnails/ -type f -atime +6 -exec rm '{}' \;

The format for the cron-commands are explained in detail in "man cron" and the find-commands in "man find".

The command tells the Linux-box to find all the thumbnail-files in all the home-folders (if you have several users) and delete the ones that has not been accessed during that last 7 days (today +6 days). The command is performed as root.

As long as the Linux-box is up and running at 9PM (21h), the cron-job is running.

Wednesday, October 10, 2007

Ubuntu backup and partitioning

In order to be a bit more robust and prepared for disaster, I have put my /home folder in a separate partition. This is easy to do during install. I allocated about 10BG to the main system and made the /home folder the same size. As described earlier, I have several other disks mounted into my /home folder, giving me plenty of storage-space.

The /home folder is home to many user-settings for most programs. I discovered this recently, when Windows XP decided to delete my root-partition. Suddenly, my Ubuntu-install was gone. I had to reinstall Ubuntu 7.04. During install I chose manual setup under the partition step. I just pointed my surviving partition containing my old /home to a new /home (this is easy to see when you install). I made a new partition for the rest (i.e the root) and reinstalled 7.04 on that one. When I booted into my system for the first time after reinstall, allmost everything was back to the way it was earlier (see note). My desktop pictures was there, my bookmarks in Firefox and my folder-structure in the home-folder. As I reinstalled programs, e.g the Liferea feed reader, my old settings returned. Great!

However, there were a few problems. My fstab containing information about my mounted disks was gone. I had to rewrite that one. Also, my screen settings were back to default, so I had to edit xorg.conf again. Both files are kept under the /etc folder, and they died along with the fatal XP-partition wipe I refered to above.

In order not to have to repeat that in the future, I installed sbackup (sudo aptitude install sbackup). The program integrates nicely under System > Administration > Simple Backup Config and Simple Backup Restore. This is a really neat and easy program to use. I just decided which files and folders to include (a suggestion was made). I did not include my home folder, since I have that on a separate partition. I might set up a separate backup for that at some later time. I save the backup-files on a separate drive. You may also save via your network if you wish.

Now, my fstab and xorg.conf and all the other config-files are safer, bith from "accidental" deletion by Win XP and also from my own editing!

Note: Actually, when I tried to log in to my session, X wouldn't start properly, probably since I had been using the nvidia-drivers for my graphics card. The drivers are not a part of the fresh install. In order to fix this, I started a terminal session and installed the graphics driver via the command line:

sudo aptitude install nvidia-glx

Feisty Fawn - cube effects suddenly missing

I run Feisty Fawn (Ubuntu 7.04) on one of my Linux boxes. I have enabled desktop effects (System > Preferences > Desktop effects). A few times I have had problems with the rotating cube, i.e. I am not able to rotate the cube. The wobbly windows are working fine.

In order to fix this issue, start gconf-editor (e.g by pressing Alt+F2 and writing gconf-editor or running it from the terminal). Go to "apps" > "compiz" > "general" > "screen0" > "options" and make sure that "hsize" is set to 4 (mine is usually set to 1 when the cube isn't working). Now, the rotating cube should work fine again.

Sunday, September 2, 2007


I recently tried Zenwalk on my main Linux-box. I have earlier listened to Ed Labonte's The Lip (Linux Install Podcast) regarding the distro.

I had a few problems installing it. First, I got a kernel panic during install. I don't know why, so I rebooted, tried to install again, and then it worked OK.

I chose not to install LILO, so I opted out for the LILO-install during set-up (I already run Arch and Ubuntu, booting via GRUB). After installation, I had to manually edit menu.lst in /boot/grub (in Ubuntu). Listen to Ed Labonte if you need directions on how to do this. I found that I needed some trial and error to set the correct name for my Zenwalk-partition

My network didn't work after I logged in to the Xfce-desktop. On the lower panel, I opened "Zenpanel" and configuration was easy.

I still need to set my screen-resolution to 1440x900 (for my Samsung SyncMaster 940BW), but I guess I will figure out how to do that shortly.

Wednesday, August 29, 2007


I have a large drive containing both MP3s and my photographs. I have previously mounted the whole disk into the arbitrarily named /HDD-directory in /home. You need root privileges to mount:

sudo mount /dev/sda1 /home/adder1972/HDD

I decided I wanted to replace my HDD-directory with a /MP3 and a /Pictures directory.

I discovered the "mount --bind"-command, which according to the man-pages enables you to "Remount a subtree somewhere else (so that its contents are available in both places)."

So, I made my two new directories, and now I mount my large harddrive like this:

sudo mount --bind /media/sda1/Pictures /home/adder1972/Pictures
sudo mount --bind /media/sda1/MP3 /home/adder1972/MP3

Modifying /etc/fstab (*see note) would allow for automounting these directories. The way to do this is by adding:

/media/sda1/Pictures /home/
adder1972/Pictures none bind 0 0
/media/sda1/MP3 /home/adder1972/MP3 none bind 0 0

at the end of fstab. Since the "bind" command only re-mounts part of your drive, you cannot remove the original command to mount your drive, which is already in your fstab, i.e.:

/dev/sda1 /media/sda1 none 0 0

Run mount -a to have it take effect immediately.

* Note: Always remember to backup/copy the file you want to modify.
In order to edit fstab, type

sudo gedit /etc/fstab

at the command line (if you are using the "gedit" text editor).

Sunday, August 12, 2007

Ubuntu widescreen resolution 1440x900

I have bought a new Samsung SyncMaster 940BW. To get the correct resolution in Ubuntu, I had to edit my xorg.conf-file.

I found the correct settings in the Ubuntu Forums.

Remember to back up your old xorg.conf-file before editing.

xorg.conf is located in /etc/X11

Saturday, August 11, 2007

Arch Linux 2007.8

I have started trying out Arch Linux. Really fun to try out a Linux distro that makes you install and tweak nearly everything. It takes quite a lot of time and reading to get going, but it is really rewarding.

I have tried to install it on my main Linux-box, but I am having some issues with my network-settings. However, in VirtualBox it runs really well.

I have used four great resources for my install:
I had a lot of challenges installing Arch. You need to do a lot of manual configuring to get it to work properly. However, it gives you a great insight into how the OS works.

Edit: I've solved the network issue on my main box, thanks to Ed Labonte's comment at the end of his Linux Install Podcast, part 1.

Thursday, June 14, 2007

Fedora 7: Remove desktop icons/launchers

I am trying out the great new Fedora 7 now, with the Gnome desktop.

I wanted to remove the desktop icons / launchers that were on the desktop (Computer, adder1972's home og Trash).

It turned out I had to install "gconf-editor" (not installed by default apparently). As root I ran:

yum install gconf-editor

Then, in Configuration Editor under System Tools in Applications, I chose "apps" "nautilus" and "desktop". Then I could just remove the icons / launchers that I wanted to remove.

gconf-editor is a part of Gnome, and works in i.e. Ubuntu as well]

Sunday, June 10, 2007

Linux Mint 3.0 Cassandra

Linux Mint 3.0 is out. I downloaded the Ubuntu based distro and tried it in Virtualbox. I just used the same virtual machine as I have installed Ubuntu Feisty on, and just booted it from the CD ISO.

The distro looked great and supports lots of media files right out of the box. The LiveCD I tried was based on Gnome, but did only have one panel on the bottom part of the screen.

The virtual machine I used has just a 5GB virtual hard drive allocated. I have already installed Feisty on it, which filled about 2.5GB and I have allocated 512MB to swap (a bit much). A bit more than 2GB was free. Using the Mint installer, I made a new partition of the free space in the "Feisty partition", so I got an approximately 2.3GB partition that Mint could use for root. I set the installer to use the same swap-partition as Feisty does.

The installation went quick and without any problems.

When I rebooted, GRUB now had the Mint and Ubuntu Feisty boot options. I tried Mint. Then, when I wanted to log in, I got the error message: "GDM could not write your authorization file." etc. I have gotten this message one before (I don't remember when) when my root partition was full.

I decided to delete OpenOffice and then try to log in. I rebooted and started Mint in safe mode. At the command line (Ctrl+Alt+F1), as root, I typed:

apt-get remove --purge*

This removed about 230MB of files. After it had finished, I typed "reboot", and started Mint the normal way.

Wednesday, April 25, 2007

Installation of Ubuntu 7.04, Feisty Fawn (10 easy steps to success)

Just found a good site with tips for installing Ubuntu 7.04:

Essential Ubuntu

Also, check out this site for compatibility tests:

Linspire Compatibility Tests

Sunday, April 22, 2007

Installed KDE on Debian

Decided to try to install KDE. Debian comes with Gnome as default.

Used "Synaptic Package Manager" and chose "KDE-desktop environment". Ran through the list of included programs, and deselected some applications. When I pressed "Apply" I was prompted for a install CD. I only had the first install CD-iso.

Then I remembered what we used to do in earlier versions of Ubuntu - edit the "sources.list". This list specifies which repositories the system shall fetch its packages from. It is located in /etc/apt. In order to edit this system file, I needed root privileges. As I have discussed earlier, I have installed the "sudo" command that I am used to use under Ubuntu.

sudo gedit /etc/apt/sources.list

enabled me to edit the list.

It read:

deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 CD Binary-1 20070407-11:55]/ etch contrib main

deb etch main
deb-src etch main

deb etch/updates main contrib
deb-src etch/updates main contrib

I commented out the CD-rom and saved the file, modified file reading:

# deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 CD Binary-1 20070407-11:55]/ etch contrib main

deb etch main
deb-src etch main

deb etch/updates main contrib
deb-src etch/updates main contrib

Then, I pressed "Apply" again, and then the install started downloading files from the net without prompting me for the CD.

After the install was completed, I logged out of Gnome, and chose KDE... and it worked!

Installing Debian

I decided to give Debian a try. I have heard so much about it, and since I have been using the Debian-based Ubuntu for a while, I wanted to check it out.

Debian has just been released in ver 4.0. Debian is released on 21 CDs, but with a broadband Interweb connection, you will only need the first.

After preparing a system in Virtualbox, and preparing the partitions, I was ready for the install. Debian uses an installer like the older versions of Ubuntu. It is quite easy to use (except for the formating issues described earlier). In addition to the first install CD, some packages where fetched from the net.

Booting and starting my new system, was very much like Ubuntu (not surprising). The Gnome desktop is default for Debian, and it looked more or less like Ubuntu (but was not brown).

I decided to check if my system was up to date, using the " sudo aptitude update" command. To my surprise, that didn't work. In fact I got a lot of error messages.

After searching on the Interweb, I discovered that the "sudo" command isn't activated or installed by default in Debian. Also, Debian uses root-account (disabled in Ubuntu) and user-accounts. In order to get sudo-to work I needed to switch to root:

su -

And then install sudo:

aptitude install sudo

Then I needed to give my user privileges to run "sudo". Running visudo as root, I edited the line reading

root ALL=(ALL) ALL

and substituded "root" with my username

adder1972 ALL=(ALL) ALL

After quiting the terminal and restarting it (since I don't know how to log out as root yet ....), I was now able to run "sudo" as my regular user (+ password, of course)

To test that everything worked, I typed

whoami (answer: adder1972)


sudo whoami (answer: root)

A short note on Virtualbox and formating

I have had some problems when installing Linux on new virtual machines in Virtualbox. The installation always seems to fail when it is preparing the partitions on the virtual hard drive.

When installing Ubuntu, I eventually solved this by using Gparted from the LiveCD and preparing the partitions before I ran the install.

I have recently installed Debian on another virtual machine, and encountered the same problem there. Since Debian does not come with a LiveCD, I first prepared the partitions with the Ubuntu LiveCD, and then installed Debian on the now formated virtual hard drive.

Wednesday, April 18, 2007

Upgrade to 7.04 Feisty Fawn

I was very excited about the release of Feisty today.

Thanks to help from the community, I used the commands:

sudo aptitude update
sudo aptitude upgrade
sudo aptitude dist-upgrade

Easy, easy, easy :-)

To check which version of Ubuntu I run, I just look in "lsb-release" in /etc:


Sunday, April 15, 2007

Installed Kubuntu

Added KDE today, so now I have Kubuntu as well.

Pretty easy to install after searching on Google.

Just used the command:

sudo aptitude install kubuntu-desktop

After it had downloaded, I logged out, and logged in to Kubuntu. It will be interesting to check out.

BTW, all my menues are now a mix of Gnome and KDE-applications. I found this easy to clean up (in Ubuntu) via the control-panel.

Saturday, April 14, 2007

Created launchers ...

I created a launcher for my "mount disk 2" - command described previously.

Right clicked the Desktop - Create launcher. Chose "Application in terminal", and just inserted the command line "sudo mount /dev/hdb1 /home/adder1972/xdisk" (described previously).

I then pulled the launcher icon to the top panel. Now I have a handy icon to click when I want to mount my second disk in my Home-folder.

When I was at it, I also made two more "command line" launchers, "Update" executing "sudo aptitude update" and "Upgrade" executing "sudo aptitude upgrade".

Monting a second disk

Well, I have heard many great things about the Unix-file system and its flexibility. In order to learn more about the file system, and eventually transforming my home network to be Linux-based, I thought I would try to mount a second disk as a folder in my Home-folder.

I was also thinking that I could use this to mount e.g my external USB-harddrive with all my pictures directly in my Home-folder.

I ran in to some problems along the way. I will try to explain them and their solution.

Problem 1 was to mount the disk. In fact the disk was already mounted by the system and showed up in the "places" bar in the file browser. However, I wanted to mount it myself, so I unmounted it (right click, unmount).

Finally, a chance to test the much feared command line... Opening a terminal-window, I used the command:

sudo mount /dev/hdb1 /home/adder1972/xdisk

This mounted the second disk (with one partition; hdb1) to a folder called "xdisk" in my Home-folder. I had cheated and made the target folder in the file browser (I know I can make it command line as well, of course).

Problem 2 was related to user rights. I couldn't write to my drive/folder now called "xdisk". Command line:

ls -l

showed me the user rights, owner, group, etc. I found that the folder was owned by "root", so I needed to change the rights of the folder.

I used command line:

sudo chmod 775 xdisk

BTW, all command line commands are explained thoroughly in the terminal. You can just write:

man chmod

for instance, to check how to use the "chmod" command. However, I find it difficult to use. The "man"-pages are also available on the Interweb.

Anyway, the new user rights did the trick for me, and my extra disk was now mounted as as a folder under "Home".

Add to panel..

I found that you can add several items to your top menu bar/panel by right clicking on it and choosing "Add to panel". You can also add programs/launchers that also are found in e.g. your Applications or Systems pull down menus.

Btw, you can also drag and drop items directly to the panel, and it will stick.

Great podcasts

Just a short note on some great podcast. Check out Linux Reality.
The podcasts are great and informative. And the forums are also a great resource.

Also check out Fresh Ubuntu. Harlem has many great tips and also a great site called Tipshack.

(That's many "great"s in one posting!)

Ubuntu Feisty Fawn Beta


So I started with Ubuntu Feisty Fawn Beta.

I loaded it in VirtualBox. I put up a virtual harddrive of about 6GB and another of about 1GB. The plan was to use the first to install Ubuntu and also make a swap-partition, and the second to practice mounting.

I booted up the ISO-image (which I downloaded from of the LiveCD. It worked smoothly.

In VirtualBox, I noted, that my wireless connection on my laptop, was detected as a wired network seen from the virtual machine side (that makes sense, and also saved me any potential trouble with the wireless config).

During install, I formated the virtual harddrive, even though I made the drive as a "ext3" when setting up the virtual machine (in fact, I think the install didn't work if I didn't format it again during install).

When the install was finished, I dismounted the ISO-image (in VirtualBox), and rebooted the system.

I updated the system clicking on the "update-icon".

That was it.

I am currently not at home, so I have to run Linux on a virtual machine.

I found It is such a great program and it is really easy to use.

It gives me the opportunity to try different things, and if it fails, well, I can return to a backed-up system.

It is also great to for trying different distros.