Ye blog of Adam Wright

DIY, tutorials, stuff for geeks, all updated when I have the time to spare.

Category Archives: linux

How To Make Skype Use libnotify in Linux

How To Make Skype Use libnotify [Linux]

skype libnotify

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.

skype libnotify

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

using libnotify

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.

The Command

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

using libnotify

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:

skype libnotify

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!

from MakeUseOf

my current screen setup

SSH error “Server refused our key” and how to fix it

I was getting this error for awhile when trying to use an authentication key in Putty to connect to an Ubuntu Server machine:
Server refused our key.

Long story short, the problem lies within my home directory being encrypted when I’m not logged in. Read below for further explanation.

The solution is to move the authorized_keys file location outside the home folder so the SSH daemon can access it even when you’re not logged in:

  1. sudo mkdir /etc/ssh/publicSSHkeys # Create a folder for public SSH keys
  2. sudo mv ~/.ssh/authorized_keys /etc/ssh/publicSSHkeys/ # Move the authorized_keys file there
  3. sudo nano  /etc/ssh/sshd_config # Modify sshd_config to the new location
    change this… “AuthorizedKeysFile    %h/.ssh/authorized_keys
    to this… “AuthorizedKeysFile    /etc/ssh/publicSSHkeys/authorized_keys
    NOTE: Sometimes the “AuthorizedKeysFile” variable is commented out, so remove the number sign if it is (Thanks to Frank for the tip!).
  4. sudo service sshd reload # Then you just need to reload the server
  5. You’ll still need to make sure your public key is in /etc/ssh/publicSSHkeys/authorized_keys, and your SSH client (in my case Putty) is loading your private key. There are numerous SSH key tutorials on the webernets.

Automatic home directory encryption is an option when installing Ubuntu systems (both desktop and server), and I recommend using it. I like knowing that, if I’m not logged in, my home directory is encrypted. However, this means that any server or daemon that requires access to a file or folders in your home directory will fail if you’re not logged in. Keep that in mind.

Installing twirssi on Ubuntu Server

I read a bunch of tutorials on using irssi for Twitter, but some were cryptic at best. Decided to make a quick tutorial.

  1. sudo apt-get install -y irssi # Install irssi
  2. mkdir -P ~/.irssi/scripts # if .irssi and scripts folders don’t exist, create them
  3. wget -O ~/.irssi/scripts/ # Get twirssi script
  4. sudo apt-get install -y libnet-twitter-perl # Install Net::Twitter
  5. sudo apt-get install -y libcrypt-ssleay-perl # Install Crypt::SSealy
  6. irssi # Start irssi
  7. /script load twirssi # Load twirssi script
  8. /twitter_login <your username> # Login to Twitter

Logging in requires some oauth authorization, I forget exactly how to do it but it’s something like /twirssi_oauth, then you copy and paste the url into a browser and enter your twitter credentials, which gives you a confirmation code to put back into twirssi. Read the documentation at the link below for more info.

twirssi usage guide:

Good luck. ^_^

Thanks to Zed and Death4Life in #irssi on Freenode for help getting it going!

ADOM is Nethack for simple RPG lovers

I’ve realized that Nethack is indeed amazing, and a shitload more vast and complex than World of Warcraft. I’ve also realized its too much for me. Instead, I’ve started playing ADOM (Ancient Domains of Mystery), which uses the same 2-D roguelike engine that Nethack uses, but is more like a simple RPG game. You still have the dungeons and monsters, but you also have the main world map to move around on and explore. Its like if someone remade an old Final Fantasy or Dragon Warrior or Ultima with ASCII characters, so that you can play it in an SSH session!
Unlike Nethack, ADOM features nice tutorial screens, letting you know what to do next if you’re new to the game. Quests and a quest log are also a part of the game, unlike Nethack, as well as many more free-moving NPCs which help the player along his or her way. Probably even more noticeable to new players is the change of button scheme allowing for much easier control of character actions For instance rather than typing “#chat” to talk to an NPC, you press Shift+c, and when you press “e” to eat something when you’re hungry, you’re given a nice menu of all edible items in your inventory. The player’s inventory has also been remodeled to actually show what each slot (right hand, left hand, head, legs, etc) on the player contains, even if they’re empty.
In my geeky opinion, there are tons of features in ADOM that make it more fun and easier to play, which make it more addicting than Nethack. However, while in IRC chat with some experienced Nethack players, they did attest that they’ve gotten so into Nethack that ADOM seems petty and almost childish now. But, being a newb to text-based games, I’m not complaining.
Installing the game is pretty easy; the officail site offers a tar archive which contains a simple executable that you just run from command line, but you should probably keep the executable in “/usr/games”. The site also says to create a new user and group named “adomown”, this is unecessary (or at least it was unnecessary for me).
Here’s how to install ADOM to your /usr/games directory:
  1. wget # Download the tar archive
  2. tar -xvzf adom-111-elf.tar.gz # Untar the archive
  3. sudo mv adom/adom /usr/games # Move the binary to the games directory
  4. sudo chmod +x /usr/games/adom # Make it executable
  5. rm -rf adom* # Delete the no longer needed tar and the untared files
  6. adom # Play the game
Have fun!
Put any questions in the comments.

Some links about ADOM:   –   a review of ADOM and some more info about it   –   official ADOM site
%d bloggers like this: