Fix: Incoming Skype messages stealing focus on Linux Mint (Cinnamon)

After upgrading my PCs to Linux Mint Debian Edition, and thereby using the Cinnamon user interfacen, I encountered a particularly bothersome behaviour: For every incoming Skype message the skype window would come to the front and grab focus. So while typing you would even  continue to type in the Skype Window. Luckily I found a fix in the Skype Linux support forums.

This behaviour is already fixed in the Cinnamon Repository, But you can fix it yourself and don’t have to wait for an update. For instance the problem doesn’t seem to be fixed in the Update Pack 5 to Linux Mint Debian Edition.


At first locate the file called windowAttentionHandler.js – this can easily be done on the command line:

locate windowAttentionHandler.js

For me the path is /usr/share/cinnamon/js/ui/windowAttentionHandler.js – now you just need to open this file as a super user and make the same change as in the commit.

More easily speaking, at first open the file in a simple editor (pluma, gedit, nano, vi…) as the super user:

sudo gedit /usr/share/cinnamon/js/ui/windowAttentionHandler.js

now find this line:

if (!window || window.has_focus() || window.is_skip_taskbar())

And replace it with this line (or just adjust the latter part so it lookes like the line below):

if (!window || window.has_focus() || window.is_skip_taskbar() || window.get_wm_class() == "Skype")

For some weird reason the line wrapping of the code block doesn’t work. So hover that code box with your mouse and select view source code, you can then copy and paste from there!

Please be careful not to mess with the file, that could break your system (or at least the handling of the attention of windows). So make sure to make a backup of that file.

After this a restart is probably required for the changes to take effect, at least it was for me. As commenter Clement said you can also just hit Alt + F2 and type “r” and hit ENTERin order to restart cinnamon (Thanks for the comment!). So now, happy using Skype 😉

(By the way: there is a new Skype version for Linux – which doesn’t seem to be in the repositories yet. Check it out!)


5 thoughts on “Fix: Incoming Skype messages stealing focus on Linux Mint (Cinnamon)

  1. It made my day ! Now the taskbar is highlighted and I can continue to type my code without brutal autofocus to skype.
    You can restart cinnamon with : ALT F2 type “r” and hit ENTER

    Some problems with the copy/paste of the code line. Do not copy/paste from the article text. Move your mouse over the last block of code, click on “View source” and copy from this window !
    You’ll have some invisible problems and Cinnamon will not work anymore (like me!). Keep a backup of your file…

    1. Thank you very much for the feedback! =)

      I’ll incorporate it into the post in a couple of minutes!

      edit: took me a bit longer than a couple of minutes but the post should be updated now. Thanks again for your feedback and glad that I could help you!

    1. Good to hear that it helped! However the newest cinnamon version (shipped to LMDE few days ago) should also have this bug already fixed!

  2. Hi
    BTW if like me you are using the brilliant skypetab-ng then you need to change the entry above to:
    if (!window || window.has_focus() || window.is_skip_taskbar() || window.get_wm_class() == “SkypeTab”)
    and of course restart cinnamon – or just login and logout if you don’t know how to do this.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s