Bug 479725 - Under Wayland Plasma has a different $PATH variable compared to on X11, breaking its ability to find some apps in nonstandard locations
Summary: Under Wayland Plasma has a different $PATH variable compared to on X11, break...
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Startup process (show other bugs)
Version: 5.27.5
Platform: Debian stable Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-13 08:48 UTC by Ronald Hudson
Modified: 2024-02-15 20:10 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-1794130-0.html (4.14 KB, text/html)
2024-01-19 14:42 UTC, Ronald Hudson
Details
attachment-1815917-0.html (4.03 KB, text/html)
2024-01-19 16:44 UTC, Ronald Hudson
Details
attachment-1821274-0.html (928 bytes, text/html)
2024-01-19 17:20 UTC, Ronald Hudson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald Hudson 2024-01-13 08:48:41 UTC
SUMMARY
***
Some programs pinned to the task manager (both the "task manager" and the "Icons only task manager") under Wayland give a "program not found" - but one may type the name of the program in the cli and it launches.

The program can be launched from the task manager under X11. 

***


STEPS TO REPRODUCE
1. Choose a Wayland session
2. pin kpat to the task manager
3. try to launch it - kpat cannot be found.
4. Choose an X11 session
5. Try to launch kpat again - see that it does launch

kpat resides in /usr/games  kshisen is also in /usr/games and also shows this issue. 

OBSERVED RESULT
Under Wayland kpat is not found.
Under X11 kpat is found.
kpat can be run by typing kpat into Konsole
Under Wayland Kpat is not found when typed into the Alt F2 

EXPECTED RESULT
Kpat should run when clicked in the task manager under Wayland. There should be no loss of facility when running under Wayland instead of running under X11. 


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Debian 12 
(available in About System)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 Ronald Hudson 2024-01-13 08:50:07 UTC
I would rather run Wayland as it seems to be the clear leader with X11 on its way to being deprecated.
Comment 2 Nicolas Fella 2024-01-19 13:42:26 UTC
Can't reproduce. 

That said my kpat is in /usr/bin/kpat, where it belongs. Why would it be in /usr/games ?
Comment 3 Ronald Hudson 2024-01-19 14:42:05 UTC
Created attachment 165038 [details]
attachment-1794130-0.html

Nicolas,

Thanks for looking into this for me.

rhudson@adam:~$ cd /usr/games
rhudson@adam:/usr/games$ ls
fortunegweledklicketykpatkshisenmicropolisonekotint
rhudson@adam:/usr/games$ file kpat
kpat: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), 
dynamically
linked, interpreter /lib64/ld-linux-x86-64.so.2, 
BuildID[sha1]=81710cb5e74713c21
7b4fccf58993beb2bfa0c5f, for GNU/Linux 3.2.0, stripped

This is the way discover installed it on my system.


Ron.

On 1/19/24 05:42, Nicolas Fella wrote:
> https://bugs.kde.org/show_bug.cgi?id=479725
>
> Nicolas Fella<nicolas.fella@gmx.de>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |nicolas.fella@gmx.de
>
> --- Comment #2 from Nicolas Fella<nicolas.fella@gmx.de>  ---
> Can't reproduce.
>
> That said my kpat is in /usr/bin/kpat, where it belongs. Why would it be in
> /usr/games ?
>
Comment 4 Ronald Hudson 2024-01-19 14:45:27 UTC
I will copy kpat to /usr/bin and go back to Wayland to see if that makes a difference.
Comment 5 Ronald Hudson 2024-01-19 14:50:12 UTC
That copy seems to have worked. at least for kpat.
Comment 6 Nicolas Fella 2024-01-19 16:35:31 UTC
Well, for some reason Debian installes kpat to /usr/games instead of /usr/bin/ and adds to PATH. Weird but ok.

That said it works as expected for me on Debian. /usr/games is in PATH on both X11 and Wayland.

Can you check the value of PATH in "cat /proc/$(pidof plasmashell)/environ" ?
Comment 7 Ronald Hudson 2024-01-19 16:44:54 UTC
Created attachment 165042 [details]
attachment-1815917-0.html

Here you go:

rhudson@adam:~$ ps -e | grep plasma
115971 tty2     00:00:00 startplasma-way
116334 ?        00:00:31 plasmashell
122328 ?        00:00:00 plasma-browser-
rhudson@adam:~$ cat /proc/116334/environ
HOME=/home/rhudsonLANG=en_US.UTF-8LOGNAME=rhudsonPATH=/usr/local/sbin:/usr/local
/bin:/usr/sbin:/usr/bin:/sbin:/binSHELL=/bin/bashSYSTEMD_EXEC_PID=116334USER=rhu
dsonXDG_DATA_DIRS=/home/rhudson/.local/share/flatpak/exports/share:/var/lib/flat
pak/exports/share:/usr/local/share/:/usr/share/XDG_RUNTIME_DIR=/run/user/1000GTK
_MODULES=gail:atk-bridgeQT_ACCESSIBILITY=1QTWEBENGINE_DICTIONARIES_PATH=/usr/sha
re/hunspell-bdic/DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/busDESKTOP_SE
SSION=plasmawaylandDISPLAY=:0GDMSESSION=plasmawaylandGDM_LANG=en_US.UTF-8GTK2_RC
_FILES=/etc/gtk-2.0/gtkrc:/home/rhudson/.gtkrc-2.0:/home/rhudson/.config/gtkrc-2
.0GTK_RC_FILES=/etc/gtk/gtkrc:/home/rhudson/.gtkrc:/home/rhudson/.config/gtkrcKD
E_APPLICATIONS_AS_SCOPE=1KDE_FULL_SESSION=trueKDE_SESSION_UID=1000KDE_SESSION_VE
RSION=5PLASMA_USE_QT_SCALING=1PWD=/home/rhudsonQT_AUTO_SCREEN_SCALE_FACTOR=0QT_W
AYLAND_FORCE_DPI=96SESSION_MANAGER=local/adam:@/tmp/.ICE-unix/116281,unix/adam:/
tmp/.ICE-unix/116281SSH_AGENT_LAUNCHER=opensshSSH_AUTH_SOCK=/run/user/1000/opens
sh_agentUSERNAME=rhudsonWAYLAND_DISPLAY=wayland-0XAUTHORITY=/run/user/1000/xauth
_XomYVJXCURSOR_SIZE=24XCURSOR_THEME=breeze_cursorsXDG_CONFIG_DIRS=/home/rhudson/
.config/kdedefaults:/etc/xdg:/usr/share/desktop-base/kf5-settingsXDG_CURRENT_DES
KTOP=KDEXDG_SEAT=seat0XDG_SESSION_CLASS=userXDG_SESSION_DESKTOP=plasmawaylandXDG
_SESSION_ID=125XDG_SESSION_TYPE=waylandXDG_VTNR=2XKB_DEFAULT_LAYOUT=usXKB_DEFAUL
T_MODEL=pc105MANAGERPID=115882INVOCATION_ID=0d4b55c5d644487c8206fee266682b57JOUR
NAL_STREAM=8:2880529rhudson@adam:~$



On 1/19/24 08:35, Nicolas Fella wrote:
> https://bugs.kde.org/show_bug.cgi?id=479725
>
> --- Comment #6 from Nicolas Fella<nicolas.fella@gmx.de>  ---
> Well, for some reason Debian installes kpat to /usr/games instead of /usr/bin/
> and adds to PATH. Weird but ok.
>
> That said it works as expected for me on Debian. /usr/games is in PATH on both
> X11 and Wayland.
>
> Can you check the value of PATH in "cat /proc/$(pidof plasmashell)/environ" ?
>
Comment 8 Nicolas Fella 2024-01-19 16:50:34 UTC
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

as I expected there is no /usr/games here. Why that is I don't know. Do you change PATH manually somewhere?
Comment 9 Ronald Hudson 2024-01-19 17:20:36 UTC
Created attachment 165044 [details]
attachment-1821274-0.html

I am not sure at this point. I am pretty sure that if I did it was only 
to try to add /usr/games in.  In fact when I run Konsole and type kpat 
it started right up.

On 1/19/24 08:50, Nicolas Fella wrote:
> as I expected there is no /usr/games here. Why that is I don't know. Do you
> change PATH manually somewhere?



>