How to start an app by a terminal and to keep it running, when closing the terminal?
Ralf Mardorf
ralf.mardorf at alice-dsl.net
Wed May 21 11:29:38 UTC 2014
On Wed, 2014-05-21 at 03:36 +0000, staticsafe wrote:
> screen/tmux is probably the most reliable soloution to this particular
> problem.
Before I posted my request I already read about screen and tmux, but I
didn't read detailed and perhaps got a wrong impression.
On Wed, 2014-05-21 at 14:49 +1200, Richard Hector wrote:
> PS what makes this OT?
It's my attitude regarding to this issue. It's not important for me, I
just want to learn a little bit, without taking a hard learning curve.
It's about writing scripts for an unimportant task.
It's about writing scripts in a freakish style, similar to spaghetti
code.
I feel free to send a request to Debian user about script writing,
assumed I've got a serious question, for an important task and I'm
willing to take a hard learning curve.
Thank you all for your suggestions, I will continue at the weekend.
Btw., yes, the grep thingy is finding the ps result.
Terminal 1:
$ evowrap --force-shutdown
Launch: evolution --force-shutdown
Cancel? [c]
Terminal 2:
$ while ps aux | grep "evowrap --force-shutdown" | grep -v grep ; do sleep 1 ; done; echo ";)"
rocketm+ 2639 0.0 0.0 15772 1660 pts/0 S+ 13:22 0:00 /bin/sh /usr/local/bin/evowrap --force-shutdown
rocketm+ 2639 0.0 0.0 15772 1660 pts/0 S+ 13:22 0:00 /bin/sh /usr/local/bin/evowrap --force-shutdown
rocketm+ 2639 0.0 0.0 15772 1660 pts/0 S+ 13:22 0:00 /bin/sh /usr/local/bin/evowrap --force-shutdown
rocketm+ 2639 0.0 0.0 15772 1660 pts/0 S+ 13:22 0:00 /bin/sh /usr/local/bin/evowrap --force-shutdown
rocketm+ 2639 0.0 0.0 15772 1660 pts/0 S+ 13:22 0:00 /bin/sh /usr/local/bin/evowrap --force-shutdown
rocketm+ 2639 0.0 0.0 15772 1660 pts/0 S+ 13:22 0:00 /bin/sh /usr/local/bin/evowrap --force-shutdown
rocketm+ 2639 0.0 0.0 15772 1660 pts/0 S+ 13:22 0:00 /bin/sh /usr/local/bin/evowrap --force-shutdown
rocketm+ 2639 0.0 0.0 15772 1660 pts/0 S+ 13:22 0:00 /bin/sh /usr/local/bin/evowrap --force-shutdown
;)
The ";)" appears after ...
Terminal 1:
$ evowrap --force-shutdown
Launch: evolution --force-shutdown
Cancel? [c] c
$
... I entered "c"ancel. Without finishing the script running in terminal
emulation 1, I only get the output of the while-grep-loop. To get the
output of echo, I need to terminate the script running in terminal
emulation 1.
Regards,
Ralf
More information about the D-community-offtopic
mailing list