<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>In my situation I haven't used Jarod's power
button script yet, or even created it.</FONT></DIV>
<DIV><FONT face=Arial size=2>I'm just using myth-load.sh in section 14 of the
guide.</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=lunchtimelarry@gmail.com href="mailto:lunchtimelarry@gmail.com">Larry
K</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=mythtv-users@mythtv.org
href="mailto:mythtv-users@mythtv.org">Discussion about mythtv</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, April 19, 2005 3:18
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [SPAM?] --> Subject: Re:
[mythtv-users] Re: VNC launches second mythfrontend</DIV>
<DIV><BR></DIV>Jarod's "power button" script looks like
this:<BR><BR>#!/bin/bash<BR>PROG=mythfrontend<BR>STATUS=`ps -e | grep $PROG |
grep -v grep | wc -l | awk '{print $1}'`<BR><BR>if [ $STATUS -eq 0
]<BR>then<BR> ( $PROG &
)<BR>else<BR> killall $PROG<BR>fi<BR>exit
0<BR><BR>Interestingly, I discovered that I could cause 2 instances of
mythfrontend, even though it checks for a running instance before it starts
another one. I could do a ps -ef | grep frontend and see nothing
running, then hit the power button on my remote, and then see 2 instance
running. <BR><BR>Does this make sense given that the script is checking
for a runnning instance? <BR><BR>
<DIV><SPAN class=gmail_quote>On 4/19/05, <B class=gmail_sendername>Allan
Risk</B> <<A href="mailto:arisk@hamster.foxhollow.ca">
arisk@hamster.foxhollow.ca</A>> wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><BR>>>>Here's
my theory. If anyone has suggestions on how to avoid this it
<BR>>>>would<BR>>>>be most
welcome.<BR>>>><BR>>>>I use Jarod's
~/.kde/Autostart/myth-load.sh, which among other
things<BR>>>>starts<BR>>>>mythfrontend.<BR>>>>Since
vnc starts a new KDE session, I think this gets run again for the
<BR>>>>vnc<BR>>>>session and therefore mythfrontend starts
a second time.<BR>>>><BR>>>>I would think this would be
common as I suspect many people use
both<BR>>>>Jarod's<BR>>>>script and vnc. <BR>><BR>>
add the following into your myth-load.sh file:<BR>><BR>> ---<BR>>
MYTH="`ps ax | grep mythfrontend | grep -v grep`"<BR>><BR>> if [ !
"$MYTH" ]<BR>> then<BR>> # place all stuff you want to run
with mythfrontend here <BR>>
/path/to/bin/mythfrontend<BR>> fi<BR>> ---<BR>><BR>> that checks
for a running mythfrontend process and only executes the code<BR>> inside
the if/then if there isn't already a mythfrontend process running <BR>>
...<BR>><BR>> -g-<BR><BR>I tried this method first as I thought this
was a nicer way to deal with it.<BR><BR>It worked, but backwards.<BR>It
appears that as the vncservice starts the first mythfrontend.<BR>Then when
the desired mythfrontend should get started it can't because the<BR>script
sees it as already running.<BR><BR>It is nice to see I'm not alone on this
though.<BR>I prefer to keep the vnc service on.<BR>I'll look into the other
solution about the windows manager. I'll have to <BR>do more
reading about that and educate
myself.<BR><BR>_______________________________________________<BR>mythtv-users
mailing list<BR><A
href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</A><BR><A
href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</A><BR></BLOCKQUOTE></DIV><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>mythtv-users mailing
list<BR>mythtv-users@mythtv.org<BR>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users<BR></BLOCKQUOTE></BODY></HTML>