openwith
openwith copied to clipboard
Add URL to Firefox's history
I want to open URLs with another browser, but also change the link color as visited on Firefox.
I have worked around this by calling a script that both opens the URL in a separate application, and in a new tab in Firefox. As soon as the URL is resolved in the new tab, I close it manually. It's clunky, but I couldn't find a way to add a URL to Firefox's history for a site that wasn't already loaded.
#!/bin/sh
url=$1
[ -z "$url" ] && { echo >&2 "Usage: ${0##*/} <URL>"; exit 2; }
firefox --new-tab "$url" &
exec someotherapplication "$url"
The process is:
- Right click, choose Open With command entry. The URL is opened in the other application, and a new tab appears in Firefox
- As soon as the URL resolves, ctrl-w to close the tab
I've told my window manager to not change focus when doing this, so I don't have to alt-tab back to Firefox in order to close the new tab.
One gotcha with this is that if you close the new tab too early, the URL doesn't get added to the history.