Nice Red Hat tip - make Firebird the GLOBAL default browser

User Help for Mozilla Firefox
Post Reply
Guest
Guest

Nice Red Hat tip - make Firebird the GLOBAL default browser

Post by Guest »

If you're tired of Firebird asking you which profile you want to use when you click a web link, read on..

Red Hat 8 and 9 ship with something called htmlview. It allows you to run "htmlview" from the console, or anywhere else, and for the default browser to be run.
You can configure the default browser for all users by editing /etc/htmlview.conf, or for an individual user by editing ~/.htmlviewrc

To use, you need to change the following:
1. If you have a desktop or panel icon, change the command that is run to "htmlview %u"
2. Under Red Hat> Preferences> Preferred Applications, change the web browser to "htmlview %s"

I use FireBird as default for all users, so I edit /etc/htmlview.conf, here are the contents:
X11BROWSER=/usr/local/bin/htmlview-cheat

I then create a file named /usr/local/bin/htmlview-cheat, with the following contents:
/usr/local/MozillaFirebird-0.7/MozillaFirebird -remote "openurl($1, new-tab)"

Make it executable:
chmod +x /usr/local/bin/htmlview-cheat

Now whenever you click a link in Ximian Evolution, or just about anywhere, Firebird will run - creating a new tab, and not asking you which profile you want to use. :)
Guest
Guest

Post by Guest »

htmlview-cheat needs to contain the following to make it work when fb is not open:

FB="/usr/local/MozillaFirebird-0.7/MozillaFirebird"
URL="$@"

$FB -remote "ping()"

if [ $? = 0 ] ; then
$FB -remote "openurl($URL, new-tab)"
else
$FB "$URL"
fi
Guest
Guest

Post by Guest »

ping() is slow. You could use pgrep instead.
Guest
Guest

Post by Guest »

Use the following in /usr/local/bin/htmlview-cheat

FB="/usr/local/MozillaFirebird-0.7/MozillaFirebird"
URL="$@"

$FB -remote 'openURL('$URL', new-tab)' || $FB $URL &
Post Reply