|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
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 something like that: Code:
gnome-terminal --sync -x tcsh -c "cd xys; command ;" & In konsole there is a --noclose option preventing the terminal from closing after the command execution. I can do it like that: Code:
gnome-terminal --sync -x tcsh -c "cd xys; command xxx ; exec tcsh; " & But then I lose the certain settings which I loaded in the terminal during the command xxx execution. Do you know how to prevent gnome-terminal from closing after the command execution?
Last edited by vbe; 06-11-2012 at 08:09 AM.. |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
what does this command line give you: Code:
gnome-terminal --sync -x tcsh -exec "cd xys&& command xxx; exec tcsh" & # or: gnome-terminal --sync -x tcsh -exec "cd xys; command xxx && exec tcsh" & Last edited by vbe; 06-11-2012 at 08:59 AM.. Reason: typos |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Using && instead of ; in the command does not change the problem that if there is a exec tcsh in the end of line the settings loaded before that are lost.
I want to do gnome-terminal --sync -x tcsh -c "cd <some_folder>; some_command ;" & And terminal to remain opened after some_command execution. If in xterm that is possible I can use it instaed of gnome-terminal. |
|
#4
|
||||
|
||||
|
Its the first
- exec I wanted to know about for I have no tcsh... can only emulate in ksh without gnome...
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Terminal is closing on exit in ksh | vij_krr | Shell Programming and Scripting | 3 | 02-09-2010 02:46 AM |
| Closing sockets with shell-command ? | trutoman | Shell Programming and Scripting | 2 | 06-01-2009 11:53 AM |
| Terminal Execution By Giving a Command | indiansoil | Linux | 2 | 07-07-2008 04:25 PM |
| How to prevent an application from closing a file | jasahl | AIX | 4 | 01-06-2008 08:39 PM |
| how to run a process after closing the terminal | lakshmananindia | UNIX for Advanced & Expert Users | 3 | 09-03-2007 11:05 AM |
|
|