LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-09-2014, 05:34 PM   #1
gnawk
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;" />
</exec>

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, 03:38 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
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 03:39 PM.
 
  


Reply


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 11:36 AM
[SOLVED] installing apache ANT, can't create /usr/local/ant folder per ANT's manual jclark978 Linux - Newbie 1 12-11-2011 03:00 AM
too many arguments to function 'read'/'write' dynaudio Linux - Kernel 11 12-29-2009 03:46 AM
how to write command line arguments as values, into a file which contains variables sathiawathi.m Linux - Newbie 2 07-17-2009 03:27 AM
Java + Ant - multiple Jar update revof11 Programming 0 07-18-2007 04:57 PM


All times are GMT -5. The time now is 03:07 PM.

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