https://bugs.kde.org/show_bug.cgi?id=526376
Bug ID: 526376
Summary: Autostarted application uses system PATH, not user
PATH
Classification: Plasma
Product: plasmashell
Version First 6.7.91
Reported In:
Platform: Arch Linux
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Startup process
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: 1.0
DESCRIPTION
In System Settings' Autostart page, I added an application entry for Welcome
Center (plasma-welcome) to the list. I also added a "--safe-mode" argument
through the dialog that opens through the list item's "See properties" button.
This option is something that only exists for my development version of
plasma-welcome, located in /home/kpetso/build/prefix/bin/plasma-welcome.
When trying to log in, the app does not start. System Settings' Autostart page
shows "failed". journalctl reports an app error:
> (...) plasma-welcome[2076]: plasma-welcome: Unknown option 'safe-mode'.
> (...) systemd[1384]: app-org.kde.plasma\[email protected]: Main
> process exited, code=exited, status=1/FAILURE
> (...) systemd[1384]: app-org.kde.plasma\[email protected]: Failed
> with result 'exit-code'.
This indicates that autostart tried to start the system version of
plasma-welcome, rather than the one that my session's PATH should invoke. For
reference, my /usr/share/wayland-sessions/plasmawayland-dev6.desktop is
standard apart from the custom prefix:
> [Desktop Entry]
> Exec=/home/kpetso/build/kde/prefix/lib/libexec/plasma-dbus-run-session-if-needed
> /home/kpetso/build/kde/prefix/lib/libexec/startplasma-dev.sh -wayland
> Name=Plasma (Development, Wayland /home/kpetso/build/kde/prefix/bin)
The generated .desktop file for the autostarted app
($HOME/.config/autostart/org.kde.plasma-welcome.desktop) looks straightforward
enough:
> [Desktop Entry]
> Exec=plasma-welcome --safe-mode
> Name=Safe Mode Assistant
> Path=
> Type=Application
> X-KDE-SubstituteUID=false
> X-KDE-Username=
> (...)
If plasmashell itself can start with custom prefix env vars set, then autostart
should also be able to.
STEPS TO REPRODUCE
1. Build a modified version of a system app that adds a new argument.
2. Add an autostart entry for this app in System Settings, with the new
argument added via properties dialog.
3. Log out and back in.
OBSERVED RESULT
App does not start because it does not know the new argument. journalctl shows
the printed error that indicates the wrong binary being started. System
Settings' Autostart page shows "failed".
EXPECTED RESULT
Modified version of the app starts successfully. System Settings' Autostart
page shows success.
SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.8.80 (but really, master around 6.8 Beta 1 to Beta 2)
KDE Frameworks Version: 6.31.0
Qt Version: 6.11.2
Kernel Version: 7.2.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ Ultra 7 258V
Memory: 32 GiB of RAM (30.8 GiB usable)
Graphics Processor: Intel® Graphics
ADDITIONAL INFORMATION
My development user's PATH is:
> PATH=/usr/lib/icecream/libexec/icecc/bin:/home/kpetso/.local/bin:/home/kpetso/build/prefix/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
The correct plasma-welcome binary (`which plasma-welcome`) is located at:
> /home/kpetso/build/prefix/bin/plasma-welcome
I have verified that the addition of `/home/kpetso/build/prefix/bin` to the
PATH is not due to .bashrc or .bash_profile.
--
You are receiving this mail because:
You are watching all bug changes.