Posts Tagged 'Tips'

Design your own desktop with Xfce 4.4 – part 2

By popular demand, I decided to push the limits of Xfce’s customisability even further. This time, I would make it look like Mac OS X 10.5 “Leopard”.



Despite efforts like Mac4Lin, this task proved more difficult than trying to make it look like Windows Vista. Though I haven’t achieved the same degree of perfection as I did when replicating Vista, I still think I came pretty close.

First of all, you will need to download Mac4Lin and extract it somewhere. There’s a lot of material to use in there, but since I have already discussed it in part 1, I won’t elaborate here on how to change your wallpaper, font (to Lucida Grande), GTK theme, icon theme and xfwm4 theme or, for those who use Compiz, Emerald theme. Removing the bottom panel, setting a background image and resizing the top panel have also been discussed. In order to replicate the looks of OS X as close as possible, though, there still is a lot to be done.

Dock

One of the most noticeable things about OS X is its dock. Unfortunately, by default Xubuntu does not include such a dock by default. To have this functionality provided for, we will install Avant Window Navigator (AWN). Luckily, excellent instructions for installing AWN on Ubuntu 7.10 are already available, with the only difference being that we use Xubuntu and thus need to look in Applications->System instead of System->Administration.
Do note that, in order to use AWN, you need to have Compiz installed or have enabled Xfce’s own display compositing by checking “Enable display compositing” under the Compositor tab in Applications->Settings->Window Manager Tweaks.



You can run AWN through Applications->Accessories->Avant Window Navigator. In order to have AWN ran every time you log in, you will also want to add AWN in Applications->Settings->Autostarted Applications.



The next step is making AWN replicate the OS X dock, which can be done through Applications->Settings->Awn Manager. If you click “Themes” on the left-hand side, you will get an overview of installed themes. By clicking “Add” you can install the AWN Dock Theme included in the Mac4Lin package you downloaded earlier, which you can then select and apply.

We then click “General” on the left-hand side to configure the looks in the Bar Appearance tab. I disabled round corners, set an angle of 26°, a height of 52 pixels and an offset of 14 pixels.

With that set, you can start adding applets to the dock by clicking “Applets” on the left-hand side. There are a whole range of applets to choose from, but for my OS X-like setup I opted for “Launcher/Taskmanager”, “Shiny Switcher” and “Stacks Trasher”.



The next step was adding program launchers to the dock (well, technically, to the “Launcher/Taskmanager”). This can be done easily by opening a Thunar window (Applications->Accessories->Thunar File Manager) and browsing to /usr/share/applications. You can then drag applications to the dock to add them. Right-clicking on a launcher allows you to change its icon.

Firefox

Also included in the Mac4Lin package is a Firefox theme, to make the Firefox experience similar to that of Safari. To install this, you open up the Add-ons window in Firefox from Tools->Add-ons, then click “Themes” on top. You can then drag the file FireFox Safari Theme - Vfox2.jar from the Firefox Addons folder into the Add-ons window. Another window pops up allowing you to install the theme. After the installation is finished, you will be asked to restart Firefox. After you have restarted, you can select “Use Theme” through the Add-ons window, after which you have to restart it once again.

To install the extensions, you just select the extension file, copy it (Edit->Copy), then paste it in Firefox’s address bar on top (Edit->Paste). Again, an installation window will pop up, and you will be asked to restart Firefox when the installation has finished. Upon the next start, the extension will be installed.

Cursor theme

An interesting option which we didn’t explore in part 1 was the ability to change cursor themes. Conveniently, the Mac4Lin package also contains a folder named GTK Cursor Theme. Similar to how you installed icon themes, you extract the theme archive to /home/yourusername/.icons.

You can then open Mouse Settings (Applications->Settings->Mouse Settings), where the cursor should be located in the Cursor tab. Selecting the theme will warn you that the theme might not be applied until the next time you login.





Final thoughts

During the process of making my desktop look like OS X, I slowly started to appreciate the approach Apple has taken with its operating system. Instead of replicating the steps of the industry leader, they dare to be different. According to some, this has even led the industry leader to follow in Apple’s footsteps!

Unfortunately, all this innovating does not make creating a lookalike any easier. The most noticeable inaccuracy is in the GTK theme: because of its use of the pixmap engine, button images need to be stretched both horizontally and vertically, so they often look very odd compared to their OS X counterparts. Other themes such as Leopardish also come close, but no cigar.

That said, the result ended up quite nice. When compared to the Vista “clone”, a world of difference can be found. Clearly, an extensive range of customisation options is available to Xfce users, which emphasizes that Xfce really does not lag behind GNOME nor KDE when it comes to customisability.







Those interested in moving application menus to their panel will be interested to know that it is possible, with support for Xfce’s panel. However, this is a very hackish solution and therefore strongly discouraged! As you’ll understand, I take absolutely no responsibility if it happens to end up in a disaster.

Advertisements

Design your own desktop with Xfce 4.4

Xfce is just as customisable as KDE or GNOME, so I set myself a goal: make Xubuntu look like Windows Vista. Why? Because I can. 🙂



Though you won’t be told how to achieve the exact same end result (Microsoft™©® most likely would not appreciate that), this guide provides comprehensive instructions helping you make Xubuntu look the way you want it to. In any case, I would certainly not recommend such a setup for someone new to Xubuntu. Xubuntu is different than Windows; making it look similar is only confusing.

Panels

Since Windows comes with a total of a mere one panel, I had to remove one of Xubuntu’s two default panels. This task was easily done using Xfce’s Panel Manager, which can be opened by right clicking empty space on a panel and selecting Customise Panel, or by opening Applications->Settings->Panel Manager.



Removing the first panel was simply a matter or clicking the - while the target panel was selected in the drop-down menu. Most options in the panel manager are quite straightforward as long as your realize that they apply to the panel currently selected in the drop-down menu. For my setup, I just wanted to change the size of the panel to 30 pixels and set a background image.

Wait… Did I say “background image”? There is no option in the panel manager to set a background image for your panels! Luckily, that other Xubuntu Blog comes to the rescue.
Basically, what we will do is to override the settings of whatever GTK theme you are using to apply a background image to panels. The disadvantage of this method is that this will be applied to all panels.
The first thing you need is, obviously, a background image to use. It can be as much 1 pixel wide, if you like, because it will be tiled throughout the full width of the panel. This image needs to be saved in your home directory (e.g. /home/yourusername/). You can prepend the filename with a dot . to make it a hidden file, e.g. /home/vincent/.panelbackground.png.

Now, to apply this background image, open up a text editor like Mousepad (Applications->Accessories->Mousepad). You then have to open the file .gtkrc-2.0, but since that is a hidden file (starting with a .), it is not listed among the other files. Luckily, in the “Open” dialog, you can just enter .gtkrc-2.0 in the Location field (press Ctrl+L to make it visible if it is not) to open it. More likely than not, it is an empty file.

Now, paste the following into that file, obviously replacing .panelbackground.png with the name of your background image.

style "panel"
{

bg_pixmap[NORMAL] = ".panelbackground.png"
fg[NORMAL] = "white"
}

widget_class "*Panel*" style "panel"
widget "*Panel*" style "panel"
class "*Panel*" style "panel"

Note that the fg[NORMAL] = "white" sets the text colour to white, but you can edit that to whatever (supported) colour you like, or remove the line altogether to use your theme’s default.

And that’s it really! The next time you login, this image will be used as background image for your panel.

Wallpaper

Of course I also wanted to use a wallpaper similar to Vista’s. Setting a background image for my desktop is a breeze, luckily. All that was needed was a click on the “browse” icon next to the File input field to select the image of my preference. If you want to, you can even make a list of files, of which one will be chosen each time you log in 🙂



GTK theme

Next up is changing the GTK theme, which is often one of the most notable changes because it encompasses almost everything on your screen. Download a theme you like (I used Murrina Aero) and open it (with Archive Manager). Select Archive->Extract (or the equivalent option if you use another archive manager than Xubuntu 7.10’s default) and extract it to /home/yourusername/.themes (again, enter .themes in the location field if it’s invisible).

Then open Applications->Settings->User Interface Settings, where your preferred theme should now be listed in the theme list. It will be applied when you select it.



Icon theme

Using icon themes, it is possible to change the commonly used icons. For my Vista-like setup I selected the nuoveXT icon theme.

The process of installing an icon theme is similar to the process of installing a GTK theme. After you have downloaded the theme, you extract it, however, this time you extract them to /home/yourusername/.icons.

Just as when changing your GTK theme, you need Applications->Settings->User Interface Preferences to change the icon theme. This time, however, you switch to the Icon Theme tab (surprise), where you can select the preferred icon theme in the list.

Fonts

Ultimately, I also wanted to use Microsoft’s Segoe UI font. Unfortunately, it can only be obtained together with a copy of Windows Vista.

However, there are plenty of other beautiful fonts available (like Red Hat’s Liberation fonts) that can be installed easily. You just need the TTF files, which you need to place in the .fonts directory. It can then be selected, just as your GTK theme and icon theme, through Applications->Settings->User Interface Preferences. Click the button below Font, where your font should be listed under Family.

Xfwm4 themes

The theming craze isn’t over yet, because you can also theme your window borders. By default, Xubuntu’s Window Manager is xfwm4, which can be themed with xfwm4 themes.

First you need to find an xfwm4 theme you like. Once you downloaded that theme, extract it to the .themes directory in your home folder.

The theme can then be easily applied using Applications->Settings->Window Manager Settings. The theme should show up in the list on the left-hand side, selecting it will apply it.



Emerald themes

If you installed Compiz using Emerald as window manager, then changing window border themes is a little bit different.

First, you need to get yourself an Emerald theme. Emerald themes are files that end in .emerald. I picked the theme included in the Aero-clone pack, aero_blue.emerald. To install the theme, you need to open Applications->Settings->Emerald Theme Manager. Click Import… and open the .emerald file. The theme will be selected when you click it in the list.



Conclusion

Xubuntu (and open source desktops in general) offers an enormous range of options allowing you to tweak the look to your own preferences. You can make it look as ugly or as pretty as you want. Heck, if you want to, you can make it look near pixel-perfect like another operating system!





The end result might not be perfect, but you can get very close 😀



Getting the right image

Update: Using Toad’s very useful comment this post now uses a better method. Thanks Toad!

As noted on the Xubuntu website, there is a most urgent need for testers of Xubuntu’s next release, 7.10, dubbed Gutsy Gibbon. Now, obviously you are eager to help out, so you download Xubuntu’s latest ISO image in order to burn it onto a CD. However, you realize that, when you report a bug in Launchpad, the error might just be caused by an incorrect download. How are you to know that your download completed successfully?

That’s where MD5 comes in. MD5 is an algorithm to convert input to a 32-character text string. When provided the same input, it will always return the same output. What’s more, it can even take a file as argument, including your ISO image!

You get it: if the MD5 sum (the output) of the image you downloaded is the same as the sum of the image on the server, your image is the same as the image on the server, and you know your download was not corrupted 🙂

So how do you get Xubuntu to calculate the MD5 sum of your ISO image? It’s simple, really. First, of course, you need the image itself, so go and download that, save it in a folder of your choice. You also need the MD5SUMS file listed on the same page, so click the MD5SUMS link.



You will see a text file that will look something like this:

d39feb6d64127aac844cf99d788f3b5b *xubuntu-7.10-alternate-amd64.iso
8a6e05a36ff5098ece6e3d28ad3b279a *xubuntu-7.10-alternate-i386.iso
41c7b57b82373d756adf6d90558c2c86 *xubuntu-7.10-desktop-amd64.iso
877ae9aceb9fa5abcc8f8758c3f9f111 *xubuntu-7.10-desktop-i386.iso

As you can guess, this file lists the MD5 sums that are associated with the files listed on the server. Save the file (in Firefox: File->Save Page As) into the same folder you downloaded the ISO image to.

When the download is complete, open Thunar (Applications->Accessories->Thunar File Manager) and browse to the folder you downloaded the image to. Right-click the part of Thunar where the contents of the folder is displayed and select “Open Terminal Here” (yes, you have to work in a terminal window, but it’s not scary or anything). A terminal window opens, in which you have to enter the md5sum command, with the -c argument and instruct it to use the MD5SUMS file. In short, enter this:

md5sum -c MD5SUMS

This will look for each file listed in the MD5SUMS file and, if it is present, calculate the MD5 sum of that file and compare it with the one listed in the file.
The output should be similar to this:

md5sum: xubuntu-7.10-alternate-amd64.iso: No such file or directory
xubuntu-7.10-alternate-amd64.iso: FAILED open or read
md5sum: xubuntu-7.10-alternate-i386.iso: No such file or directory
xubuntu-7.10-alternate-i386.iso: FAILED open or read
md5sum: xubuntu-7.10-desktop-amd64.iso: No such file or directory
xubuntu-7.10-desktop-amd64.iso: FAILED open or read
xubuntu-7.10-desktop-i386.iso: OK
md5sum: WARNING: 3 of 4 listed files could not be read



As you can see, it encounters a few errors about files not found, because, well, it can’t find some files… There are four files listed in the MD5SUMS file, but I only wanted to check the MD5 sum of one: xubuntu-7.10-desktop-i386.iso in my case. And look what it says:

xubuntu-7.10-desktop-i386.iso: OK

My MD5 sum is correct!

However, the image might still get corrupted when burning it onto a CD! Luckily, Xubuntu can check the MD5 sum when you boot the CD, by choosing Check CD for defects in the menu.



It will then “check the integrity” of the CD.



Once it has finished, it will notify you whether errors were found.



If no errors were found both in the downloaded image and burned CD, then you know that any errors encountered are not caused by a corrupt download or an error in burning the CD. Obviously, this means it is a bug and should be reported in Launchpad 😉

(And by the way, thanks for testing 😉 )

Ubuntu Feisty on your USB drive – finally!

IMPORTANT NOTE: Unless for some specific reason you want to run Ubuntu version 7.04 specifically from your USB Drive, this tutorial is deprecated. I’ve written an updated and much easier tutorial on how to run the latest version of Ubuntu from your USB flash drive.

Important: As SurJector mentions, he has found another workaround that is much less work. After you have followed his instructions, you can skip on to the partitioning part (i.e. that part that is very similar to almost my whole post about putting Xubuntu on your USB drive).

Update: I now also have a guide on putting Xubuntu Feisty on your USB drive.

Note: All screenshots are also available as a slideshow.

When, in June 2006, Ubuntu Dapper Drake was released, it introduced a very exciting new feature: the ability to run it from a USB drive (also pendrive, USB bar or memory stick). This would work just like a LiveCD, with the big improvement that all your data could be saved onto the USB drive! This means not just your documents, but also e.g. network settings or your desktop background. You were practically carrying around a fully-functional operating system on your USB drive!

However, as Ubuntu 7.04 “Feisty Fawn” contained some new packages, it also introduced a bug due to which your data would no longer be saved. When it was released, this bug still wasn’t fixed. It is expected to be fixed in the next release, 7.10 “Gutsy Gibbon”, to be released in October of this year. Up until then, we’re out of luck.

You’d think. However, thanks to the hard work of Mike (mjpca on the Ubuntu Forums) and some others (see the bug report on Launchpad and the thread on the Ubuntu Forums) there is now a way to work around this bug, which I’m going to show you in this post.

The basic idea is that the files that prevent persistence (the ability to save your data to the USB drive) from working can be replaced by their previous versions as present in Ubuntu 6.10 “Edgy Eft”. However, because files on the LiveCD are compressed so they can fit on one CD, replacing these files requires quite some effors. Luckily, Mike has done all the hard work for you and has created a new hybrid Edgy/Feisty image. To use it, your computer needs to be of the type Intel x86. Don’t worry, if you don’t know what this is, you probably use it. Furthermore, I recommend you use a USB drive of at least 2 GB, because the image is quite large.
For those with 1GB USB drives or who prefer Xubuntu (which would be me ;)) I plan on creating a Xubuntu image, but I’m not quite sure if I’m able to. If it works out, of course I’ll post on this blog.

Note: This tutorial is adapted from this How-to from Debuntu.org.

To start, fire up Gparted from Applications->System->GNOME Partition Editor (note: for those that do not use Xubuntu, you’ll have to find the applications yourself). On the top, right-hand side, you can select which drive you want to partition — select your USB drive. Be careful not to select any other drive, because you will be erasing all data that is available on that drive! You first have to delete all existing partitions, which will erase all existing data. Note down or remember the name of your drive, because you’ll need it later. Mine is /dev/sda

Preparing my USB drive for persistence - clear partitions

We then create the first partition, which will contain Ubuntu. Set its size to 840 MB (which is the same as MiB), its filesystem to FAT16 and leave the rest as is.

Preparing my USB drive for persistence - creating main partition

We will then create the second partition, which will hold all of our data. Just let it take all of the remaining space and set the filesystem to ext2.

Preparing my USB drive for persistence - creating casper-rw partition

Make sure that every partition is unmounted. If a partition is not, right-click it and select unmount.

Preparing my USB drive for persistence - make sure they are unmounted

You then see an overview of how the drive will be partitioned — click the checkmark or select Edit->Apply to apply your actions.

Preparing my USB drive for persistence

It will ask you if you are sure, because it will erase all your data. If you’re fine with that, select Apply.

Preparing my USB drive for persistence - continue?

You’ll then have to wait a little while Gparted applies the operations. When it’s finished, you can close Gparted.

Preparing my USB drive for persistence - creating partitions...

Now you need to format each partition and give it a label. The name of the first partition, which holds Ubuntu, does not matter that much, however, the partition that needs to hold your data needs to be named casper-rw.

To partition and label the first partition, run the following command, in which you replace /dev/sdx with the name of your drive (Remember? Mine was /dev/sda). Note that I named it UbuntUSB (how original) but if you want, you can just use another name:
$ sudo mkfs.vfat -F 16 -n UbuntUSB /dev/sdx1
This won’t take long. For the second partition, you run this command, again, replacing /dev/sdx with the name of your drive (but keep the name casper-rw!):
$ sudo mkfs.ext2 -b 4096 -L casper-rw /dev/sdx2
This will take a bit longer, and will also output more.

Preparing my USB drive for persistence - setting labels

And here comes the fun part. You need to download the image that Mike created (generously hosted by pepeio. Use the second ISO he created). After it has finished downloading (can take quite a while) you need to extract the .iso file using Xarchiver. I recommend you to save it to a folder in /tmp so that it will be deleted on shutdown, because you don’t need it after you’re finished. I saved it to /tmp/ubuntu-livecd. Make sure you check “Extract files with full path”.

Extracting the .iso

Now you need to copy some files (which contain Ubuntu) to your USB drive, onto the first partition (which I named UbuntUSB). First copy the folders casper, disctree, dists, install, pics, pool, preseed and .disk (to see this one, select View->Show Hidden Files). Then we need the files md5sum.txt, README.diskdefines and ubuntu.ico. Then move to the folder “isolinux” in the extracted folder (so for me, that would be /tmp/ubuntu-livecd/isolinux), but do not change your location in the USB drive. Copy all the files that are present in the isolinux folder to your USB drive. Then, move into the “casper” folder in the extracted folder (/tmp/ubuntu-livecd/casper) and copy vmlinuz and initrd.gz to your USB drive. Finally, move into the “install” folder in the extracted folder (/tmp/ubuntu-liveusb/install) and copy mt86plus to your USB drive.

Preparing my USB drive for persistence - copying required files

Now, on your USB drive, rename the file isolinux.cfg to
syslinux.cfg.

Preparing my USB drive for persistence - rename isolinux.cfg to syslinux.cfg

Replace all its contents with the following:

DEFAULT persistent
GFXBOOT bootlogo
GFXBOOT-BACKGROUND 0xB6875A
APPEND file=preseed/ubuntu.seed boot=casper initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash --
LABEL persistent
menu label ^Start Ubuntu in persistent mode
kernel vmlinuz
append file=preseed/ubuntu.seed boot=casper persistent initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash --
LABEL live
menu label ^Start or install Ubuntu
kernel vmlinuz
append file=preseed/ubuntu.seed boot=casper initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash --
LABEL xforcevesa
menu label Start Ubuntu in safe ^graphics mode
kernel vmlinuz
append file=preseed/ubuntu.seed boot=casper xforcevesa initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash --
LABEL check
menu label ^Check CD for defects
kernel vmlinuz
append boot=casper integrity-check initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash --
LABEL memtest
menu label ^Memory test
kernel mt86plus
append -
LABEL hd
menu label ^Boot from first hard disk
localboot 0x80
append -
DISPLAY isolinux.txt
TIMEOUT 50
PROMPT 1
F1 f1.txt
F2 f2.txt
F3 f3.txt
F4 f4.txt
F5 f5.txt
F6 f6.txt
F7 f7.txt
F8 f8.txt
F9 f9.txt
F0 f10.txt

Save that and close. For our last step, we need the packages syslinux and mtools, so fire up Synaptic (Applications->System->Synaptic Package Manager) and install them. Make sure that your USB drive is unmounted, then go into a terminal (Applications->Accessories->Terminal) and enter the following command, replacing /dev/sdx with the name of your drive:
$ sudo syslinux -f /dev/sdx1

Preparing my USB drive for persistence - making my USB drive bootable

Well, all that is left now is to test it, so boot from your USB drive, and then you’ll (if everything went right) be greeted with a screen like the one I was greeted with:

My Ubuntu Feisty Desktop from my USB drive

If this tutorial worked for you, please leave a reply in the comments here. If it didn’t work, you can also leave a comment, or rather (if you have an account) post a message in the Ubuntu forums thread, so we can find a way to fix it.

Note: If you want to create a new user, be sure to grant administrator rights, otherwise it may cause errors.

Troubleshooting

  • Toad mentions that he could not boot from his USB drive, but he fixed it:

    I finally got the computer to boot from the USB stick. I had to set the fat16 partition to bootable. ‘cfdisk /dev/sdx’ should do the trick, just press enter on the set bootable option.

  • If this worked, but after a while it doesn’t anymore, you can remove any edits you did to restore it to the point where it worked (all your settings will be lost though):
    $ sudo mkfs.ext2 -b 4096 -L casper-rw /dev/sdx2
    (Thank zenobiaflex for this one)
  • If you want more than the two partitions described here on your disk, be sure that the first partition needs to be the FAT16 partition, as that’s where the bootloader gets loaded which needs to be on the first partition. Thanks Matt.
  • If your drive won’t boot correctly, your Master Boot Record may be corrupted. You can repair it with Lilo (so open up Synaptic from Applications->System->Synaptic Package Manager and install the package lilo) using the following command from the terminal:
    $ sudo lilo -M /dev/sdx
    (From PiterP)
  • If, during shutdown, the screen switches from the shutdown screen with the Xubuntu logo with the progress bar to a black screen, possibly with error messages, then you computer is probably just shutting down the normal way without notifying you of its status. At a certain moment (not too long after the screen turned black) it will have reached the point where it would have normally said something like “remove the disk, close the tray (if any) and press enter”. So when the screen turns black, you just have to try to press enter a little while after it has turned black.

Controlling your media player

In my previous post, I promised I’d show how to control your media player to skip to the next song when you press a combination of keys. Admittedly, I should’ve posted this earlier (especially since it’s not that big a post), but better late than never, isn’t it?

The basic idea is that you can run a command with so-called arguments. Most (if not all) media players on Linux also take arguments to skip to the previous or next song in your playlist, or to play/pause the current track. This is extremely useful if you just want to listen to music without the program you use to play it bothering you.

You know how to find the command of your media player (I explained it in Your wish is Xubuntu’s command). My media player is Exaile, the command of which is “exaile”. This is what I’ll be using in this post, but you can replace it by the command of your preferred media player.

To find out which arguments a program takes, you have to resort to a terminal window (Applications->Accessories->Terminal). From there, you can read a program’s manual by typing man <command>, so I’d use man exaile:
Exaile's man page
You can read through it by using the arrow keys and exit the manual by pressing “q” (so “Esc” won’t work!).

Some programs don’t have a manual, but if they don’t, they mostly take the --help argument, which gives you an overview of all other arguments available. I’d use exaile --help:
exaile --help

As you see, Exaile supports both of these commands. It doesn’t really matter which I use, both tell me I can skip to the next song with the --next argument (or -n), to the previous one with --prev (or -p), and play/pause (depending on its current state) with --play-pause (or -t, from toggle).

Knowing that, I opened up the Keyboard Settings (Applications->Settings->Keyboard Settings) and in the Shortcuts-tab I set the commands exaile --prev, exaile --play-pause and exaile --next to some keyboard shortcuts. I could then control Exaile using my keyboard! Now, every time I start Exaile I minimize it to the system tray so that it would just be an icon in my panel. Using the “LibNotify Plugin” I get a notification which song I skip to, making my media player as unobtrusive as possible:

Xubuntu Feisty just installed - Cool, integration!

Customisations like this are the reason I love using Xubuntu – it adapts to you instead of the other way around. It are these little things that makes using a computer just that extra bit more pleasant.

Your wish is Xubuntu’s command

I remember well how a friend of mine proudly showed me that he could easily launch Internet Explorer using a special key at the top of his keyboard. Today, I know that with Xubuntu, I can use my regular keys (and cheap keyboard 😉 ) to launch any program. Inspired by this article I decided to share this trick with you.

How it works? Simple. As you might know, a program on Linux is started when a command is executed. A command is executed e.g. when you type it in the terminal, but also when you click a menu entry in your applications menu. In Xubuntu, you can assign these commands to certain keyboard shortcuts, so that when you press the set key combination, the specified command will be executed.

Of course, in order to assign a command to a keyboard shortcut, you need to know which command you need. In order to find this, you can use Xfce’s Appfinder, which you can find in the Applications menu under Accessories.

Xfce4 Appfinder's default screen

Using the “Search:” box on top, you can find the program you need the command of. I wanted to find “Warzone 2100”, so I entered that and pressed “Enter”. It then showed up in the list. To find the command, I right-clicked Warzone 2100’s entry and selected “More Information…”:

View a program's information

As you can see, Warzone 2100’s command is, surprisingly, warzone2100.

I then fired up my keyboard settings from Applications->Settings->Keyboard Settings. On top, I selected the “Shortcuts” tab. The first time you want to add keyboard shortcuts, you need to create a new “Theme” using the left Add button. As you can see, I created the theme “Examples”, and had created the theme “Vincent” before.

Keyboard settings

Then using the right “Add” button you can assign a new command so a certain keyboard shortcut. I could’ve used Warzone 2100 here, but I used xflock4 because this command is not one you’d find with the Appfinder and I personally use it a lot. As you might guess, this command locks the screen (i.e. starts your screensaver).

Adding a command

After I clicked OK I was prompted for the command I wanted to use.

Setting a shortcut

As I like to use my left “Ctrl” key in combination with the “0” in the numpad on the right, I entered that. And that was it! I could now use that key combination to lock my screen!

The shortcut is added!

Admittedly, the “Keyboard Settings” window is not very user-friendly, and yes, the creation of themes sounds a bit useless to me to, but at least it works. You can use the same procedure to add a keyboard shortcut for all your favourite programs. For example, I used this to assign Ctrl+F12 to the command “firefox” which will, not surprisingly, open Firefox. So by combining with the Ctrl key, I already have 12 possible special keys on top of my keyboard!

In my next post I’ll show how to control your media player to skip to the next song when you press a combination of keys. Stay tuned!

Email notification

Do you also sometimes find yourself desperately checking for new emails, afraid as you are to miss anything? Well, that time is over now, with the extremely handy Mail Watcher Panel plugin! If you set it up correctly, you can get it to notify you of new messages in a nice popup balloon and gives you easy access to your email.

Mailwatcher Notification Balloon

Of course, the first step is to add this plugin. Not that difficult: right click a panel, “Add New Item”, then in that window select “Mail Watcher”, then click “Add”.

You then get the “Edit Properties” window. In this window you can select what type of email you want to watch by clicking “Add”.

Mailwatcher - Add New Mailbox

Now, that’s very cool and all, that it checks your e-mail, but we’d like to go a bit further. First, we want it to open our email when we click the Mail Watcher icon. If you use some kind of web mail, e.g. Gmail, then we can set the “Run on click” command to firefox -new-tab http://gmail.comThat will open a new tab in Firefox that will display your email. If you use an email program like Thunderbird, you can set this command to that program, e.g.: thunderbird

Now that we have that set, let’s set the coolest feature – the notification balloon! First, we will need to have libnotify-bin installed, so fire up the Synaptic Package Manager and install that. Then we can add the “Run on new messages” command: notify-send "New mail" "You have new messages in your inbox" -i xfce-newmail

Mail Watcher - Edit Properties

Tada! Now you are all set and will be notified when you receive a new email.


a

Advertisements