SUMMARY I created a script to run a program. When I went to + Add Application and browsed to it, I got an error alert "not found, please type a valid program name". Eventually I realized I had forgotten to make the script executable STEPS TO REPRODUCE 1. Create a simple script, e.g. #!/bin/sh echo "STDOUT from $0 : hello" 2. Save the file as /tmp/start_test.sh but don't make it executable. 3. Run System Settings > Startup and Shutdown > Autostart 4. Choose + Add... > + Add Application..., browse to the script, click [OK] OBSERVED RESULT You get an error alert '/tmp/start_test.sh' not found, please type a valid program name. The workaround, obvious to more expert users, is `chmod a+x /path/to/script.sh`. EXPECTED RESULT The script was obviously found, but it's not valid because it's not executable. The alert text (from https://invent.kde.org/frameworks/kio/-/blob/master/src/widgets/kopenwithdialog.cpp#L1009 ) should be something like "'%1' not found or is not executable , please type a valid program name." or "'%1' is not an executable file, please type a valid program name." Other things that would help, also in frameworks/kio which presents this KOpenWithDialog: * the file browser could gray out non-executable programs so you see them but can't choose them * the file browser could show permissions in a column SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.21.5 KDE Frameworks Version: 5.82.0 Qt Version: 5.15.2 64-bit, Wayland ADDITIONAL INFORMATION Maybe the bug is in kio not this KCM, but I'm not sure where else kio's KOpenWithDialog() is used.
Adding a script via "Add application" is an interesting corner case that I had not considered. I can adapt https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/878 to cover this as well
(In reply to Nicolas Fella from comment #1) > Adding a script via "Add application" is an interesting corner case that I > had not considered. > > I can adapt > https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/878 to cover > this as well hmm no, it's not that easy unfortunately
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/466
https://invent.kde.org/frameworks/kio/-/merge_requests/466 improves the error message in that case. I'm not sure a more invasive solution is justified given that for the user case of adding a script the "Add login script" option (which will get a proper executable check in https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/878) is preferred over the "Add application" option.
Git commit d57bb4cbd964ecdfc5a2b3c1f36469aeac8e960b by Nicolas Fella. Committed on 31/05/2021 at 13:53. Pushed by ahmadsamir into branch 'master'. [kopenwithdialog] Show better error message when specifying a non-executable file If the user uses the file picker to specify a file instead of an application the file has to be executable. If it isn't "$file not found, please type a valid program name" is shown, which is confusing. Instead show that the file is not executable so the user knows what's going on. M +9 -1 src/widgets/kopenwithdialog.cpp https://invent.kde.org/frameworks/kio/commit/d57bb4cbd964ecdfc5a2b3c1f36469aeac8e960b
(In reply to Nicolas Fella from comment #4) > ... for the user case of adding a script the "Add login > script" option (which will get a proper executable check in > https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/878) is > preferred over the "Add application" option. My years-old script launches Konsole with `konsole --tabs-from-file ~/dotfiles/session.konsole`. At some point in the upgrade to Fedora 34 on Wayland or afterwards, Konsole no longer appeared at startup (journalctl had errors "unknown: This compositor does not support the Plasma Window Management interface" as if the script was running too soon, or under sddm or something). So I assumed you _can't_ start applications from a login script any more, so I moved it to Autostart > + Add Application. Should I file a bug that Autostart > Login scripts can't launch programs in Fedora 34 Wayland? Thanks for working on this!
Git commit 776f5c593ef8b1df40fae0961001e3e49c58aab4 by Nate Graham. Committed on 05/06/2021 at 13:17. Pushed by ngraham into branch 'master'. [kopenwithdialog] Improve executable-related error messages Use KUIT formatting and polish the error messages to be more descriptive and more grammatically correct in English. M +2 -2 src/widgets/kopenwithdialog.cpp https://invent.kde.org/frameworks/kio/commit/776f5c593ef8b1df40fae0961001e3e49c58aab4
(In reply to skierpage from comment #6) > My years-old script launches Konsole with `konsole --tabs-from-file > ~/dotfiles/session.konsole`. At some point in the upgrade to Fedora 34 on > Wayland or afterwards, Konsole no longer appeared at startup (journalctl had > errors "unknown: This compositor does not support the Plasma Window > Management interface" as if the script was running too soon, or under sddm > or something). So I assumed you _can't_ start applications from a login > script any more, so I moved it to Autostart > + Add Application. Should I > file a bug that Autostart > Login scripts can't launch programs in Fedora 34 > Wayland? > > Thanks for working on this! Login scripts don't work at all on current Fedora 34. That will be fixed in Plasma 5.22, to be released next week