Shell script: Open program when closed?
Okay, here's the deal: I'm wanting to write a shell script that will act daemon-ish, and that I can set to run at login on a per-user basis.
The pseudo-code for what I am trying to accomplish would probably be something like: Code:
(_beginning_) Note: This is for an experimental kiosk-type environment. |
Hi.
You'd probably be better just using a while loop, e.g. Code:
#!/bin/bash Dave |
Quote:
while true; do firefox; done The user could of course switch focus to the terminal where the shell is running and Ctrl-C out of the loop. Maybe slightly better would be logging in on a vt and using xinit to run only firefox and nothing else in an X session. But why reinvent the wheel? There are packages like pessalus (not sure of spelling) that are made for this purpose and have already taken security into consideration. |
Solution found!
Thank you both so much.
I discovered that Firefox is set to automatically start when the X server starts. When Firefox is closed, it shuts down the X server. So, here's what I added to the "~/.profile" file: Code:
while true Thanks again, computer_freak_8 |
All times are GMT -5. The time now is 07:18 AM. |