Describe the bug
Some desktop entries do not launch from nwg-dock due to how command line arguments are handled. Specifically, having the passed parameter %F in the Exec statement of a .desktop file along with other command line flags seems to prevent the application from launching.
To Reproduce
Steps to reproduce the behavior:
Open an application that supports %F as a parameter and pin to the dock (to reproduce this, I used code-oss).
Update the desktop entry for that application (in my case /usr/share/applications/code-oss.desktop) to contain an Exec statement containing %F. For example Exec=/usr/bin/code-oss --enable-features=UseOzonePlatform --ozone-platform=wayland --unity-launch %F.
Close the application.
Try to re-open it from the dock. If nwg-dock is started from a terminal the following debugging statement is logged, indicating that the actual command name has been truncated.
env vars: ["--enable-features=UseOzonePlatform --ozone-platform=wayland]; command: '--unity-launch'; args: []
Expected behavior
nwg-dock should launch the application with all command line flags intact.
Desktop (please complete the following information):
Arch Linux (5.13.6-arch1-1)
wayland 1.19.0-1
go 1.16.5
gtk-layer-shell 0.6.0-1
Additional context
The same desktop entry launches from gtk-launch, bemenu, etc. just fine. I'm not sure if there's another way to format my Exec statement to make this work or if nwg-dock is just tripping up on just %F or all passed parameters, but I thought I'd report this anyway. I haven't written any Go in forever but when I have some time I might be able to track down the bug and submit a PR if you're too busy. Thanks. :)
Running external commands in golang sucks, as you can not give env vars and the command together. I'll try to improve parsing, as soon as I'm back from holiday (after 13rd Aug).
Describe the bug Some desktop entries do not launch from nwg-dock due to how command line arguments are handled. Specifically, having the passed parameter
%F
in theExec
statement of a .desktop file along with other command line flags seems to prevent the application from launching.To Reproduce Steps to reproduce the behavior:
%F
as a parameter and pin to the dock (to reproduce this, I usedcode-oss
).Exec
statement containing%F
. For exampleExec=/usr/bin/code-oss --enable-features=UseOzonePlatform --ozone-platform=wayland --unity-launch %F
.env vars: ["--enable-features=UseOzonePlatform --ozone-platform=wayland]; command: '--unity-launch'; args: []
Expected behavior nwg-dock should launch the application with all command line flags intact.
Desktop (please complete the following information):
Additional context The same desktop entry launches from gtk-launch, bemenu, etc. just fine. I'm not sure if there's another way to format my
Exec
statement to make this work or if nwg-dock is just tripping up on just%F
or all passed parameters, but I thought I'd report this anyway. I haven't written any Go in forever but when I have some time I might be able to track down the bug and submit a PR if you're too busy. Thanks. :)