openwith icon indicating copy to clipboard operation
openwith copied to clipboard

Add URL to Firefox's history

Open knoajp opened this issue 8 years ago • 1 comments

I want to open URLs with another browser, but also change the link color as visited on Firefox.

knoajp avatar Sep 24 '17 23:09 knoajp

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:

  1. Right click, choose Open With command entry. The URL is opened in the other application, and a new tab appears in Firefox
  2. 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.

yjfguhd avatar Dec 06 '20 12:12 yjfguhd