How to remove app icons in system tray on Ubuntu 18.04 with GNOME
Those icons are provided by a GNOME shell extension called Ubuntu appindicators (package name: gnome-shell-extension-appindicator
). Since it's a system extension, it may not be easy to simply disable it using GNOME Tweaks or from the GNOME Shell Extensions website.
For newer Ubuntu releases you can use the following command to disable the extension:
gnome-extensions disable [email protected]
Note that removing the gnome-shell-extension-appindicator
package would get rid of those icons, but it is not at all recommended as it will also remove the ubuntu-desktop
meta-package which may break stuff in future (see this: Is it safe to remove ubuntu-desktop package?).
1. Hackish solution with granular control
You may use another extension called "Icon Hider" to achieve your goal. This extension lets you toggle the visibility of individual icons in top-bar.
After installing and activating the extension, open its settings. You should find entries corresponding to those icons you want to hide towards the bottom (for example in the screenshot below I have entries corresponding to "Skype" and "Alarm Clock" applications). Just toggle them off.
(You may have to re-login to see the effect.)
2. Alternative solution
Another solution is to use vanilla GNOME (GNOME shell sans modifications made by Ubuntu). Since GNOME got rid of the legacy tray (the old annoying tray at the bottom-left corner) from version 3.26, those icons in top-bar are disabled by default.
You may install vanilla GNOME by running
sudo apt install vanilla-gnome-desktop
Once it is installed, reboot (or re-login). Once you get to the GDM login screen you should find a cogwheel (⚙️) next to the sign in button. If you click on the cogwheel you should find options titled "GNOME" and "GNOME on Wayland" along with Ubuntu and Ubuntu on Wayland. Select any of the GNOME options instead of Ubuntu options.
Another solution will be making a backup of the file responsible for showing app indicators.
Simply change this...
/usr/share/gnome-shell/extensions/[email protected]/appIndicator.js
to this
/usr/share/gnome-shell/extensions/[email protected]/appIndicator.js.BAK
And don't forget to restart the machine/session for changes to take effect ;)