Fixing Autokey (GTK) on Ubuntu 12.04

Autokey is a wonderful scripting tool for Linux. Unfortunately, it doesn’t work out of the box in Ubuntu 12.04. The reason why is because Autokey isn’t on the Unity panel’s system tray whitelist. I submitted a bug report on Launchpad, but for now, if you want to get Autokey working without breaking the Unity panel for any other applications, it’s as simple as running the following command in the terminal:

if grep -q 'Autokey' <(echo `gsettings get com.canonical.Unity.Panel systray-whitelist`); then echo "'Autokey' exists in Unity panel whitelist. Nothing to do here."; else echo "Adding 'Autokey' to Unity panel whitelist." && gsettings set com.canonical.Unity.Panel systray-whitelist "`echo \`gsettings get com.canonical.Unity.Panel systray-whitelist | tr -d ]\`,\'Autokey\']`"; fi

This will check your current whitelist to see if Autokey is present, and if it isn’t intelligently append it to the whitelist without messing up your current whitelist entries. If it’s already there, it won’t add a duplicate entry. This one-liner can be easily modified to add any value you want to Unity’s system tray whitelist, in order to fix the same problems with other applications. Note that you may have to log out and log back in before the changes take effect. Enjoy! :)

3 Responses to Fixing Autokey (GTK) on Ubuntu 12.04

  1. Ray Vermey says:

    Like or Dislike: Thumb up 1 Thumb down 0

    This helped!
    Thank you!

    Ray

  2. AMC says:

    Like or Dislike: Thumb up 0 Thumb down 0

    THANK YOU!!

  3. ARno says:

    Like or Dislike: Thumb up 0 Thumb down 0

    Very nice thanks a lot !!!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>