Revised script that provides the required functionality until a proper fix is supplied.
Basically logs where firefox is running and will remotely kill ff allowing it to be restarted locally (and ff recovers the session). Requires kde / ssh keys to be setup to work.
#!/bin/sh
HN=`hostname`
echo hostname set to $HN
if test -e ~/.mozilla/firefox/lock_host ; then
LM=`cat ~/.mozilla/firefox/lock_host`
echo Firefox has taken a lock out on the following machine:
cat ~/.mozilla/firefox/lock_host
if [ "$LM" = "$HN" ] ; then echo Running a repeat firefox /usr/bin/firefox exit
else #ANS=`kdialog --yesno "Firefox is locked on machine $LM \n Do you wish me to try to kill it?"` kdialog --yesno "Firefox is locked on machine $LM \n Do you wish me to try to kill it?" #ANS=$? #cho "Debug, ANS=$ANS"
if [ $? = 0 ]; then
#if test yes = $ANS ; then echo "Trying to kill the remote firefox" #RES=`ssh -o "StrictHostKeyChecking no" $LM "killall -regexp firefox"` echo "No result" > /tmp/.netfoxsshres ssh -o "StrictHostKeyChecking no" $LM "killall -regexp firefox" 2> /tmp/.netfoxsshres RES=`cat /tmp/.netfoxsshres` rm -f /tmp/.netfoxsshres kdialog --msgbox "Result was $RES, now try again"
else exit fi exit
fi
fi
echo No lock_host detected
echo Making lock_host
touch ~/.mozilla/firefox/lock_host
echo $HN >> ~/.mozilla/firefox/lock_host
date >> ~/.mozilla/firefox/lock_host.log
echo $HN >> ~/.mozilla/firefox/lock_host.log
#uname -n > ~/.mozilla/firefox/lock_host
Revised script that provides the required functionality until a proper fix is supplied.
Basically logs where firefox is running and will remotely kill ff allowing it to be restarted locally (and ff recovers the session). Requires kde / ssh keys to be setup to work.
#!/bin/sh
HN=`hostname`
echo hostname set to $HN firefox/ lock_host ; then firefox/ lock_host` firefox/ lock_host
echo Running a repeat firefox
/usr/ bin/firefox
exit
#ANS= `kdialog --yesno "Firefox is locked on machine $LM \n Do you wish me to try to kill it?"`
kdialog --yesno "Firefox is locked on machine $LM \n Do you wish me to try to kill it?"
#ANS= $?
#cho "Debug, ANS=$ANS"
echo "Trying to kill the remote firefox"
#RES= `ssh -o "StrictHostKeyC hecking no" $LM "killall -regexp firefox"`
echo "No result" > /tmp/.netfoxsshres
ssh -o "StrictHostKeyC hecking no" $LM "killall -regexp firefox" 2> /tmp/.netfoxsshres
RES= `cat /tmp/.netfoxsshres`
rm -f /tmp/.netfoxsshres
kdialog --msgbox "Result was $RES, now try again"
if test -e ~/.mozilla/
LM=`cat ~/.mozilla/
echo Firefox has taken a lock out on the following machine:
cat ~/.mozilla/
if [ "$LM" = "$HN" ] ; then
else
if [ $? = 0 ]; then
#if test yes = $ANS ; then
fi
fi
echo No lock_host detected firefox/ lock_host firefox/ lock_host firefox/ lock_host. log firefox/ lock_host. log firefox/ lock_host
echo Making lock_host
touch ~/.mozilla/
echo $HN >> ~/.mozilla/
date >> ~/.mozilla/
echo $HN >> ~/.mozilla/
#uname -n > ~/.mozilla/
echo Running firefox firefox/ lock_host firefox/ lock_host. log
/usr/bin/firefox $1 $2 $3 $4 $5
echo Removing lock_host
rm -f ~/.mozilla/
date >> ~/.mozilla/