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:
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!)