Open InFerYes opened 7 years ago
I don't think there's a way to make the extensions to load faster and the name is exported pretty early... This should probably be fixed by the app which should try once the watcher is available
Does GNOME Shell load extensions before start-up apps?
<InFerNo_> does anyone know if extensions are loaded before applications defined in startup, or if they load at the same time?
<fmuellner> gnome-shell is started before autostart applications
<fmuellner> for extensions that are enabled at login, that *usually* means that they are loaded before autostart apps
<fmuellner> but of course a badly behaving extension could block the compositor
<fmuellner> and obviously if an extension is only enabled later by the user, it's enabled after autostart apps
My active extensions are Disconnect Wifi KStatusNotifierItem/AppIndicator Support Refresh Wifi Connections Removable Drive Menu Sound Input & Output Device Chooser TeaTime Todo.txt User Themes
When I boot for the first time and log in, the tray always works. When I log off and log back in, it fails every time, even when I log in with a different account first (like guest) and then back to my main account, and every time after.
Alternatively
B in my case is a guest account that has no profile, it's created on the fly when logging in and deleted after logging off.
@InFerYes Sounds like it may be a race condition between the gnome-shell environment loading and the startup. A simple workaround might be to just add a delay to the startup application by adding X-GNOME-Autostart-Delay=1
to the .desktop file in ~/.config/autostart/
to delay by 1 second.
I don't think there are any links between gnome startup applications and gnome-shell extensions. I think we want them to load in parallel on our multi-core systems. I'd imagine that the synergy app could be enhanced to handle this scenario or more scripting to do a better waiting process or add(or find) another hook into the gnome-shell extension support.
We're using Gio.DBus.session.own_name
which is async so that it could happen that GNOME Shell
enable
function where we call Gio.DBus.session.own_name
which queues an event to own the nameStatusNotifierWatcher._acquiredName
If we block in our enable
function, this won't help us since Gio.DBus.session.own_name
doesn't actually do anything. The event needs to be processed by the Glib main loop (from GNOME Shell).
After reading https://stackoverflow.com/questions/21485642/running-multiple-concurrent-gmainloops I think it might be possible to create a dedicated thread which tries to own the name and blocking in our enable
function. Not sure if this hack would work. Thoughts?
In my example, when I log in, Synergy launches automatically and puts an icon in the tray. When there is no tray, the application gives an error message.
I can close the application and launch it again, then it will correctly get shown in the tray.
Gnome: Version 3.26.1