{"id":1042,"date":"2012-01-12T12:51:05","date_gmt":"2012-01-12T17:51:05","guid":{"rendered":"http:\/\/ywwg.com\/wordpress\/?p=1042"},"modified":"2012-10-19T13:15:40","modified_gmt":"2012-10-19T18:15:40","slug":"reordering-indicators-in-ubuntu","status":"publish","type":"post","link":"https:\/\/ywwg.com\/wordpress\/archives\/1042","title":{"rendered":"Reordering Indicators in Ubuntu"},"content":{"rendered":"<p>Now that the GNOME panel is dead (long live the panel), the next best option for displaying system information in the upper menu bar is Ubuntu&#8217;s Indicators.  Indicators are a much less powerful system than the old panel once was, due to various tradeoffs of complexity for ease-of-use.  One limitation is that indicators seem to appear in a random, arbitrary order.  I&#8217;d prefer to arrange the indicators myself.  For instance I&#8217;d like to have all my system monitors grouped together.  <\/p>\n<p>It turns out there is a way to reorder the icons, but it&#8217;s tricky.  These instructions assume you know how the command line works and can read a process list without getting worried.  Until the Ubuntu developers <a href=\"https:\/\/bugs.launchpad.net\/indicator-applet\/+bug\/915428\" title=\"lp#915428: Add ability to reorder indicators\" target=\"_blank\">add the ability to reorder indicators<\/a> this is the only way to do it.  <a href=\"http:\/\/www.webupd8.org\/2011\/06\/how-to-change-application-indicators.html\" title=\"How To Change Application Indicators Order In The Ubuntu Indicator Applet\" target=\"_blank\">This page<\/a> gave me a good head-start.  You have to start by creating a special &#8220;override&#8221; file that will tell the indicator applet how to reorder the icons.  Start by creating the override file with the system defaults:<\/p>\n<p><code>mkdir -p ~\/.local\/share\/indicators\/application<br \/>\ncp \/usr\/share\/indicator-application\/ordering-override.keyfile ~\/.local\/share\/indicators\/application\/<br \/>\ngedit ~\/.local\/share\/indicators\/application\/ordering-override.keyfile &<br \/>\n<\/code><\/p>\n<p>My default file looked like this:<br \/>\n<code>[Ordering Index Overrides]<br \/>\nnm-applet=1<br \/>\ngnome-power-manager=2<br \/>\nibus=3<br \/>\ngst-keyboard-xkb=4<br \/>\ngsd-keyboard-xkb=5<\/code><\/p>\n<p>The next step is tricky: You&#8217;ll need to add each indicator to the file and assign it a number (lower numbers are further to the right), but what do youo call each item?  In many cases (but not all), the name is the same as the executable.  <code>indicator-cpufreq<\/code> is just <code>indicator-cpufreq<\/code>.  Run this command to list all the indicators running on your system:<\/p>\n<p><code>ps xa |grep indicator-<\/code><\/p>\n<p>Other applications, like Tomboy, set up their own indicator name.  We need a way of finding out what that name is.<\/p>\n<p>The only way I know of to find this name is to rerun the indicator service and read through the debugging output.  Yeah, I know.  Warning, this process may mess up the display of your indicators.  Nothing done here is permanent, so you can always log out and log back in to restore your regular desktop.<\/p>\n<p>Try this:<br \/>\n<code>killall indicator-application-service && \/usr\/lib\/indicator-application\/indicator-application-service<\/code><\/p>\n<p>Much text will start spewing.  If the command prompt comes back right away and you see the following text, just try the command I gave you again:<\/p>\n<p><code>(process:7601): libindicator-WARNING **: Name request failed.<br \/>\n(process:7601): indicator-application-service-DEBUG: Service disconnected<br \/>\n(process:7601): indicator-application-service-DEBUG: Application proxy destroyed '(null)'<br \/>\n(process:7601): indicator-application-service-DEBUG: Application free '(null)'<br \/>\n<\/code><\/p>\n<p>Look for lines like this:<br \/>\n<code>(process:7672): indicator-application-service-DEBUG: 'bluetooth-manager' ordering index is '20626C75'<\/code><\/p>\n<p>This tells you two things:  <code>bluetooth-manager<\/code> is the name of this particular indicator, and that&#8217;s what you&#8217;ll want to put in your override file.  Also, <code>20626C75<\/code> is the current ordering index.  Because it&#8217;s a long number, this value is not currently being overridden.  <\/p>\n<p>Now we want to make some changes.  <\/p>\n<p>Edit your override file.  Here&#8217;s mine:<br \/>\n<code>[Ordering Index Overrides]<br \/>\nnm-applet=1<br \/>\ngnome-power-manager=2<br \/>\nibus=3<br \/>\ngst-keyboard-xkb=4<br \/>\ngsd-keyboard-xkb=5<br \/>\nindicator-penguintv=6<br \/>\ntomboy-notes=7<br \/>\nmultiload=8<br \/>\nindicator-sensors=9<br \/>\nindicator-cpufreq=10<br \/>\nindicator-sysmonitor=11<br \/>\n<\/code><\/p>\n<p>The rerun the command I gave you.  You should see some changes:<\/p>\n<p><code>(process:7672): indicator-application-service-DEBUG: 'indicator-sensors' ordering index is '9'<\/code><\/p>\n<p>This means that I successfully assigned the ordering value of 9 to indicator-sensors.  And indeed, all my indicators are in the order I want.<\/p>\n<p>When everything is how you want it, log out and log back in to make sure the changes worked.<\/p>\n<p><em>update 10\/19\/2012:<\/em><\/p>\n<p>there&#8217;s a better way to list running indicators:<br \/>\n<code>dbus-send --type=method_call --print-reply \\<br \/>\n--dest=com.canonical.indicator.application \\<br \/>\n\/com\/canonical\/indicator\/application\/service \\<br \/>\ncom.canonical.indicator.application.service.GetApplications | grep \"object path\"<\/code><\/p>\n<p>This will print out the running indicators.  replace underscores with hyphens in the keyfile<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that the GNOME panel is dead (long live the panel), the next best option for displaying system information in the upper menu bar is Ubuntu&#8217;s Indicators. Indicators are a much less powerful system than the old panel once was, due to various tradeoffs of complexity for ease-of-use. One limitation is that indicators seem to &hellip; <a href=\"https:\/\/ywwg.com\/wordpress\/archives\/1042\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Reordering Indicators in Ubuntu&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41,13],"tags":[],"_links":{"self":[{"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/posts\/1042"}],"collection":[{"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1042"}],"version-history":[{"count":16,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/posts\/1042\/revisions"}],"predecessor-version":[{"id":1132,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/posts\/1042\/revisions\/1132"}],"wp:attachment":[{"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1042"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ywwg.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}