0

Here is the situation, I'm planning to use a simple script to start a program call "STAF", when the Suse system is fully booted. I have achieved this by putting it in the "/etc/init.d/", but this script is basically executed at the background, which means that I cannot see its progress.

When the "STAF" is started this way it works but it doesn't show any working progress when its running service (for example ping, or system backup), instead if I start the "STAF" manually by running the same script whit a terminal, the working progress of "STAF" can be seen on the terminal. Its sort of like the program needs to be started with a interactive terminal, but how can I make this starting process automatic and it should imitate human opening a terminal and run the script?

Sorry if I explained it poorly because its a confusing situation. Thanks.

Sednus
  • 2,095
  • 1
  • 18
  • 35
Daniyal
  • 17
  • 1
  • 4

2 Answers2

0

First, go to the KDE Startup and Shutdown options under System Settings. Then add this command as a new startup script:

konsole -e bash nameofyourscript.sh 
Linuxios
  • 34,849
  • 13
  • 91
  • 116
  • sorry, can you plz explain the "KDE Startup and Shutdown options under System Settings" part, are you talking about the rc.d folders or ? thanks – Daniyal Sep 13 '12 at 13:58
  • @Daniyal: no, it's not rc.d. Go into the system settings app, and under the category startupt and shutdown, you'll find it. – Linuxios Sep 13 '12 at 21:48
  • thanks for the advice, since I'm using openSuse I don't think I have the "KDE Startup and Shutdown options", it uses gnome and I wonder if there is anything equivalent on gnome? Thanks! – Daniyal Sep 14 '12 at 07:38
  • Sorry for not checking properly before I comment, I found the autostart settings. First I used "gnome-terminal -e..." and it did start up a new terminal after the boot, but it didn't work, then I tried just putting "/mySTAFStartScript" at the command tab and guess what, it worked a treat!! Thank you very much for your help and I hope you have a nice day! :) – Daniyal Sep 14 '12 at 09:03
0

I believe the screen utility can do what you describe. Instead of running STAF on startup, you would run screen STAF. To open that terminal, you would run screen -ls to get the screen ID, and screen -r ... to open it.

(Disclaimer: I have not tried this.)

ruakh
  • 175,680
  • 26
  • 273
  • 307