[openbox] Setting up a System Tray

Alessandro Vesely vesely at tana.it
Fri May 29 04:32:16 EDT 2020

Hi all,

I'm a happy openbox user.  I'm not so much into GUIs, so I love openbox for its simplicity.  However, now I want to run this Java app which fails something like so:

2020-05-28 10:22:24,632 [INFO|org.eclipse.jetty.server.Server|Server|JavaFX Application Thread] Started @3570ms
2020-05-28 10:22:24,702 [WARN|dorkbox.systemTray.SystemTray|SystemTray|JavaFX Application Thread] Unable to determine the system window manager type. Falling back to GtkStatusIcon.

(java:4868): GLib-GObject-WARNING **: cannot register existing type 'GdkDisplayManager'

(java:4868): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(java:4868): GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
2020-05-28 10:22:34,746 [ERROR|dorkbox.systemTray.SystemTray|Gtk|JavaFX Application Thread] Something is very wrong. The waitForStartup took longer than expected.
	at dorkbox.systemTray.jna.linux.Gtk.waitForStartup(Gtk.java:327)
	at dorkbox.systemTray.nativeUI._GtkStatusIconNativeTray.<init>(_GtkStatusIconNativeTray.java:170)

The utility is hosted here: https://github.com/dorkbox/SystemTray

I usually run stalonetray to display a clock in the upper left corner.  This time I additionally launched trayer, but the error persists.

Then I found a newer version of SystemTray, this avoids the above failure.  However, it displays as follows in the terminal:

2020-05-29 10:03:50,517 [WARN|dorkbox.util.jna.linux.GtkTheme|GtkTheme|JavaFX Application Thread] Unable to get tray image size. Using default.
2020-05-29 10:03:50,646 [INFO|dorkbox.systemTray.SystemTray|SystemTray|JavaFX Application Thread] Successfully loaded

(java:23463): GLib-GObject-WARNING **: /build/glib2.0-y4xDbO/glib2.0-2.50.3/./gobject/gsignal.c:2523: signal 'child-added' is invalid for instance '0x7fb600398170' of type 'GtkMenu'

(java:23463): GLib-GObject-WARNING **: /build/glib2.0-y4xDbO/glib2.0-2.50.3/./gobject/gsignal.c:2523: signal 'child-added' is invalid for instance '0x7fb600398310' of type 'GtkMenu'

(java:23463): GLib-GObject-WARNING **: /build/glib2.0-y4xDbO/glib2.0-2.50.3/./gobject/gsignal.c:2523: signal 'child-added' is invalid for instance '0x7fb6003984b0' of type 'GtkMenu'
2020-05-29 10:03:50,667 [INFO|lu.nowina.nexu.NexUApp|NexUApp|JavaFX Application Thread] Start finished

Nothing else is visible.  The app sleeps in FUTEX_WAIT, presumably waiting for the user to hit a menu.

Is there some utility that can simulate a System Tray, possibly just for a single command to be given as argument?

Or are there any debugger techniques that one can use to fix X calls?

A few yucky details:

trying to run java under ltrace fails (sigsegv).

under strace found something like so:
23480 connect(145, {sa_family=AF_UNIX, sun_path=@"/tmp/.X11-unix/X0"}, 20) = 0
23480 writev(145, [{iov_base="l\0\v\0\0\0\22\0\20\0\0\0", iov_len=12}, {iov_base="", iov_len=0}, {iov_base="MIT-MAGIC-COOKIE-1", iov_len=18},...
23480 writev(145, [{iov_base="b\0\5\0\f\0\0\0BIG-REQUESTS", iov_len=20}], 1) = 20
23484 writev(145, [{iov_base="\20\0\7\0\23\0M\3_NET_SYSTEM_TRAY_S0T", iov_len=28}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 28
23484 writev(145, [{iov_base="\20\0\10\0\27\0M\3_NET_SYSTEM_TRAY_OPCODER", iov_len=32}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 32
23484 writev(145, [{iov_base="\20\0\t\0\34\0M\3_NET_SYSTEM_TRAY_ORIENTATION", iov_len=36}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3 <unfinished ...>
23484 writev(145, [{iov_base="\20\0\10\0\27\0M\3_NET_SYSTEM_TRAY_VISUALA", iov_len=32}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 32

Any help, anyone?


More information about the openbox mailing list