Java.awt SystemTray not supported?

I’using an application called Cryptomator which doesn’t minimize into the Zorin system-tray. I was able to figure out why but cant find a way to fix it.

https://github.com/cryptomator/cryptomator/issues/1103 led me to -->

However, visually I do have a system-tray in at the right-bottom. Dropbox, Slack JetBrainsToolbox, etc. etc stay there.

My question is: Is ZorinOS using a different kind of system-tray or is just my system messed up.

I have an example code to test: (Works fine in Geany, save as ‘HelloWorld.java’ -> Compile -> Build -> Run)

##########################
FileName: HelloWord.java
##########################
import java.awt.SystemTray;
public class HelloWorld {
public static void main(String[] args) {
System.out.println(“Check if Java.awt SystemTray is available:\n”);

    if (SystemTray.isSupported()) {
		System.out.println("SystemTray is supported: " + true);
	} else {
		System.out.println("SystemTray is supported: " + false);
	}
}

}
##################
Output:
##################
Check if Java.awt SystemTray is available:

SystemTray is supported: false
####################

Information to my system:
~$ uname -a
Linux Zion 5.4.0-65-generic #73~18.04.1-Ubuntu SMP Tue Jan 19 09:02:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

~$ java -version
openjdk version “14.0.2” 2020-07-14
OpenJDK Runtime Environment (build 14.0.2+12-Ubuntu-118.04)
OpenJDK 64-Bit Server VM (build 14.0.2+12-Ubuntu-118.04, mixed mode, sharing)

~$ cat /usr/share/gnome/gnome-version.xml

<?xml version="1.0" encoding="UTF-8"?> 3 28 2 Ubuntu

The javascript you posts looks correct and should work.
Are you using Zorin 15 Core or Zorin 15 Lite?

I’ve installed Zorin 15 Core. (Also with using Gnome Desktop and missing xfce I can say for sure)

PS: The example code was java.

I feel your pain. Once I got away from Gnome, I never went back.

You posted two pieces of code- are they both the same One Example?

In the meantime, you might try:

sudo apt purge gnome-shell-extension-zorin-appindicator

Then reinstall along with other packages that were removed (DO NOT LOG OUT OR REBOOT IN BETWEEN entering these commands else you will end up having to install from the recovery menu):

sudo apt install gnome-shell-extension-zorin-appindicator
gnome-shell-extensions-zorin-desktop zorin-appearance-layouts-shell-core
zorin-desktop-session zorin-os-desktop

To be honest, the reference of the missing xfce was more to give confirmation. Besides using a fedora-vm incl. the xfce desktop for university I’ve never tried it.

ad code example:
I’m really really sorry, but I could not change how the example code is represented in a meaningful way. Hence, I tried it with creating a visual boarder by using ‘########’ as some sort of boarder.

ad gnome-shell-extension-zorin-appindicator
I’ll try that right away. Thanks for the do-not-logout hint :slight_smile:

OK... there is a slight chance things got messed up...

What the system is doing: I can access the login screen; however, when I click on my username (or press enter) I get the message "Authentication error" and the screen freezes.

Thankfully I copied the executed commands:

ignis@Zion:~$ sudo apt purge gnome-shell-extension-zorin-appindicator
[sudo] password for ignis:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gnome-shell-extension-zorin-app-grid gnome-shell-extension-zorin-dash
gnome-shell-extension-zorin-do-not-disturb gnome-shell-extension-zorin-menu
gnome-shell-extension-zorin-panel gnome-shell-extension-zorin-printers
gnome-shell-extension-zorin-screen-keyboard-button
gnome-shell-extension-zorin-taskbar gnome-shell-extensions
gnome-themes-extra gnome-themes-extra-data linux-hwe-5.4-headers-5.4.0-59
xwayland zorin-appearance-layouts-support
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
gnome-shell-extension-zorin-appindicator*
gnome-shell-extensions-zorin-desktop* zorin-appearance-layouts-shell-core*
zorin-desktop-session* zorin-os-desktop*
0 upgraded, 0 newly installed, 5 to remove and 1 not upgraded.
After this operation, 199 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 383242 files and directories currently installed.)
Removing zorin-appearance-layouts-shell-core (2.1.2) ...
Removing zorin-os-desktop (1.4.10) ...
Removing zorin-desktop-session (3.1.8) ...
update-alternatives: using /usr/share/gnome-shell/theme/gnome-shell.css to provide /usr/share/gnome-shell/theme/gdm3.css (gdm3.css) in auto mode
Removing gnome-shell-extensions-zorin-desktop (2.0.5) ...
Removing gnome-shell-extension-zorin-appindicator (26.1) ...
Processing triggers for libglib2.0-0:amd64 (2.58.1-2+zorin1) ...
ignis@Zion:~$ sudo apt install gnome-shell-extension-zorin-appindicator
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gnome-shell-extension-zorin-app-grid gnome-shell-extension-zorin-dash
gnome-shell-extension-zorin-do-not-disturb gnome-shell-extension-zorin-menu
gnome-shell-extension-zorin-panel gnome-shell-extension-zorin-printers
gnome-shell-extension-zorin-screen-keyboard-button
gnome-shell-extension-zorin-taskbar gnome-shell-extensions
gnome-themes-extra gnome-themes-extra-data linux-hwe-5.4-headers-5.4.0-59
xwayland zorin-appearance-layouts-support
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
gnome-shell-extension-zorin-appindicator
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 22,9 kB of archives.
After this operation, 114 kB of additional disk space will be used.
Get:1 Index of /zorinos/stable/ubuntu bionic/main amd64 gnome-shell-extension-zorin-appindicator all 26.1 [22,9 kB]
Fetched 22,9 kB in 0s (106 kB/s)
Selecting previously unselected package gnome-shell-extension-zorin-appindicator.
(Reading database ... 383201 files and directories currently installed.)
Preparing to unpack .../gnome-shell-extension-zorin-appindicator_26.1_all.deb ...
Unpacking gnome-shell-extension-zorin-appindicator (26.1) ...
Setting up gnome-shell-extension-zorin-appindicator (26.1) ...
ignis@Zion:~$

I also looked in the syslog file (I was able to login into tty5 :smiley: ) and it has an impressive 14MB size :smiley:

Any ideas?

PS: i have a trible-boot, so I can resume work and troubleshooting

OK, got visual desktop back again! :smiley:

for some wired reason i needed to install “zorin-os-desktop” Wired thing, as it was among your commands, which also did not fail.

Maybe I’ll switch to the zorin-light-desktop, as i have other issues as well with Gnome… (Same issue as me: Lock screen needs to be unlocked two (or more) times)

My Cryptomator is still not using the systemtray and the java code also response that SystemTray is not supported...

> import java.awt.SystemTray;
> public class HelloWorld {
> public static void main(String[] args) {
>   System.out.println(“Check if Java.awt SystemTray is available:\n”);
>     if (SystemTray.isSupported()) {
> 		System.out.println("SystemTray is supported: " + true);
> 	  } else {
> 		System.out.println("SystemTray is supported: " + false);
> 	  }
>   }
> }

Console-Output:

Check if Java.awt SystemTray is available:

SystemTray is supported: false


(program exited with code: 0)
Press return to continue

Given this, I found that you are Correct in your OP.
It is, indeed, unsupported by Gnome3. So this applies to any distro that uses Gnome3 or any build based on Gnome3, including Budgie and others.
Gtk2 used libgtk2-appindicator-perl...
Gnome3 removing functionality and support? No surprise.

Supposedly this extension provides a workaround by enabling the system tray with icons on a Top Panel:
https://extensions.gnome.org/extension/1031/topicons/

I cannot test it to ensure it works.

Now I understand why Gnome is a pain.

I’ll try that and post my results for others to find. After that I’ll switch to the Zorin lite desktop, thus xcfe4 :smiley:

I had a similar problem in Zorin OS Core 16.2 and solved in 2 steps. First, install gnome-shell-extension-appindicator via terminal (sudo apt install gnome-shell-extension-appindicator). And, finally, install the extension AppIndicator and KStatusNotifierItem Support by 3v1n0 (AppIndicator and KStatusNotifierItem Support - GNOME Shell Extensions). Reference: how to use a tray icon. That's it. And if you also want minimize any program to the system tray, you can install the program called Kdocker (but it is still required doing the 2 steps mentioned before).