Running an xterm with a particular command in it


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Running an xterm with a particular command in it
# 1  
Old 11-09-2010
Running an xterm with a particular command in it

Hi guys i'm trying to run an xterm with a particular command in it. I have looked at the man page of xterm and it says to do this we use following command: -e program [ arguments ...]

I want it to open the man page of the bash file.

I tried xterm [man bash] -e.

It doesnt seem to work. I must be doing it completetly wrong.

Any suggestions please?

Regards

Shyam
# 2  
Old 11-09-2010
xterm must have an xserver to display to, otherwise it will give an error. If you do have a valid xserver, don't forget to pause the command somehow, otherwise the window will disappear again once the command completes. For example, try:
Code:
xterm -e "ls|less"

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Error while running xterm in telnet script

Error: Type xterm -help for a full description. xterm: Explicit shell already was /root/Desktop/telnet.sh xterm: bad command line option "Done!" usage: xterm (0 Replies)
Discussion started by: sk151993
0 Replies

2. Shell Programming and Scripting

How run simple command in xterm, and leave open?

I have written a simple script to show battery life remaining. I would like to be able to quickly view it with a predefined keybinding or launcher. xterm -e scriptname should do the trick but the xterm closes when the script finishes, not giving me chance to read the output. How can I keep... (3 Replies)
Discussion started by: spoovy
3 Replies

3. UNIX for Dummies Questions & Answers

Ctrl-enter doesn't work when running Midnight Commander in xterm

When running MC in xterm or gnome-terminal, it doesn't seem to allow the use of Ctrl-enter and Ctr-shift-enter to copy marked files to the command line. Does anyone know of another way to cause this to happen or a way to enable it under xterm/gnome-term? With thanks, Narnie (0 Replies)
Discussion started by: Narnie
0 Replies

4. UNIX for Dummies Questions & Answers

'export TERM=xterm-color' pretty much screws up clear command

I like using VIM with color tagging (using putty to SunOS). However, when I do an "export TERM=xterm-color", I can't make use of the clear command. Clear just has the same effect as pressing enter now. How can I fix this? Also, does anyone know how to get the directories and file colors... (6 Replies)
Discussion started by: mrwatkin
6 Replies

5. UNIX for Dummies Questions & Answers

Problem with xterm & tcsh & sourcing a script in a single command

Hi friends, I have a script that sets the env variable path based on different conditions. Now the new path variable setting should not done in the same terminal or same shell. Only a new terminal or new shell should have the new path env variable set. I am able to do this only as follows: >cd... (1 Reply)
Discussion started by: sowmya005
1 Replies

6. UNIX for Dummies Questions & Answers

xterm closing automatically after command excution

Hi, I have a commands in a file called commands.file, I am using this file with the following commnad xterm -e "commands.file" After executing this file in the new xterm, it is closing automatically. I want to use that xterm after that. Please help me regarding this? :) ... (4 Replies)
Discussion started by: chaitubek
4 Replies

7. UNIX for Dummies Questions & Answers

XTERM Command ????

All, Stuck with a XTERM issue ?? For some users, who are having execute permission (valid users), it's not showing the scroll bar in the GUI. Whereas for other invalid users( who do not have the execute permission) shows the scroll bar in the GUI. Confused ??? what could be the problem ?? Even,... (2 Replies)
Discussion started by: ronix007
2 Replies

8. Shell Programming and Scripting

How to send a Xterm command via a shell command

Hello, I would like to send via a shell script a command to my XTerm. For instance, I would like a shell script of mine to perform the command "clear-saved-lines()" to my Xterm. Indeed, I don't want to use /usr/bin/clear but a command that erases everything in my xterm. Thank you, --... (1 Reply)
Discussion started by: MROZ
1 Replies

9. UNIX for Dummies Questions & Answers

Correct switches for xterm command to make font larger

Dear Sirs Whenever I bring up an xterm window on my laptop running Mandrivia Linux, the font in the xterm window is so small that it is practically unreadable ! What switches do I need to use with the xterm command xterm -?? in order to make the font larger ? (3 Replies)
Discussion started by: kanejm
3 Replies

10. UNIX for Dummies Questions & Answers

Equivalent unix command to minimize/maximize xterm window

To all experts, I need some advice on how I can enter a unix command which is equivalent to the action of minimizing/maximizing an active xterm window. How can I do this (i) when control is in the active xterm window to be minimized/maximized , & (ii) when control is in a xterm window which runs... (0 Replies)
Discussion started by: icemocha75
0 Replies
Login or Register to Ask a Question