Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-09-2014, 04:34 PM   #1
LQ Newbie
Registered: Jun 2014
Posts: 1

Rep: Reputation: Disabled
How to write multiple exec arguments in ant

I want to write an ant script that will

1. Start up a new terminal
2. Change user
3. And run the Appium session

This is what i have so far but it doesn't do anything

<exec executable="/bin/bash" spawn="true">
<arg value="-c" />
<arg value="gnome-terminal -x su appium" />
<arg value="appium &amp;" />

The script above will start up the new terminal in user appium but it doesn't seem to start up the appium session. Any help will be much appreciated!
Old 06-10-2014, 02:38 PM   #2
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,706

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
That is because gnome-terminal only takes commands from its terminal (the terminal window created), not from the command line specified by -x.

I think you would have better luck putting it all on the same command...

"gnome-terminal -x su - appium -c appium"

The su - is to be sure that the home directory is correct as is the environment. Then the -c command tells su to execute the appium application. When that application exits, so does su, and gnome-terminal.

Last edited by jpollard; 06-10-2014 at 02:39 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] find mtime exec still gets too many arguments rjo98 Linux - Newbie 8 02-20-2012 10:36 AM
[SOLVED] installing apache ANT, can't create /usr/local/ant folder per ANT's manual jclark978 Linux - Newbie 1 12-11-2011 02:00 AM
too many arguments to function 'read'/'write' dynaudio Linux - Kernel 11 12-29-2009 02:46 AM
how to write command line arguments as values, into a file which contains variables sathiawathi.m Linux - Newbie 2 07-17-2009 02:27 AM
Java + Ant - multiple Jar update revof11 Programming 0 07-18-2007 03:57 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration