Ubuntu (GNOME) Notes      Ubuntu Logo

Keyboard Shortcuts
When I first started working with Ubuntu it wasn't clear that it was possible to define keyboard shortcuts for most tasks. Here's how.

Automatically Centering Windows
By default most windows don't remember their previous positions and tend to open towards the top left corner rather than in the center of the screen as I prefer. Here's how to center most windows.

Emptying the Trash Using the Keyboard
(Updated for Version 8.04)
I created a script named emptytrash.sh containing the following text:

   #!/bin/sh
   rm -rf ~/.local/share/Trash/files/*
   rm -rf ~/.local/share/Trash/info/*

I made the script executable (sudo chmod 755 emptytrash.sh).

I then created a keyboard shortcut to run the script, as described in the Keyboard Shortcuts section above.

The script shown above handles files on the same partition as my home directory. However, additional lines are needed for each additional partition, and apparently are different depending on the partition type.

For a ext3 partition named archive, I added the following lines:

   rm -rf /archive/.Trash-1000/files/*
   rm -rf /archive/.Trash-1000/info/*

Note that 1000 is my user number.

For a FAT32 partition named share, I added the following:

   rm -rf /share/.Trash-steve/*

Note that steve is my user name.

This script works for the vast majority of files I delete. However, files deleted from a directory outside of my home directory sometimes have permission issues that require using the regular Empy Trash command.

Transferring Files Between Two Ubuntu PCs
I have two PCs running Ubuntu. Both are connected to a router in order to share an Internet connection. Here's my easy way to allow file transfers between the PCs.

(Not tested in version 8.04)

Converting Audio Files in Nautilus
Here's how I convert one or more audio files between formats by right-clicking on them.

First, I installed package nautilus-script-audio-convert. I then opened a terminal window and entered the following:

   nautilus-script-manager list-available

In my case, the only script listed was ConvertAudioFile.

I then entered:

   nautilus-script-manager enable ConvertAudioFile

I closed and re-opened Nautilus. Right-clicking on an audio file now revealed a Scripts sub-menu, from which I could select ConvertAudioFile.

(Not tested in version 8.04)

Last Updated: June 15, 2008