I use several different browsers, and I don't have a lot of memory, so I try to only have one open at a time. I wanted web pages to open in whatever browser was open at the time, so I created a shell script and set it as the default browser. It checks to see if any other browsers are running, and if not, it opens the page in Swiftfox (an optimized version of Firefox). This worked for quite a while, but recently it stopped working. Now it opens URLs in Swiftfox regardless of what else is running, and I can't figure out why. As far as I can tell none of the process names have changed, and I haven't edited the script. I'm not very experienced with scripting, so I'd really appreciate any help or insight. Thanks!
The script:
Code:
#! /bin/bash
if pidof swiftfox-bin
then swiftfox $*
else if pidof firefox
then firefox $*
else if pidof google-chrome
then google-chrome $*
else if pidof opera
then opera $*
else swiftfox $*
fi
fi
fi
fi
Bookmarks