10

It is trivial to do this in Ubuntu 10.04. The question is specific to Ubuntu 12.04.

A composition using the dbus with implementation details in followup is missing for some reason so an alter ego composed the answer (the trivial but somewhat laborious process is explained here).

This response regarding gdbus is useful but this answer is super useful - (quiescent system overhead has now been reduced to an acceptable ~10%).

some pertinent references
(src: answer to What is the difference between indicators and a system tray?:
Here is the documentation for indicators:

Application indicators | Ubuntu App Developer
libindicate Reference Manual
libappindicator Reference Manual

also

ref: How can the application that makes an indicator icon be identified? (This link inappropriately redirects to https://askubuntu.com/questions/184589/how-can-menu-bars-that-require-a-right-click-be-activated-like-ubuntu-versions)
bookmark: How does one find out which application is associated with an indicator icon in Ubuntu 12.04?
is a serious question for reasons & problems outlined below and for which a significant investment has been made and is necessary for remedial purposes.


reviewing refs. to find an orchestrated resolution ...
(an indicator ap. indicator maybe needed)


This has nothing to do (does it?) with right click.

How can an indicator's icon in Ubuntu 12.04 be matched with the program responsible for it's manifestation on the top panel?

A list of running applications can include all processes using System Monitor.

How is the correct matching process found for an indicator?

How are the sub-indicator applications identified? These are the aps associated with the components of an indicators drop-down menu. (This was to be a separate question and quite naturally follows up the progression. It is included here as it is obvious there is no provisioning to track down offending either sub or indicator aps. easily.)

(The examination of SM points out a rather poignant factor in the faster battery depletion and shortened run time - the ambient quiescent CPU rate in 12.04 is now well over 20% when previously, in 10.04, it was well under 10%, between 5% and 7%! - the huge inordinate cpu overhead originates from Xorg and compiz - after booting the system, only SM is run and All Processes are selected, sorting on %CPU - switching between Resources and Processes profiles the execution overhead problem - running another ap like gedit "Text Editor" briefly gives it CPU priority - going back to S&M several aps. are at the top of the list in order: gnome-system-monitor as expected, then: Xorg, compiz, unity-panel-service, hud-service, with dbus-daemon and kworker/x:y's mixed in with some expected daemons and background tasks like nm-applet - not only do Xorg and compiz require excessive CPU time but their entourage has to come along too! further exacerbating the problem - our compute bound tasks no longer work effectively in the field - reduced battery life, reduced CPU time for custom ap.s etc. - and all this precipitated from an examination of what is going on with the battery ap. indicator - this was and is not a flippant, rhetorical or idle musing but has consequences for the credible deployment of 12.04 to reduce the negative impact of its overhead in a production environment)

(I have a problem with the battery indicator - it sometimes has % and other times hh:mm - it is necessary to know the ap. & v. to get more info on controlling same. ditto: There are issues with other indicator aps.: NM vs. iwlist/iwconfig conflict, BT ap. vs RF switch, Battery ap. w/ no suspend/sleep for poor battery runtime, ... the list goes on)

Details from:
How can I find Application Indicator ID's?

suggests looking at:
file:///usr/share/indicator-application/ordering-override.keyfile

[Ordering Index Overrides]
nm-applet=1
gnome-power-manager=2
ibus=3
gst-keyboard-xkb=4
gsd-keyboard-xkb=5

which solves the battery ap. identification, and presumably nm is NetworkManager for the rf icon, but the envelope, blue tooth and speaker indicator aps. are still a mystery. (Also, the ordering is not correlated.)

Mind you, it was simple in the past to simply right click to get the About option to find the ap. & v. info.

browsing around and about:

file:///usr/share/indicator-application/ordering-override.keyfile

examined:
file:///usr/share/indicators
file:///usr/share/indicators/messages/applications/
...

perhaps?/presumably? the information sought may be buried in
file:///usr/share/indicators

A reference in the comments was given to:
What is the difference between indicators and a system tray?
quoting from that source ...

Unfortunately desktop indicators are not well documented yet: I couldn't find any specification doc ...

Well ... the actual document
https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators#Summary
does not help much but it's existential information provides considerable insight ...

5
  • and that application is ...?
    – Amos Annoy
    Sep 10, 2012 at 1:56
  • "BT indicator is usually used by Blueman (or similar)" - but how do I know exactly? maybe I am using "or similar"? this does not help - can you tell me exactly how to examine my system to unambiguously determine exactly which application is associated with each indicator? unity-panel-service is responsible for the manifestation of said environment but how are the populating applications, that associate with each indicator, determined?
    – Amos Annoy
    Sep 10, 2012 at 2:19
  • when the correct aps. are targeted things like: bluetooth-applet --help (bluetooth-applet:25165): BluetoothApplet-WARNING **: Applet is already running, exiting can be done - what is the Messaging Indicator ap.? it presumably retrieves it's content for the drop down menu from: file:///usr/share/indicators/messages/applications/
    – Amos Annoy
    Sep 10, 2012 at 2:34
  • The answer you quote is out of date, I've updated it, hope it helps. Sep 10, 2012 at 17:07
  • TQ - hope so - getting a good idea of indicator structure
    – Amos Annoy
    Sep 10, 2012 at 19:46

3 Answers 3

3

The Application Indicator Service has an internal API that will allow grabbing a list of all the indicators, which includes their DBus addresses. You can do that using this command line:

gdbus call --session --dest com.canonical.indicator.application --object-path /com/canonical/indicator/application/service --method com.canonical.indicator.application.service.GetApplications

You'll get back something not super useful, as it's in a psuedo-JSON format. If you write a script you can pull it into a parser and work with it. If you're curious about doing it just once, just read through the text. You're looking for a field that is like this: :1.XXX That is the DBus address for the indicator.

Once you have the address for the indicator you can ask DBus what the PID is for that indicator. You request the PID of :1.123 like this:

gdbus call --session --dest org.freedesktop.DBus --object-path / --method org.freedesktop.DBus.GetConnectionUnixProcessID :1.123

After you now have the PID you can ask /proc for information on the process. For example if you wanted to know the command use to launch process number 1 you could do:

cat /proc/1/cmndline

Good luck!

1
  • sweet! - did not know about gdbus was hoping a high level interface existed! - though it's not an API (Application Panel indicator) yet - it should not be hard to "make it so" - hope to make it be a done deal imminently - PS super sweet
    – Amos Annoy
    Sep 11, 2012 at 15:42
2

1st iteration

qdbus --literal   com.canonical.AppMenu.Registrar                  \
                 /com/canonical/Unity/Panel/Service                \
                  com.canonical.Unity.Panel.Service.Sync           \
| sed -e 's/[^{]*{\(.*\)}\]/\1/' | sed -e 's/\[[^"]*/[/g'          \
| sed -e 's/\[\(\(\("[^"]*"\|[^,"]*\), \)\{4\}\)[^]]*,\([^,]*\)\]/[\4, \1]/g' \
| sed -e 's/\[\([^,]*\, \)\("[^"]*",\)/[    \1\2                  /g'  \
| sed -e 's/\[ *\(....,.\{24\}\) */[\1/g'  | sed -e 's/\], \[/]\n[/g'  | sort -n -k2

producing:

[  -1, "libprintersmenu.so",  "", "", "", ]
[   0, "libappmenu.so",       "0x9581b90", "", "_File", ]
[   1, "libappmenu.so",       "0x9582ad0", "", "_Edit", ]
[   2, "libappmenu.so",       "0x9583cf0", "", "_View", ]
[   3, "libappmenu.so",       "0x9585828", "", "_Search", ]
[   4, "libappmenu.so",       "0x9586da8", "", "_Tools", ]
[   5, "libappmenu.so",       "0x96575a0", "", "_Documents", ]
[   6, "libappmenu.so",       "0x96596e0", "", "_Help", ]
[ 200, "libmessaging.so",     "0x9238c7c", "indicator-messages", "", ]
[ 250, "libpower.so",         "0x9346c54", "indicator-power", "", ]
[ 300, "libapplication.so",   "0x86a6368", "bluetooth-manager", "", ]
[ 450, "libapplication.so",   "0x930f650", "nm-applet", "", ]
[ 500, "libsoundmenu.so",     "0x9346cac", "indicator-sound", "", ]
[ 550, "libdatetime.so",      "0x931581c", "indicator-datetime", " 4:59:07 PM", ]
[ 600, "libsession.so",       "0x92ed45c", "indicator-session-devices", "", ]

2nd iteration

(w/ icons confirming association)

qdbus --literal   com.canonical.AppMenu.Registrar                  \
                 /com/canonical/Unity/Panel/Service                \
                  com.canonical.Unity.Panel.Service.Sync           \
| sed -e 's/[^{]*{\(.*\)}\]/\1/' | sed -e 's/\[[^"]*/[/g'          \
| sed -e 's/\[\(\(\("[^"]*"\|[^,"]*\), \)\{4\}\)\([^,]*, \)\{3\}\("[^"]*"\)[^]]*,\([^,]*\)\]/[\6, \1 <\5>]/g' \
| sed -e 's/<"">\]/]/g'  | sed -e 's/<"\([^"]*">\]\)/<img src="data:image\/png;base64,\1/g'    \
| sed -e 's/\], \[/<\/td><\/tr>\n<tr><td>/g'  | sort -n -k2 | sed -e 's/, /<\/td><td>/g'        \
| sed -e 's/\[/<html><table>\n<tr><td>/' | sed -e 's/\]/<\/td><\/tr>\n<\/table><\/html>/' >hapi.html

producing:

hapi.png

here's the hapi.html (w/o cell black background):

<tr><td> -1</td><td>"libprintersmenu.so"</td><td>""</td><td>""</td><td>""</td><td> </td></tr>   /*  oops  */
<html><table>
<tr><td> 0</td><td>"libappmenu.so"</td><td>"0x8b12b38"</td><td>""</td><td>"_File"</td><td> </td></tr>
<tr><td> 1</td><td>"libappmenu.so"</td><td>"0x8a1cd30"</td><td>""</td><td>"_Edit"</td><td> </td></tr>
<tr><td> 2</td><td>"libappmenu.so"</td><td>"0x8b01b28"</td><td>""</td><td>"_View"</td><td> </td></tr>
<tr><td> 3</td><td>"libappmenu.so"</td><td>"0x8b35700"</td><td>""</td><td>"_Search"</td><td> </td></tr>
<tr><td> 4</td><td>"libappmenu.so"</td><td>"0x8b11350"</td><td>""</td><td>"_Terminal"</td><td> </td></tr>
<tr><td> 5</td><td>"libappmenu.so"</td><td>"0x8b142f0"</td><td>""</td><td>"Ta_bs"</td><td> </td></tr>
<tr><td> 6</td><td>"libappmenu.so"</td><td>"0x8b37528"</td><td>""</td><td>"_Help"</td><td> </td></tr>
<tr><td> 200</td><td>"libmessaging.so"  </td><td>"0x85c8c7c"</td><td>"indicator-messages"   </td><td>""</td><td> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABHNCSVQICAgIfAhkiAAAAd9JREFUOI3t0UFP02AcBvDnfRvMSDzwBUy2CpZwwCN6Mc4FE8iQs9/BCzOytWxzm4EYMWEQMMHExE+gF+JxnuwYRtcWNlrcIurttRuY7WLCeD0V6+iE4cmEJ2nS9/n3/0ubAuf5b0Ocm92KkeEcUQAXzmj9BMFioH84CgDUaTnnSqlsrtXre9vdirVafbtUNt/wQz7ldPT3mAii6B9MpWYV9t02TosyZusPU7MxUfRLhJAeDxjo9fmGstknsWR6TrHtk3HGbF1OpOWlxXml1+cbcs9o+8OU0pGVpadxOfHorzhjth6dScaeP8smKKUjxxyvJYHSa6vLC8q0kpK9cMZsfSoiT79YXX4gCMJ1L8MTBoBms3kxErm3lc48ju/v/7Ccvl7bKyczczNy/H6p0Wj0ddo/yudPBneuwrucFgrdDFctbb1qaevB4I077/NvjT/6Hf1DeOz2xIaaK7p3O8IFNaePjgbHK5aWd7qKWVQlSbolSVKwYhbVo97SPk6GxyYKak5vh4kbBgBrp/pyoD9wiVIaOvEzAbRarfyXr992xYD/LgAEBoZJG6wfAEQ4DdYpnPMD8crVHsD184zN8ivOcfgPbMvY3HrtnIhrMgjgclvXlQygCsA8+8udp5v8AnS3+yjTJl0RAAAAAElFTkSuQmCC"></td></tr>
<tr><td> 250</td><td>"libpower.so"      </td><td>"0x86da454"</td><td>"indicator-power"      </td><td>""</td><td> <img src="data:image/png;base64,. GThemedIcon battery-charged battery-full-charged-symbolic battery-full-charged gpm-battery-charged gpm-battery-100-charging "></td></tr>
<tr><td> 300</td><td>"libapplication.so"</td><td>"0x86a6368"</td><td>"bluetooth-manager"    </td><td>""</td><td> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAWCAYAAAAW5GZjAAAABHNCSVQICAgIfAhkiAAAAchJREFUKJHNkc9LVFEUx7/3YUJF5EhgM6+GoBiEaNEy8g8ogihI2rSXYDIQNxW0EHEROdIsJkwEJ19kDWXRrjSKBgNzHO4d6um7b7xji9RZyFNxMVPvnjYpPXSyRYu+y3M+fL/nB/B/SjlipuTyW9v1jC0VhhgR61aycGNnGKTfZycGAeqplbCpOYd/N00z9jwz/FhJoZXkVwPOSoqEcvkZACAisizr64PBoUS1Ul354eubAdjzvOOk8bLkFM4BoKamfaHUvUSKGUZdMnm/OxBtmuapieybyTmHV4qzvFp0+JS082vxeNs1APu3LBqJRFo+ZscmlRTk2vn19njbdQAN211Dp9Ppwt49u+sBgBnGrtZLF74B8H6HGQDMz4uQX6FxX/tHGYz6crkswuGDJxljl48cOzEacPYr+gmRbh4YSHdprf2unju3FxaXuNZ6pOSKs4GBRzNWX2dHeweARsfOrQ7394ej0WjLTOFTuTjLFza4OgC42HolCWAFwDIAagyF6N3Yq/OMsQOvx9/erfE/wPmS86SdSygpdCrZ2wfgUE3YtfPrSgrKjDy0AByuCQLA9NSHzy+ePXoKIPZH8JdOA2j+G/Df6SfH0s58lIXOZQAAAABJRU5ErkJggg=="></td></tr>
<tr><td> 450</td><td>"libapplication.so"</td><td>"0x869f258"</td><td>"nm-applet"            </td><td>""</td><td> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABHNCSVQICAgIfAhkiAAAAvJJREFUOI3tkk9sVFUUxn/n3XmP6WBk/gBCojDTMJPSocNURJSV2qW6EKIkBaRRE5WYsCAahJCMbtREjEkTEzHRhmJFYnRhZGFMmhIWTUmpxVJDZpipmbSdMm1RoH2vnb53XTA11NSWrQm/3T0n35fvnHPhPv9bZLFiNptd4fPsmChvPaJCrqv9BlgAKGPGc+dmDNGTniEjjmMOJZPJ2SWNi8Ur4YrtbTPE26hFDIDKTGV22rFtd9atAChLmYHAyhrTVBaA1tozxJfXKnApFov9ucA4k8kYLXtfSAOPahFjfHxisr9vYLTtq/byhZ6eaWAO8KoaA/A1NTUFDjTvWlu/Jbk+EgmHRIurtdEbjdf3i4gWgKFc/zMa2XTr1tTUF1+2DbS2fl4CpgC7UCiYWt9OaI2lPNd1DXOitra+KCIKqAEC7x8/8vCePbuTln+FX/Cy0U3pTgEY6O/eXSpdnznwypu/Dg8Pl4cGB8NYbrPWulkgpcH3rxXe1JqLhkhHBf938Xi8kk7XPfTpiU8aIpFQTUP6ybPzO14HVDKZzI2X9+06aGg+0PCA57n2WHl8oDQ6VnAcx1bKp4LBVeE1qyPRYHBVQkR8CKN4HI0lUqeAMHdClBYcL5/9bb+gTzm2ff2Xzq6vT3zcen6oWBwB/qru2QD8wIONjakNh946+NTOJ7a/ZFpmUDR7o4lUx7zXghHPfHM2X7c5ceadd9/ryOVyfedOn765+fGGZ0XkaY1s0KLnxGNYoOuHn74/1/LqG92PNTb+fOzY4Rd/H7xa+M/vBgSAR4Brf2SvJDzcH4FaFidvoJ7fGE/mgBhQBKYXTVxtXAUolcfS4VAw0nupr729/duuzvNdZaUsY8eO7aHXX2tpSm/d8tzkjfE0MDivWSrx3awDUkAeGAHsat1fnSoKXAZKi4mXMv6HQvbyh8Dbd176o1h869HlNOpejH2WMusS8Z2O40ycPNn2WXfPxWvLae4pMbAS2AZooJe7jnSfZfkbe1wfX9DFYSoAAAAASUVORK5CYII="></td></tr>
<tr><td> 500</td><td>"libsoundmenu.so"  </td><td>"0x86da4ac"</td><td>"indicator-sound"      </td><td>""</td><td> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAWCAYAAADafVyIAAAABHNCSVQICAgIfAhkiAAAAudJREFUSIntkF1ok1cYx38njTW1rSkOZGjFK52fbKCCzsgWkIF4sV0IAxljIIiyi+mFCOLdwJuJn5tuQ7AVh1VX2Vjpqq6aZc5araZ5bWOak7dvl5W1YtOPtE1i3o+zC410Npoh1St/V+c8zzn/3zkPvOZVYEjtdyOunVRKuZ7uTSq8CP39900Unxmx9u1TkQdAT1z7skdqnwP4fKvfj3a0Depd4ZSut3knnnvmD/rD4XIjrgUNqQUK9dPjmQ0Kjuh6u+/atRt/trTerHW5RKWTc20pKlBKudIefkCxDnhPqXMlAIYMb++Wdz8A+O5E7RFQysra+wDzZG3d947j5EzT3FxU0KN3HBAu8WF+HwhEBIBp2rtQTn0iemfO4aPHfurru3+7tHTa2kT0zpxgMCiTyWSHx+N5W0o5fZKgO6b9ZkhNGVJTKPVFIfGVwB91QoiKtGV/AqT+SvReAlypdHY9YI2OjXcKIdy58eElhX7gLxQ6kWis6xxAOpNZCWA6uRDAWDq9CMAyzV6AgcGBec8d0bOIROISQCBmA1SWlQ8CWLZVCSBEyQiAbVtVLyQ4dGjfTIBMNpMC8FbN8gJksw9HATye0hkAIyOj2UmCZDIZKSZQtrXh0dnBKEBlxYxlAAPJ4e5HAs+bAGOZ8b78HXd+sWqNfyvwBsCvDfXbFr21YOPTglL39L22bWUaG5ouAFSUl3/kOE6usakxCFBW5lnuOI5VU1P35LHuCfdb8otNH3+aaGr4saq6eu7aiYLW1ps/9yQSyeMnakKGDK8GsaL3n77rp06dNXS9zYvlXjk0NHyvubl5qNg0xNKFC323Wq7ebbsRiADicX0+MBtARkPt3THN3rN752YAGQntMKSmzp+p+apYeJ4SYA3wbqHmxcYLp7/9+uBBwPt3Z+eseDT0IHbvdsrv9y/9v4JiLAbmAehd7fWG1NTxbw7s579jnxo6Qi2dVy//cgWonvLwx/iAd15W+HP5F1PVVGkwY49EAAAAAElFTkSuQmCC"></td></tr>
<tr><td> 550</td><td>"libdatetime.so"   </td><td>"0x86a581c"</td><td>"indicator-datetime"   </td><td>" 5:25:55 PM"</td><td> </td></tr>
<tr><td> 600</td><td>"libsession.so"    </td><td>"0x867cc5c"</td><td>"indicator-session-devices"</td><td>""</td><td> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABHNCSVQICAgIfAhkiAAAAlZJREFUOI3tlE9IVFEUxr/z/tgkKBHpJhEkRF4LV1GOIC2yRcxEEmGLJHAIhXCjCzdu3BVBC3VTi9rr2iwt9Q0ElTmO8yZtnOv4JKHIHi7m5XvlDJ4WOTA8549uow/u4p7znd89F869wH8dV6Yw2BQGH9UvFQomEokqIZZqyhWvr8dqE4lE1ZHAQojqCun3tMSKLkSsblPEQ16PmTS6hYjVSfvQVfr1SghRXRacTEYrHcepkQjnFdAmg58daofwXAFtEpHmum5tMhmtLAsOBDp3+geGBpk5C0B2XPe71+O47jYAmZmz/QNDg4FA505ZMIC9sZGH9USkOLvO1zt37/V6Dd3d93udXecbESmjIw/qAOwdBQxmdAHAm/nwk+Xl+JQ3vxCJTM3Nh58CAIO6CjGU/I13nCLRpXEAGQBoaGy+nn+r2NKniWDw2vBJn+9irq6hsZlKdpxTS8vlH3nbyYMFAGhrb98uVetVEEAw8iG8agqDP8cXbhYzrsYXbpvC4MX3+mquLj/v7XgSwGQqtfESABRVeWSa0VNe6NbKyukKVX0MAKnUxgvvbQqBAQBzs2/HmTmryMo5zsgfzXWj4+9rFNUbInYrq2YNWZbPMnM2rL+bKMQgb2BtbfGMSuosETUzY5+o6OTsE0FiZiPDmStNTReskh3regTptC3Z9s8voZ6+0PTr2THLsoxc3rIsY2ZmbjTU0xeybXsrnbZJ1yOFzj4kRdO0q62tl24A8AGoB+DP+938BzFfW5u/Q9O0dnjGtiQcQEV+oMi3eeI40GI6NFL/lv4A7ogQZ4Yx+nYAAAAASUVORK5CYII="></td></tr>
</table></html>

Confirmed: [crud] is icon image data as per data:image/png;base64,[crud]

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAWCAYAAADafVyIAAAABHNCSVQICAgIfAhkiAAAAudJREFUSIntkF1ok1cYx38njTW1rSkOZGjFK52fbKCCzsgWkIF4sV0IAxljIIiyi+mFCOLdwJuJn5tuQ7AVh1VX2Vjpqq6aZc5araZ5bWOak7dvl5W1YtOPtE1i3o+zC410Npoh1St/V+c8zzn/3zkPvOZVYEjtdyOunVRKuZ7uTSq8CP39900Unxmx9u1TkQdAT1z7skdqnwP4fKvfj3a0Depd4ZSut3knnnvmD/rD4XIjrgUNqQUK9dPjmQ0Kjuh6u+/atRt/trTerHW5RKWTc20pKlBKudIefkCxDnhPqXMlAIYMb++Wdz8A+O5E7RFQysra+wDzZG3d947j5EzT3FxU0KN3HBAu8WF+HwhEBIBp2rtQTn0iemfO4aPHfurru3+7tHTa2kT0zpxgMCiTyWSHx+N5W0o5fZKgO6b9ZkhNGVJTKPVFIfGVwB91QoiKtGV/AqT+SvReAlypdHY9YI2OjXcKIdy58eElhX7gLxQ6kWis6xxAOpNZCWA6uRDAWDq9CMAyzV6AgcGBec8d0bOIROISQCBmA1SWlQ8CWLZVCSBEyQiAbVtVLyQ4dGjfTIBMNpMC8FbN8gJksw9HATye0hkAIyOj2UmCZDIZKSZQtrXh0dnBKEBlxYxlAAPJ4e5HAs+bAGOZ8b78HXd+sWqNfyvwBsCvDfXbFr21YOPTglL39L22bWUaG5ouAFSUl3/kOE6usakxCFBW5lnuOI5VU1P35LHuCfdb8otNH3+aaGr4saq6eu7aiYLW1ps/9yQSyeMnakKGDK8GsaL3n77rp06dNXS9zYvlXjk0NHyvubl5qNg0xNKFC323Wq7ebbsRiADicX0+MBtARkPt3THN3rN752YAGQntMKSmzp+p+apYeJ4SYA3wbqHmxcYLp7/9+uBBwPt3Z+eseDT0IHbvdsrv9y/9v4JiLAbmAehd7fWG1NTxbw7s579jnxo6Qi2dVy//cgWonvLwx/iAd15W+HP5F1PVVGkwY49EAAAAAElFTkSuQmCC
3
  • Ideally, instead of HTML, a bash script populating the indicator panel with an integrated HAPI icon identifier ap, that included the resident aps' version, would facilitate isolating version specific info., nuances and idiosyncratic functionality. Sep 14, 2012 at 3:07
  • rolling rants manifest in 2 ways - the 2nd way is here with artificial language predicated on the 1st, with natural language and precipitated from a consequent nuisance, irritation or annoyance, usually anonymously (annoymously) (ie. ill-conditioned, unidentified ap's & versions annoy anonymously) thus the alter ego - Amos Annoy(ed) Sep 14, 2012 at 3:41
  • Note: indicator-power icon field is a little wonky and unconventional? compared to field use w/ icon image data by other aps - even those with changing icons such as NM Sep 14, 2012 at 22:06
2

Unfortunately -

gdbus call --session --dest com.canonical.indicator.application                \
             --object-path /com/canonical/indicator/application/service        \
                   --method com.canonical.indicator.application.service.GetApplications

does not exhaustively enumerate all indicator icons or their sub-indicators. The MI (messaging indicator) menu interfaces with several sub-indicator communication aps. are not listed. Also missing are the power, volume and clock indicator info.

qdbus is simpler to use and d-feet provides a GUI to do the same, as well as easily list property values.

Use qdbus as follows:

qdbus  --literal | sort

triple click to select com.canonical.indicator.application w/ nl in the output

...  
:1.97  
:1.98  
 ca.desrt.dconf  
 com.canonical.AppMenu.Registrar  
 com.canonical.hud  
 com.canonical.indicator.application  
 com.canonical.indicator.datetime  
 com.canonical.indicator.messages  
 com.canonical.indicator.printers
 com.canonical.indicator.session
 com.canonical.indicator.sound
 com.canonical.Unity
 ...  

Compose the next command with the bash history uparrow repeat command (delete the | sort to leave just qdbus --literal) and press the middle mouse button to complete the command:

qdbus  --literal  com.canonical.indicator.application

Triple click the last line

/
/org
/org/ayatana
/org/ayatana/indicator
/org/ayatana/indicator/service
/com
/com/canonical
/com/canonical/indicator
/com/canonical/indicator/application
/com/canonical/indicator/application/service

Press the repeat history uparrow, space bar and the middle mouse button to compose:

qdbus  --literal  com.canonical.indicator.application  /com/canonical/indicator/application/service

Double click to select the desired method in the output and press uparrow, space bar and middle mouse button to create the command and press enter to run it. (\ line continuation is added for clarity in this example):

qdbus  --literal  com.canonical.indicator.application                \
                 /com/canonical/indicator/application/service        \
                  com.canonical.indicator.application.service.GetApplications

This outputs only the BT and NM indicator info (pretty printed here for exposition)

[Argument: a(sisossssss)
  {[Argument: (sisossssss)
    "bluetooth-active", 
    0, 
    ":1.155",
    [ObjectPath: /org/ayatana/NotificationItem/bluetooth_manager/Menu],
    "",
    "",
    "",
    "Bluetooth: On",
    "bluetooth-manager",
    "Bluetooth"],
    [Argument: (sisossssss) 
    "nm-signal-75", 
    1, 
    ":1.21", 
    [ObjectPath: /org/ayatana/NotificationItem/nm_applet/Menu], 
    "", 
    "", 
    "", 
    "Wireless network connection 'office WiFi 1' active: office WiFi (77%)", 
    "nm-applet", 
    "Network"]
  }
]

The other indicators are referenced as the other com.canonical.indicator. ... interfaces (listed at the start), however this is probably the must utile but sub-menu indicator aps are still unidentified:

qdbus --literal   com.canonical.AppMenu.Registrar               \
                 /com/canonical/Unity/Panel/Service             \
                  com.canonical.Unity.Panel.Service.Sync

though a lot of crud is there (icon image bits probably) the pruned and prettied output is:

[Argument: a(ssssbbusbbi) {
[Argument: (ssssbbusbbi) "libappmenu.so", "0x9733fe0", "", "_File", true, true, 0, "", false, false, 0],
[Argument: (ssssbbusbbi) "libappmenu.so", "0x97352e0", "", "_Edit", true, true, 0, "", false, false, 1],
[Argument: (ssssbbusbbi) "libappmenu.so", "0x9737868", "", "_View", true, true, 0, "", false, false, 2],
[Argument: (ssssbbusbbi) "libappmenu.so", "0x9738920", "", "_Search", true, true, 0, "", false, false, 3],
[Argument: (ssssbbusbbi) "libappmenu.so", "0x9739e10", "", "_Terminal", true, true, 0, "", false, false, 4],
[Argument: (ssssbbusbbi) "libappmenu.so", "0x973c070", "", "Ta_bs", true, false, 0, "", false, false, 5],
[Argument: (ssssbbusbbi) "libappmenu.so", "0x973d6a0", "", "_Help", true, true, 0, "", false, false, 6],
[Argument: (ssssbbusbbi) "libapplication.so", "0x90cdcd0", "bluetooth-manager",  "", false, false, 1, "<... crud ...>", true, true, 300],
[Argument: (ssssbbusbbi) "libapplication.so", "0x8e861a8", "nm-applet",          "", false, false, 1, "<... crud ...>", true, true, 450],
[Argument: (ssssbbusbbi) "libprintersmenu.so", "", "", "", false, false, 0, "", false, false, -1],
[Argument: (ssssbbusbbi) "libmessaging.so",   "0x8dabc7c", "indicator-messages", "", false, false, 1, "<... crud ...>", true, true, 200],
[Argument: (ssssbbusbbi) "libpower.so",       "0x8f0405c", "indicator-power",    "", true, false, 6,
   ". GThemedIcon battery-charged battery-full-charged-symbolic battery-full-charged gpm-battery-charged gpm-battery-100-charging ", true, true, 250],
[Argument: (ssssbbusbbi) "libsoundmenu.so",   "0x8f040b4", "indicator-sound",    "", false, false, 1, "<... crud ...>", true, true, 500],
[Argument: (ssssbbusbbi) "libdatetime.so",    "0x8e8881c", "indicator-datetime", " 1:16:10 AM", true, true, 0, "", false, false, 550],
[Argument: (ssssbbusbbi) "libsession.so",     "0x8e6045c", "indicator-session-devices", "", false, false, 1, "<... crud ...>", true, true, 600]}]

Note: The terminating numbers 600, 550, 500, 450, 300, 250, 200 correlate, right to left, matching the aps with their indicator icons.

1
  • unfortunately the aps are not qualified with their version numbers to identify ill-conditioned installs and consequent system degradation - it is manually labor intensive to track down offending indicator aps w/ their specific versions on compromised systems - Does anyone know an expedient way to identify them when their About menus are missing? Sep 13, 2012 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.