And what is the value of the property ${os.unix}? If you're going to use the os parameter, you usually give it a string constant and not a property value.
<exec executable="/bin/bash" os="unix" spawn="true">
<arg value="-c" />
<arg value="gnome-terminal su appium" />
<arg value="appium &" />
</exec>
This way, you could have an <exec> task for all Unix style operating systems, and another <exec> task for all the other ones (Windows).
Also understand the difference between <arg value="..."/> and <arg line="..."/>. I don't know the exact command structure for gnome-terminal, but when you pass something as a value, you're passing it as a single parameter -- even if it has spaces in it. For example:
<exec executable="foo">
<arg value="-f foo -b bar"/>
</exec>
Will execute as if I typed this in the command line:
$ foo "-f foo -b bar" # This is one command with one parameter. Note the quotation marks!
If I do this:
<exec executable="foo">
<arg line="-f foo -b bar"/>
</exec>
Will execute as if I typed this in the command line:
$ foo -f foo -b bar # This is one command with four parameters
This is equivalent to the above Ant task:
<exec executable="foo">
<arg value="-f"/>
<arg value="foo"/>
<arg value="-b"/>
<arg value="bar"/>
</exec>
Currently, you're attempting to execute:
$ /bin/bash -c "gnome-terminal su appium" "appium &"
If this is what you want, fine. By the way, you could skip the whole /bin/bash stuff on Unix:
<exec executable="gnome-terminal" os="unix" spawn="true">
<arg value="su appium"/>
<arg value="appium &"/>
</exec>