Close the Run window after script is done

Hello to all,

I am a Newcomer in Solaris and have the following problem.

I have a small shell script in my home folder, which I have moved to my desktop and from there I can start the script with a double mouse click.

If I do a double click on the symbol for the script in workspace, a Run window opens and the script does the job.
But after the script is finished, the Run window stays open, but I would like to have the Run window closing also after the script is finished.

How can I force the Run window to close after script is done ?

Thanks in advance.

Try putting:

exit

as the last line of your script.

Hi all,
thanks.

The story is, that I like to have my_script running in a terminal larger then the default window size settings ( default is 80x24 ) and I don't want to change the defaults.

Thats why a created a little start script, which looks like this :

#! /bin/ksh
dtterm -geometry 120x45 -title "my script" -e ksh -c "/path_to_my/script/my_script"
exit

This start script opens a new terminal window and my_script is running in that terminal ... works fine.
I put also exit on the end of my_script.
But if I start the start script on the right top corner a small icon pops up called "Run" , and this icon stays open and does not close, if my_script is finished.
But I like to have the Run icon closed also at the end of my script.
Any idea ? .... thanks in advance.

Hi Mike Newbie...
(Please use codetags.)
This seems a little complex...

#! /bin/ksh
dtterm -geometry 120x45 -title "my script" -e ksh -c "/path_to_my/script/my_script"
exit

If 120 x 45 is a requirement then this is worth a try this at the start of any of your code...

printf "\x1B[8;45;120t"

Hi wisecracker,

thanks a lot.

Can you please explain, what this command does in detail ?

printf "\x1B[8;45;120t"

Thanks.

printf "\x1B[8;45;120t"

1) "printf" is obviously the ba(sh) builtin.
2) " == to ensure shell pseudo-expansion opening double quote.
3) \x1B[, (or \033[), is the hex, (octal), value of the "Esc" character combination.
4) 8 == Resize the text area to given height and width in characters......
5) ; == separator.
6) 45 == vertical size.
7) ; == another separator finally for...
8) 120 == horizontal size.
9) t == do it to the terminal, (emulator, in this case on the fly).
10) " == ensure double quotes are closed...

Hope this helps...