elementary / wingpanel

Stylish top panel that holds indicators and spawns an application launcher
https://elementary.io
GNU General Public License v3.0
136 stars 45 forks source link

Add autostart.desktop #274

Closed danirabbit closed 4 years ago

danirabbit commented 4 years ago

Add an autostart.desktop like we do in Onboarding

danirabbit commented 4 years ago

Hm so after testing for a few days I'm noticing that gnome session complains about the panel failing to register itself and it seems like other autostarts (like polkit) are failing.

So there might be more work required here

davidmhewitt commented 4 years ago

@danrabbit When you say the polkit autostart is failing, you mean failing to autostart altogether or just failing to register like the panel?

danirabbit commented 4 years ago

@davidmhewitt failing to start altogether. My guess is that the panel failing to register stops GNOME Session from performing any "app" class autostarts

davidmhewitt commented 4 years ago

@danrabbit Can you confirm that it's not cerbere causing this? As the original indication that we had something wrong with cerbere was the polkit agent not starting...

Stick .disabled on the end of your cerbere autostart filename and see what happens. You'll have to start plank manually in your session, or make an autostart file for that too.

Edit: or the other thing worth mentioning is to check whether the appcenter background process is autostarting when polkit agent is failing. If that's working, then there's nothing wrong with gnome-session autostarts, and it's something wrong with the polkit agent (probably caused by cerbere)

danirabbit commented 4 years ago

@davidmhewitt Okay so I disabled cerbere and plank is not spawning (as intended).

I can confirm that neither polkit nor appcenter nor any other app-level autostarts are running.

What's interesting though is that after 90 seconds they do load. So I think there must be some kind of timeout here

davidmhewitt commented 4 years ago

Yes, after looking into this a bit more, 90 seconds is how long gnome-session waits for each phase of the autostart, so this makes sense.

It's odd that I didn't seem to notice that issue on my system though. Looks like we need to stick session management registration code in wingpanel and plank after all :slightly_smiling_face:

Although, given the problems that the polkit dialog causes when it doesn't launch, it should probably be in an earlier phase too.

danirabbit commented 4 years ago

This looks good! Whether cerbere launches wingpanel or not I'm not running into issues with Polkit. Seems like this works as expected :)