0
votes
1answer
40 views

Script: Running a second process when the firts ended

I am trying to make a script that consist in a two parts. the first one is to run a initial state and the second one is to equilibrating the system. The problem is that the second is dependent of the ...
4
votes
4answers
438 views

Check for Process if Same is Running

Is there a script or a way in linux that when I try to execute a shell script/process, if the same is running, it will prompt that same is running and will exit otherwise it will continue.
1
vote
2answers
96 views

Is it possible to control xterm (or specifically a process that xterm has started) from another process?

If I start a process with xterm like this (where omxplayer is the process xterm is starting): xterm -fullscreen -fg black -bg black -e omxplayer -o hdmi -r %f Is it possible for me to write to ...
1
vote
0answers
160 views

gnome-terminal cmd leaving processes open after closing parent window

The following simple command should demonstrate my issue: gnome-terminal --tab -t "Tab 1" -e "/bin/bash" --tab -t "Tab 2" -e "/bin/bash" This should open a new window with two tabs and an active ...
3
votes
3answers
177 views

“Virtual” shell, ie. jailing an user inside a process

The title might not say much about the issue at hand so let me get straight to the point. Let's assume I have a casual user who can log in to the system via SSH into a bash shell. I also have a PHP ...
2
votes
2answers
247 views

Quick and dirty way to run a process more than once

I am looking for very simple bash script that would allow me to launch a process a few times. What's essential to me is that after the processes terminate, everything will clean up automatically. ...
2
votes
2answers
319 views

add “check if fetchmail is running” to this script

while ! postqueue -p | grep -q empty; do sleep 1 done killall wvdial this script checks if my mail queue is empty, then disconnects my modem. now i would like to add also a checking to fetchmail ...
2
votes
1answer
107 views

Start and stop multiple executable for easy debugging

I'm debugging a networking project, which involves interacting of 3 programs, ie a server, two different clients. However I find it difficult to start and stop them for debugging. Some methods I have ...
2
votes
3answers
1k views

How can I test if a program is running from within a script

Let's assume that another user started a bunzip process, and I have a script that I'd like to start running after that bunzip finishes. What's the best way to check from inside my script that the ...
4
votes
2answers
433 views

retrieving names of all open pdf files (in evince or otherwise)

I constantly have many PDF files open. These are usually downloaded using chrome and immediately opened using evince. I sometimes want to persist the state of all my open PDF files, so I could ...