Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there a way to find out what is the name of an icon that is on the bottom bar, on Gnome 3?

For example, the name of the icon of Audacious is audacious, for Dropbox it's dropbox... I need their names to write them down on the Status Icon Fixer extension for Gnome 3.

I have tried:

StatusIconDispatcher.STANDARD_TRAY_ICON_IMPLEMENTATIONS['LibreOffice 3.5 Quickstarter'] = 'LibreOffice 3.5 Quickstarter';

But it didn't work.

I need the name for the Google Chrome background tray icon and LibreOffice 3.5 Quickstarter.

Thank you!

share|improve this question
add comment

2 Answers

Got the LibreOffice 3.5 Quickstarter's name from System Monitor and Google's Chrome is google-chrome.

Add:

StatusIconDispatcher.STANDARD_TRAY_ICON_IMPLEMENTATIONS['soffice'] = 'soffice';
StatusIconDispatcher.STANDARD_TRAY_ICON_IMPLEMENTATIONS['google-chrome'] = 'google-chrome';

to:

.../gnome-shell/extensions/status@gnome-shell.2jk.org/extension.js

Still have found no way to grab the names from icons.

share|improve this answer
add comment

This is entirely taken from https://github.com/brianhsu/EvilStatusIconForever

Therefore, credits go to brianhsu.

This may borken your GNOME, BE CAREFUL AND BACKUP FIRST!!!! You need root premission to do this. Edit /usr/share/gnome-shell/js/ui/statusIconDispatcher.js

Move to line 48, you should see a function called _onTrayIconAdded which look like the following:

_onTrayIconAdded: function(o, icon) {
    let wmClass = (icon.wm_class || 'unknown').toLowerCase();
    let role = STANDARD_TRAY_ICON_IMPLEMENTATIONS[wmClass];
    if (role)
        this.emit('status-icon-added', icon, role);
    else
        this.emit('message-icon-added', icon);
},    

Add global.log("wmClass[] = " + wmClass); after the line of let role = ..., now this function should look like the following:

_onTrayIconAdded: function(o, icon) {
    let wmClass = (icon.wm_class || 'unknown').toLowerCase();
    let role = STANDARD_TRAY_ICON_IMPLEMENTATIONS[wmClass];
    global.log("wmClass[] = " + wmClass);
    if (role)
        this.emit('status-icon-added', icon, role);
    else
        this.emit('message-icon-added', icon); },

Restart GNOME 3 by press Alt + F2 and r and hit enter.

Start GNOME console by press Alt + F2 and lg and hit enter.

Switch to Errors tab, now you should see message like the following:

wmClass[] = pidgin

... which is the icon name to be used in Status Icon Fixer.

share|improve this answer
    
Good lord! :| It might work, but isn't there a much more simpler way? –  David M. Sousa Jul 17 '12 at 16:14
    
It works but indeed this is not trivial. I don't know any simpler way, this is definitely something to be worked on by Gnome-shell devs... –  nimai Sep 1 '12 at 11:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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