xterm closing automatically after command excution


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers xterm closing automatically after command excution
# 1  
Old 04-15-2009
Question 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?

Smilie

Thanks,
Chaitanya.
# 2  
Old 04-15-2009
Put a sleep or read at the end of the script.
# 3  
Old 04-15-2009
Hi Pludi

Thanks for the reply, I put sleep at the end of the file commnads.file, eventhough xterm automatically closing after excuting the commands.file. I am using tcsh shell commands in the comands.file

Thanks,
Chaitanya.
# 4  
Old 04-15-2009
How long do you want the window to stay open? Until the user acknowledges it? Then use read var (or the tcsh equivalent). For a certain period of time? Then use sleep <seconds>. Indefinitely? Use read var < /dev/zero (or the tcsh equivalent, will use a lot of CPU).
# 5  
Old 05-05-2009
set env variables in a new xterm

Hi,
I have a script that sets some env variables.
I want to source the script in a new xterm and
after the script execution is over, the xterm has to be alive with the env variables set according to the script.
I tried
xterm -e "source ./myscript;tcsh" &

The variables are getting set during program execution.
I knew this because i used an echo in the script.
After the program execution is over, the xterm is alive,
but the env variables are lost.

Please help me.

Thank u.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Customized command excution

Hi, The below commands will be inside a KSH script and SOLARIS machine. Command-1 //Executes in 10s,5s,..5mins,etc TIMER = Look for Command-1 execution status - IF finished in 25secs move to next command in the script IF NOT kill above command and move to next command. Command-2 Any... (9 Replies)
Discussion started by: penqueen
9 Replies

2. UNIX for Dummies Questions & Answers

Prevent terminal from closing after command execution

Hello, I want to create application which launches some terminal, then some command is executed on that terminal and then prevent terminal from closing. I started to do on gnome-terminal because the Gnome is the most widely used desktop-manager in the Linux distributions. I want to do... (3 Replies)
Discussion started by: tyanata
3 Replies

3. Shell Programming and Scripting

Sed command to replace with pattern except for text and closing parentheses

Can someone help me with a sed command: There will be multiple occurences in a file that look like this: MyFunction(12c34r5) and I need to replace that with just the 12c34r5 for every occurrence. The text between the parentheses will be different on each occurrence, so I can't search for that.... (4 Replies)
Discussion started by: missb
4 Replies

4. 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

5. UNIX for Dummies Questions & Answers

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 I want it to open the man page of the bash file. I tried xterm -e. It doesnt seem to work. I must be doing it... (1 Reply)
Discussion started by: Shyamz1
1 Replies

6. Shell Programming and Scripting

Closing sockets with shell-command ?

Hello everyone. (I have found in this forum lots of infos about closing socket in c, and others lenguages but never with shell-command) Im developing a tool over tcl/tk; in this application i open a socket to communicate with a ada application. In the init script i open both programs (tcl... (2 Replies)
Discussion started by: trutoman
2 Replies

7. UNIX for Advanced & Expert Users

To find the time of excution of a particular unix command

Hi experts, It would be grateful if you can guide me on the following, 1.How to find the time of excution of a particular unix command. 2. How to find the terminal (IP Address) from where that particular unix command was excuted. 3. How to find the user who executed that particular unix... (1 Reply)
Discussion started by: apsprabhu
1 Replies

8. 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

9. 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

10. 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
Login or Register to Ask a Question