Run program automatically when starting an AppVM

Hi all, I am trying to run a program in the autostart of an App VM. For this I have created a file in the /config/autostart with the name “program.desktop”.

[Desktop Entry]
Type=Application
Exec=/path/to/program/program
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Program
Name=Program
Comment[en_US]=Start program on VM startup
Comment=Start program on VM startup

(at Path to the program I wrote in the path of the program. )

But when I start the VM the program does not start.
Do you have any idea what I am doing wrong?

(I got the content of the file from Chatgpd)

Did you place the file in /home/user/.config/autostart ?

yes the program.desktop.

The program I want to start is in another directory which I have entered in the program.desktop.

This is all you need

[Desktop Entry]
Type=Application
Name=Autostart Script
Exec="/path/to/program"
X-GNOME-Autostart-enable=true
1 Like

Do I have to specify the start file with ./filename at the line of the target?