urls application will start with.
locale that may be needed to be placed in urls if Exec value has %c code.
preferable terminal emulator command. If not set then terminal is determined via getTerminalCommand. Note: This function does not check if the type of desktop file is Application. It relies only on "Exec" value.
ProcessException on failure to start the process. desktopfile.utils.DesktopExecException if exec string is invalid.
1 auto df = new DesktopFile(); 2 assertThrown(df.startApplication(string[].init)); 3 4 version(Posix) { 5 static string[] emptyTerminalCommand() nothrow { 6 return null; 7 } 8 9 df = new DesktopFile(iniLikeStringReader("[Desktop Entry]\nTerminal=true\nType=Application\nExec=whoami")); 10 try { 11 df.startApplication((string[]).init, null, emptyTerminalCommand); 12 } catch(Exception e) { 13 14 } 15 }
Starts the application associated with this .desktop file using urls as command line params.
If the program should be run in terminal it tries to find system defined terminal emulator to run in.