Reputation: 163
Using Apache ANT in Linux, I need to open a program and after that close the terminal window. The terminal command is of the kind:
#> evince /home/my.pdf & exit
I'm trying the following:
<exec executable="/bin/sh">
<arg value="-c"/>
<arg value="evince /home/my.pdf & exit"/>
</exec>
But this immediately closes the terminal and also the application. How can I fix this?
Upvotes: 0
Views: 411
Reputation: 11
you could try this: http://ant.apache.org/manual/Tasks/exec.html
<exec executable="/bin/sh" spawn="true">
<arg value="-c"/>
<arg value="nohup evince /home/my.pdf >> /dev/null & exit"/>
</exec>
Upvotes: 1
Reputation: 163
This works fine:
<exec executable="/bin/sh">
<arg value="-c"/>
<arg value="nohup evince /home/my.pdf >> /dev/null & exit"/>
</exec>
Upvotes: 0