https://bugs.kde.org/show_bug.cgi?id=417050

            Bug ID: 417050
           Summary: Launched programs are missing env vars under X
           Product: krunner
           Version: unspecified
          Platform: Archlinux Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: k...@privat.broulik.de
          Reporter: unduthe...@gmail.com
  Target Milestone: ---

SUMMARY
Programs launched with krunner on X are missing environment variables compared
to using the app launcher and wayland.
This results in broken theming because DESKTOP_SESSION is not set.

STEPS TO REPRODUCE
1. launch a plasma X session
2. invoke krunner 
3. type konsole and press enter
4. run printenv > krunner.out
5. click on the menu button 
6. type konsole and press enter
7. run printenv > applauncher.out
8. run diff -u krunner.out applauncher.out

OBSERVED RESULT
There are a lot of environment variables present in applauncher.out that are
missing in krunner.out:

DESKTOP_SESSION
DESKTOP_SESSION
KDE_FULL_SESSION
KDE_SESSION_UID
KDE_SESSION_VERSION
PAM_KWALLET5_LOGIN
QT_AUTO_SCREEN_SCALE_FACTOR
SESSION_MANAGER
XCURSOR_SIZE
XCURSOR_THEME
XDG_CURRENT_DESKTOP
XDG_DATA_DIRS
XDG_SEAT
XDG_SEAT_PATH
XDG_SESSION_CLASS
XDG_SESSION_DESKTOP
XDG_SESSION_ID
XDG_SESSION_PATH
XDG_SESSION_TYPE
XDG_VTNR

The path variable is incorrectly set and missing a lot of directories
-PATH=/home/pau/.local/bin:/home/pau/.local/share/go/bin:/home/pau/.local/share/cargo/bin:/home/pau/code/misc/scripts:/usr/local/bin:/usr/bin
+PATH=/home/pau/.local/bin:/home/pau/.local/share/go/bin:/home/pau/.local/share/cargo/bin:/home/pau/code/misc/scripts:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/emulator:/opt/android-ndk:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/opt/android-sdk/tools/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

EXPECTED RESULT
when doing the same procedure on wayland we see only the following differences,
which is more reasonable:
$ diff -u wayland_krunner wayland_app_launcher
-DBUS_STARTER_ADDRESS=unix:abstract=/tmp/dbus-cTW2sJ38w5,guid=a7191eb7c568d2893ba3c0c65e369089
-DBUS_STARTER_BUS_TYPE=session
-KONSOLE_DBUS_SERVICE=:1.51
+KONSOLE_DBUS_SERVICE=:1.54
+SESSION_MANAGER=local/alnitak:@/tmp/.ICE-unix/7823,unix/alnitak:/tmp/.ICE-unix/7823
-SHELL_SESSION_ID=bf533c89b8974b4b87b52947c7b27690
+SHELL_SESSION_ID=05b7d42477244cf6be81077e6f1fcc85

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch
KDE Plasma Version: 5.17.5 
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.1

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to