Problem - gnome terminal shell scripting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem - gnome terminal shell scripting
# 1  
Old 07-27-2009
Power Problem - gnome terminal shell scripting

I've a python script named rwe.py. I'm running the program in three separate terminals. If one of the executing program stops . I want to leave the terminal as it is so that i can see the error. i wrote a the below script and used cron to run it every one hour to check if the three programs are running. if not open a new terminal and run the program.
My problem here is that In the script below the terminal window where the new rwe.py runs and if an error occurs the newly open terminal window closes and i'm not able to see the error. I want the newly created terminal window to stay as it is so that i can come back and see the error.

count=`ps -ef | grep rwe.py | grep -v grep | wc -l`
echo $pid
if test $count -lt 3
then
gnome-terminal -e "./rwe.py"
echo "hi"
fi

Please help!!!!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How are environment variables defined in a Gnome terminal session?

Hello... and thanks in advance for any help anyone can offer me with my question! I'm hoping someone will have a little patience with me and walk me through this! I'm trying to understand a user login process on Centos 7 and I've gotten a bit confused trying to figure out when/how a Gnome... (4 Replies)
Discussion started by: bodisha
4 Replies

2. Shell Programming and Scripting

Open gnome-terminal with multi tabs and automatically run a script in each tab

Hi All , i am trying to create an alias to open a new gnome-terminal and run some commands in each tab & to have a specific name for each tab i am using csh , tried this command gnome-terminal --tab -t "s1" --tab -t "s2" --tab -t "s3" --tab -t "s4" it opened 4 tabs but the title didn't... (0 Replies)
Discussion started by: Assem
0 Replies

3. Shell Programming and Scripting

Problem run script inside a gnome-terminal

hi, I would like to ask about using gnome-terminal command, I had a script that will run my VBOX VM in headless and i want to display the output(STDOUT) on the gnome-terminal window. The purpose that i want to display the STDOUT of the script cause i will used it or create a desktop shortcut for... (11 Replies)
Discussion started by: jao_madn
11 Replies

4. Shell Programming and Scripting

Issue with gnome terminal

Hi, I cant get this command to run in a new gnome terminal cd "$PRG" && gnome-terminal -x sh -c './prg -r testcommand' &>/dev/null & i can run just ./prg -r testcommand and it runs fine but in the command above it only runs ./prg Any ideas community Cheers in advance (0 Replies)
Discussion started by: digitalviking
0 Replies

5. UNIX for Dummies Questions & Answers

gnome-terminal questions

I have a couple questions regarding gnome-terminal. Basically I am trying to write an alias that will bring up several gnome-terminals that navigate to certain directories and run certain commands. I have it pretty well figured out, but the one I am having a problem with is simply running a... (2 Replies)
Discussion started by: Tennesseej
2 Replies

6. Linux

How to open a gnome-terminal in specific workspace and run script within it automatically upon login

OK this is a bit messy. I run Fedora with gnome on a compiz desktop, I have a script (userstart) that opens my 'standard' environment for all my machines when I login. userstart flips to a specific workspace and then opens the required applications in that workspace then flips to the next... (2 Replies)
Discussion started by: Bashingaway
2 Replies

7. Shell Programming and Scripting

Shell Scripting problem

Hi guys, I am a newbie to shell scripting.Please help me to accomplish this task. Its very urgent,I should create a script which will do the following: i) "cd ~joseph/ ; mkdir -p Bing/Bong ;mkdir -p Bing/Bang" and then create 15 ".txt" files with content "Bing Bang Bong" in "Bong"... (1 Reply)
Discussion started by: mahesh_raghu
1 Replies

8. UNIX for Dummies Questions & Answers

Dumb gnome terminal question.

I've searched and searched but either I'm not using the right key words or the information isn't in print anywhere. I'm running Cent 5.3 and I have a number of terminal profiles setup to ssh into some of my Unix servers at work, what I'm trying to do is setup shortcuts on my desktop to those... (3 Replies)
Discussion started by: nixnoob
3 Replies

9. Shell Programming and Scripting

Problem with gnome-terminal

Hello everyone. This is my first post.:o Using Ubuntu 8.04 and bash 3.2.39 i'm trying to adapt my routine to this platform. So, this means forget xterm and use gnome-terminal (as default ubuntu terminal). EveryDay i need to connect to several servers, and i've made a Tcl'script to make this... (1 Reply)
Discussion started by: trutoman
1 Replies

10. Shell Programming and Scripting

shell scripting problem

her i am trying to edit a database file which is actually a small file holding my friend's name and birthdays My Database DEEPAK 27/08 DEEPIKA 18/02 DHYAN 23/03 DIPANKAR 24/10 SNIGDHO 19/05 AYANNAR 17/12 BHAI 22/09 DEBAN 16/08 JAGADISH 02/06 SUBHOJIT 23/02 TOJO 17/09 SUDHIR 12/09... (1 Reply)
Discussion started by: mobydick
1 Replies
Login or Register to Ask a Question
GNOME(1)						      General Commands Manual							  GNOME(1)

gnome-wm - Launches the user selected window manager for the GNOME session

SYNOPSIS
gnome-wm [--default-wm windowmanager] [--sm-client-id id] DESCRIPTION
The gnome-wm script invokes the user selected window manager. If the user has not chosen a window manager it will try to launch a GNOME compliant window manager. The user can overwrite the selection of a window manager by setting the WINDOW_MANAGER environment variable. If a --default-wm option is given the script uses that window manager in case WINDOW_MANAGER is not set. If gnome-wm is given as the argument to --default-wm then it is the same as if no default was given. The script takes the --sm-client-id argument and translates the id to an appropriate option depending on which window manager was selected. ENVIRONMENT
The gnome-wm program uses the value of the WINDOW_MANAGER environment variable to let the user override the configured window manager. PERSISTENT SETTINGS
The program stores the current selection of a window manager in the gconf key /desktop/gnome/applications/window_manager/default SEE ALSO
gnome-session(1),default.session(5) BUGS
If you find bugs in the gnome-wm program, please report these using bug-buddy or the gnome-bug script included with the GNOME libraries distribution. GNOME 1.0 GNOME(1)