Bug 488232 - local x-window app that still works from command line no longer launches
Summary: local x-window app that still works from command line no longer launches
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) widget (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-08 23:53 UTC by Gary Murphy
Modified: 2024-06-11 21:32 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Murphy 2024-06-08 23:53:19 UTC
SUMMARY
This is very new behaviour as of within the past few days. Clicking a launcher for a local app will animate on click, but the app does not launch and no error is reported.

STEPS TO REPRODUCE
1. create a launcher with ~/.local/bin/xwin-prog given environment XPROG=~/.xprog and parameters "--this='that'"
2. drag and drop the launcher on to the Panel
3. click the panel icon or the launcher icon to launch

OBSERVED RESULT
the icon on hover identifies the program, blue dots spin around it when it is clicked, but the program no longer appears.

EXPECTED RESULT
this particular application opens a shell window and another graphic chart display; interacting with the chart displays data in the shell.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Ubuntu Studio 24.04 X11 (not Wayland)
(available in About System)
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 

ADDITIONAL INFORMATION
when bash is given the command line
> XPROG=~/.xprog  ~/.local/bin/xwin-prog --this='that'
the program displays as expected. to be fair, I haven't yet tested using a different xwindows program, but this particular application is one I would query frequently from the panel.

Editing the launcher, I noticed the environment variable assignment had been quoted; I removed these, saved, but re-editing shows they were put back in. The program parameters however are not shown as quoted.
Comment 1 Gary Murphy 2024-06-09 00:16:34 UTC
I can confirm this did not affect loading the Qt application qutebrowser, or the KDE Snapshot app. This only seems to affect the xwindow app.
Comment 2 Gary Murphy 2024-06-09 01:07:02 UTC
Have confirmed recompiling the xwindows application after an apt upgrade and reboot to ensure libraries match; that wouldn't explain why Konsole can launch the same command line in bash, but I wanted to make sure. There is a slightly different behaviour in a Konsole window now appears briefly and then vanishes.
Comment 3 Gary Murphy 2024-06-09 01:09:33 UTC
Also confirm that, after reboot, clicking the launcher from the Application Launcher works, but clicking the icon on the panel does not.
Comment 4 Nate Graham 2024-06-10 17:58:49 UTC
Can you provide the program so we can test with it?

And can you also attach the .desktop file that was created for it in ~/.local/share/applications/ ?
Comment 5 Gary Murphy 2024-06-10 17:59:36 UTC
I should have done this before and apologize for not thinking of it, but I set the terminal to not close after execution and the problem appears to be those inserted quote marks around the environment variable assignment, the variable is ignored and so the program is exiting because it cannot find its data files.  While this is a good theory, it doesn't explain why the same quoted 'XPROG=~/.xprog' in the Environment form does work when launched from the KDE Launcher, but not when put into the panel.
Comment 6 Gary Murphy 2024-06-10 18:01:45 UTC
The work-around is to explicitly add the working directory so all its files are local.
Comment 7 Gary Murphy 2024-06-11 01:56:03 UTC
I think we can actually close this ticket: I just noticed the Launcher version of the app had already defined a working directory whereas the Panel icon launcher did not; I was not aware that these where independent launchers!

It is not unlikely that this particular app, which is not mine, may intend to use XPROG as a working directory, but it maybe does not, or the ~ is not expanded, it could be anything but it does not appear to be specific to the Panel or the Launcher.
Comment 8 Akseli Lahtinen 2024-06-11 07:40:00 UTC
Closing per reporter request, thanks for the report!
Comment 9 Nate Graham 2024-06-11 21:32:51 UTC
Ok, thanks for following up!