LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Eterm / Xterm / aterm behavior (https://www.linuxquestions.org/questions/linux-newbie-8/eterm-xterm-aterm-behavior-695135/)

purehate 01-05-2009 11:47 AM

Eterm / Xterm / aterm behavior
 
Hi, I am by no means a Linux newbie however since its my first post here I felt I should post in the newbie section. So heres my issue which is really quite trivial but I cant seem to figure it out. I help out on a linux distro and we offer 2 desk top choices KDE and a light weight window manager. So in the past on the window manager we have used xterm and it has worked like this..

I will use nmap as a example. If I use xterm in my menu I can do this..

xterm -e "nmap -h ; sudo -s"

and it will open a xterm shell, run the command and return to prompt while leaving the shell open.
Code:


 Nmap 4.76 ( http://nmap.org )
Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION:....
 
....Scanning and Traceroute
  --datadir <dirname>: Specify custom Nmap data file location
  --send-eth/--send-ip: Send using raw ethernet frames or IP packets
  --privileged: Assume that the user is fully privileged
  --unprivileged: Assume the user lacks raw socket privileges
  -V: Print version number
  -h: Print this help summary page.
EXAMPLES:
  nmap -v -A scanme.nmap.org
  nmap -v -sP 192.168.0.0/16 10.0.0.0/8
  nmap -v -iR 10000 -PN -p 80
SEE THE MAN PAGE FOR MANY MORE OPTIONS, DESCRIPTIONS, AND EXAMPLES
localhost ~ #

The important part is that it leaves the shell open and at the prompt again so now the user can enter the nmap commands.

So my problem is we are now going to use Eterm or aterm and I cannot get those terms to behave in the same manner

Eterm -e "nmap -h" Shoots out a error

and aterm -e "nmap -h" simply returns to prompt with out even trying to open a aterm shell.

I would appreciate some help on this if anyone knows what to do, Thanks

indienick 01-05-2009 12:27 PM

Read the man pages perhaps? Eterm and aterm might use a different option flag for executing a command - maybe something like "-exec".

purehate 01-05-2009 01:58 PM

Of course I read the man pages many times. I did get some help from the Eterm devs so I solved the issue. Not sure if anyone cares but heres what happens...

For security reasons Eterm does not call the -e function in the same way xterm does so in order to exhibit the same behavior you have to do this

Eterm -e /bin/sh -c "nmap -h"

Problem solved.


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