Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Keep an app running, Want to keep an app running< Next Oldest | Next Newest >
rylz Offline





Group: Members
Posts: 6
Joined: Feb. 2007
Posted: Feb. 12 2007,16:16 QUOTE

I've seen it done before, but I want to know:

How do I keep an app running?  Mainly, I want a way to keep a program up at all times, even if a user closes it.  Here's the situation I'm setting up... I want to use DSL on some small clients in our training room.  I have it setup so, upon login, Firefox pops up and goes to our Citrix page.  I want to make it so that, if a user closes Firefox, that it will open itself back up.  

Or, if someone knows some tricks with Firefox to make it open without the Min/Max/Close buttons, that'd be great, too.  My assumption is that users in the training room will not know what to do in DSL.  Shoot, they hardly know how to use M$ Windows.   :;):

Any help would be appreciated!
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Feb. 12 2007,16:46 QUOTE

Probably the simplest and messiest would be:

while true
do
pidof firefox-bin || firefox
sleep 2
done

This doesn't account for Firefox crashes where firefox-bin stays loaded. That seems to be a fairly common event.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
rylz Offline





Group: Members
Posts: 6
Joined: Feb. 2007
Posted: Feb. 12 2007,17:24 QUOTE

OK, I slapped that in .xinitrc and it does what I want to do.  But...

I cannot type!  Why would the KB be disabled, that doesn't make sense?  Here's my current .xinitrc layout (right above "case $DESKTOP):

Code Sample
...
#dillo /usr/share/doc/dsl/getting_started.html &>/dev/null &
torsmo 2>/dev/null &

while true
do
pidof firefox-bix || firefox
sleep 2
done

case $DESKTOP in
  fluxbox )
...


I tried putting your code down below the case instance (right after "esac"), but it didn't load at all.  Do I need to incorporate it somehow (help would be needed) into the case code?
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Feb. 12 2007,19:48 QUOTE

I think there's an issue with running Firefox without a window manager. There was a thread several month ago about this applied to a browser kiosk, but i don't remember if a solution was found.

What I would do if I were to use that particular code is put it in a separate script and run the script from xinitrc:
sh /path/to/script &
This would need to be put _above_ the case, so it lets .xinitrc continue on to load the window manager.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
rylz Offline





Group: Members
Posts: 6
Joined: Feb. 2007
Posted: Feb. 12 2007,20:54 QUOTE

Quote (mikshaw @ Feb. 12 2007,14:48)
I think there's an issue with running Firefox without a window manager. There was a thread several month ago about this applied to a browser kiosk, but i don't remember if a solution was found.

What I would do if I were to use that particular code is put it in a separate script and run the script from xinitrc:
sh /path/to/script &
This would need to be put _above_ the case, so it lets .xinitrc continue on to load the window manager.

Sweet, that worked like a charm!  Thanks much for the help.
Back to top
Profile PM 
4 replies since Feb. 12 2007,16:16 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Keep an app running

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code