The Executor
Prev
Next

The Executor

The executor, called kmdr-executor, runs Kommander scripts. It loads .kmdr files and dynamically produces a fully functional dialog.

Warning

Starting with version 1.3, the executor warns if the script file is not executable. This is an extra security feature that tries to make the user think about the possible bad consequences of running a script from untrusted source. The user can confirm to run the dialog or if he trusts the source, can make the script executable and get rid of the warning completely.

Note

Version 1.3 supports the #!/path/kmdr-executor shebang in the beginning of the .kmdr script files (replace path with path to the Such files if they are made executable can be run from command line just like any executable application, without the need to pass the script to kmdr-executor as argument.

Remember, that once you add the shebang at the beginning of the file, the dialog cannot be run or edited with older versions of Kommander.

The recommended usage is

#!/usr/bin/kommander
and create a symlink from kmdr-executor to /usr/bin/kommander.

The shebang can be added to a dialog directly from the editor, by modifying the useShebang and shebang properties for the main dialog.

Executor for Programmers

C++ developers can easily use the Instance class in their C++ programs so that the execution functionality is embedded in the their application obsoleting the need for running the external executor program. For standard dialog the dialog creation overhead is minimal but the creation of the KDE application may delay the dialog for around a second.

Another approach is to use the kommander_part KReadOnlyPart. This KPart can load and execute any Kommander dialog inside another KDE application.

Prev
Next
Home


Would you like to comment or contribute an update to this page?
Send feedback to the TDE Development Team