SUMMARY When adding an autostart entry of type "Application", if the application's .desktop file contains env variable override(s), then autostart won't happen. STEPS TO REPRODUCE 1. Change firefox's default command (at least the default on opensuse TW) from `firefox %u` to `MOZ_DISABLE_RDD_SANDBOX=1 firefox %u` (this is a hack I have to use until Firefox 102 comes out for my distro) 2. add an auto-start entry of type Application, search for firefox in the list and confirm 3. reboot PC/restart session OBSERVED RESULT Firefox not auto-starting EXPECTED RESULT Firefox auto-starts SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20220706 KDE Plasma Version: 5.25.2 KDE Frameworks Version: 5.95.0 Qt Version: 5.15.5 Kernel Version: 5.18.9-1-default (64-bit) Graphics Platform: Wayland Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz Memory: 15,4 GiB of RAM Graphics Processor: Mesa Intel® Xe Graphics Manufacturer: Dell Inc. Product Name: XPS 13 9305 ADDITIONAL INFORMATION The same happens with insync, which doesn't properly handle Wayland: its tray icon is not displayed under a Wayland session. To make it appear, insync tech support advised to launch the app with: QT_QPA_PLATFORM=xcb insync start And here again I face the same issue, no auto-start. As soon as I remove QT_QPA_PLATFORM=xcb, the app auto-starts (no tray icon tho, but I could confirm by checking running processes)
>1. Change firefox's default command (at least the default on opensuse TW) from `firefox %u` to `MOZ_DISABLE_RDD_SANDBOX=1 firefox %u` (this is a hack I have to use until Firefox 102 comes out for my distro) That's an invalid desktop file as per the spec. Exec=env MOZ_DISABLE_RDD_SANDBOX=1 firefox %u would be valid.
(In reply to David Edmundson from comment #1) > >1. Change firefox's default command (at least the default on opensuse TW) from `firefox %u` to `MOZ_DISABLE_RDD_SANDBOX=1 firefox %u` (this is a hack I have to use until Firefox 102 comes out for my distro) > > That's an invalid desktop file as per the spec. > > Exec=env MOZ_DISABLE_RDD_SANDBOX=1 firefox %u > > would be valid. Hello David, thanks for your reply, but unfortunately the suggested fix still doesn't provide the expected behavior: https://imgur.com/a/Aui5tdJ
Drop the "Exec=" at the front. I was speaking in terms of what we see if we edit the file by hand not the UI.
(In reply to David Edmundson from comment #3) > Drop the "Exec=" at the front. > > I was speaking in terms of what we see if we edit the file by hand not the > UI. Hello, indeed it works if I drop the Exec= part, so thanks for that. However, I find it a bit misleading for a desktop file to allow to launch an app with, for example: MOZ_DISABLE_RDD_SANDBOX=1 firefox (so, without the "env" prefix) Whereas such "env" prefix becomes mandatory the moment you want to autostart an app. Is this expected/is there's a reason for that? If autostart enforces such a strict behavior, maybe application launching should also expect "env", or refuse to launch the app with an error, for example. What do you think?