Skip to main content
Post Made Community Wiki by don_crissti
Source Link
don_crissti
  • 85.7k
  • 31
  • 234
  • 262

The Exec key in a .desktop file accepts only one executable name (+ arguments):

The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments.

So, you either:

  • invoke the shell with an explicit sh -c "command_string" (where command_string = your actual commands):

     Exec=sh -c "cd /home/abc/wikidpad; python WikidPad.py"
    

or

  • put your commands in a script (somewhere in your $PATH), make it executable and have the .desktop file execute the script:

    Exec=my_script
    

(or Exec=/full/path/to/my_script if the script is not in your $PATH).