A .desktop file is not meant to be executed by hand. You can add it to /usr/local/share/applications/ or ~/.local/share/applications/, it should then appear in the Application menu in the qube settings.
That’s not the issue here. The issue is, that the autostart does not work. I’m trying to autoconnect on VM startup with the my VPN.
That’s why I have my start_vpn.desktop file in /.config/autostart with a path to: start_vpn.sh
I tried ./start_vpn.sh in terminal so that script works. The paths in the .desktop file are set correctly. When running the .desktop file from applications the VPN connects as described. The problem is that when running the same .desktop file from autostart it does not connect the VPN.
I replied to this when you mentionned you tried to execute the .desktop file, which is not meant to be executed.
As for your issue, maybe the current working directory is important in your script, and from autostart it is run from a different working directory and thus doesn’t work? Do you have anything in your logs?
I get this erorr even when trying to run it manually. I can’t open the app form the app menu, but when I open the app be the Exec command form the desktop entry it works.
[Desktop Entry]
Name=IntelliJ IDEA Ultimate 2024.2.4
Exec="/home/user/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate/bin/idea" %u
Version=1.0
Type=Application
Categories=Development;IDE;
Terminal=false
Icon=/home/user/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate/bin/idea.svg
Comment=The Leading Java and Kotlin IDE
StartupWMClass=jetbrains-idea
StartupNotify=true