{"id":16,"date":"2011-06-30T20:34:32","date_gmt":"2011-06-30T18:34:32","guid":{"rendered":"http:\/\/www.sigterm.ch\/?p=16"},"modified":"2011-06-30T20:34:32","modified_gmt":"2011-06-30T18:34:32","slug":"gnome-3-change-the-message-notification-timeout","status":"publish","type":"post","link":"https:\/\/sigterm.ch\/?p=16","title":{"rendered":"Gnome 3 &#8211; Change the message notification duration"},"content":{"rendered":"<p>Recently at work I updated my box to Ubuntu 11.04. I really couldn&#8217;t handle Unity &#8211; so I installed Gnome 3&#8230; It took some time but now I like it.<br \/>\nI have pidgin installed and every chat message I get shows me a Gnome message notification for a couple of seconds. A nice, useful helper I would say. But I&#8217;m at work and some friends of mine have the terrible habit to write a new message for every single word they use. \ud83d\ude42 When someone is starring at your\u00a0screen at this time it&#8217;s quite uncomfortable&#8230;<br \/>\nAfter googling a bit I couldn&#8217;t find any solution to change the duration time of the notification. So I&#8217;ve found a solution on my own. I tested this on Ubuntu 11.04 and on my Arch Linux computer at home.<!--more--><br \/>\nThe gnome-shell GUI stuff is located in \/usr\/share\/gnome-shell\/js\/ui.<\/p>\n<pre class=\"brush:shell\"># cd \/usr\/share\/gnome-shell\/js\/ui<\/pre>\n<p>There you have to edit the messageTray.js file.<\/p>\n<pre class=\"brush:shell\"># vi messageTray.js<\/pre>\n<p>In the first 20 lines you find the variable &#8216;NOTIFICATION_TIMEOUT&#8217;. On my computer the default value was 4, later in the code we can find that this stands for a four seconds duration time. I changed it to 0.5 seconds. You can change it to whatever you like.<\/p>\n<pre class=\"brush:shell\">const NOTIFICATION_TIMEOUT = 0.5;<\/pre>\n<p>*Hint: You have to edit the file as root!<br \/>\nAfter doing all that you have to restart the gnome-shell.<\/p>\n<pre class=\"brush:shell\">$ gnome-shell --replace<\/pre>\n<p>This worked as expected the first time, the second time my desktop froze and I had to restart my computer&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently at work I updated my box to Ubuntu 11.04. I really couldn&#8217;t handle Unity &#8211; so I installed Gnome 3&#8230; It took some time but now I like it. I have pidgin installed and every chat message I get &hellip; <a href=\"https:\/\/sigterm.ch\/?p=16\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[19,40,56,57,58,59,97,107,108,109,159,160,161],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-linux","tag-arch-linux","tag-customize-gnome-3","tag-gnome-3","tag-gnome-shell","tag-gnome-shell-3","tag-gnome3","tag-linux","tag-notification-duration","tag-notification-message","tag-notification-timeout","tag-ubuntu","tag-ubuntu-11-04","tag-ubuntu-natty"],"_links":{"self":[{"href":"https:\/\/sigterm.ch\/index.php?rest_route=\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sigterm.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sigterm.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sigterm.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sigterm.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16"}],"version-history":[{"count":0,"href":"https:\/\/sigterm.ch\/index.php?rest_route=\/wp\/v2\/posts\/16\/revisions"}],"wp:attachment":[{"href":"https:\/\/sigterm.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sigterm.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sigterm.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}