How to start a program interactively?

Answered

Comments

1 comment

  • Avatar
    wojciechka

    Unfortunately this is a bit more complex for Linux - as this may require detecting the appropriate terminal.

    Many Linux distributions have x-terminal-emulator linking to user's preferred terminal emulator, so what can be done is:

    <if>
    <actionList>
    <runProgram>
    <program>x-terminal-emulator</program>
    <programArguments>-e ${installdir}/prog &amp;</programArguments>
    </runProgram>
    </actionList>
    <conditionRuleList>
    <programTest>
    <condition>is_in_path</condition>
    <name>x-terminal-emulator</name>
    </programTest>
    </conditionRuleList>
    <elseActionList>
    <runProgram>
    <program>xterm</program>
    <programArguments>-e ${installdir}/prog &amp;</programArguments>
    </runProgram>
    </elseActionList>
    </if>

    This runs x-terminal-emulator with -e option to run the command. If the command is not present, a fallback to xterm command is used.

    0
    Comment actions Permalink

Please sign in to leave a comment.