If you use Skype or certain other applications on Linux, you may be annoyed by how those programs use their own notification system rather than using the system default, known as libnotify. libnotify is responsible for creating those nice little bubbles or windows that aren’t intrusive on the screen. GNOME 2.x users usually have a black bubble in the top right corner, while GNOME 3.0 users get a notification across the entire bottom of their screen and KDE users get a transparent little window in the bottom right corner, as seen in the screenshot.
Thankfully though, Skype lets you change this behavior.
Skype can be downloaded from their website if you use a more popular distribution, such as Ubuntu, Fedora, openSUSE, or from your package repositories if you use a less popular distribution. If you use a 64-bit system, make sure that you have the correct dependencies installed. Ubuntu users shouldn’t have a problem, but there is only a 32-bit package for Fedora which requires some extra steps in order to get it to work in a 64-bit environment.
Changing The Settings
In order to change Skype’s notification behavior, you’ll need to go into the Settings. From there, you need to choose the Notifications tab on the left side. You’ll now see a fairly long list of different events that can occur in Skype, anywhere from logging in to phone calls. In order to change the correct options, you’ll need to click on the Advanced View button which is found on the right side of the window.
Now, for each selected event, you can change the exact notification settings. In order to achieve rerouted notifications, you’ll first need to turn off the Display pop-up notification option so that you don’t get two notifications (one of each) at the same time. Keeping the Play sound file option enabled or not is up to your personal preference.
Next, we’re going to use the Contact Signed In event as an example. You’ll need to copy this line into the Execute the following script box:
notify-send "Contact Signed In" "%name is now online." -i skype
What this command does is invoke the notify-send command, which is used by libnotify to generate a notification. “Contact Signed In” is the first parameter, which is used for the title of the notification. “%name is now online.” is the second parameter, which is used for the main text of the notification. The %name portion is a variable in which the name of the involved contact will be substituted for %name. Finally, -i skype simply tells libnotify that you’d like to use an icon (the skype icon) with your notification. libnotify can only use icons that are installed, so not any parameter will work with -i.
The final result will look something like this:
This procedure isn’t exactly perfect, as you’ll need to copy, paste, and adjust this command for every other event in Skype. Additionally, you’ll want to avoid using this on special notification types such as calls where the Skype-default includes some buttons to accept or decline a call, whereas the libnotify way won’t present those buttons to you.
libnotify is a great way to keep the notification styles of all supported applications uniform and simply “pretty”. While Skype doesn’t take advantage of this piece of software by default, it’s good to know that there are still ways where it’s possible, and who knows how many other programs support these types of modifications?
What other kinds of Linux fixes would you like to see? Is there a problem you just can’t seem to solve? Let us know in the comments!