You are not logged in.
I am trying to use a .desktop file where, in Exec field, I would like to run simple bash code. I'm trying to use "sh -c" (and also bash -c) but I get the error:
error launching application: Desktop file didn’t specify Exec
As example, I'm testing it by the following .desktop file:
[Desktop Entry]
Name=appname
StartupWMClass=AppName
Encoding=UTF-8
Exec=sh -c "if command -v appname &> /dev/null;then nohup appname >/dev/null 2>&1;else echo \"App is not installed\";fi;"
Icon=icon
StartupNotify=false
Terminal=false
Type=Application
and if I run "gtk-launch filename.desktop" I get that error.
appname is intended to be a GUI application.
EDIT: .desktop file Exec does not like \"
Last edited by D3vil0p3r (2024-04-20 10:39:21)
Offline