firefox - Is there a command to either open a website or focus an open browser tab? - Ask Ubuntu


i'd love able run command such firefox mail.google.com , have it:

  1. open site in new browser tab if isn't open (what calling firefox default)
  2. focus tab domain if active in browser tab

is possible? didn't find in firefox command line options.

yes it's possible run command in terminal. may, in cases, have specify http:// protocol.

you can with:

$ firefox http://mail.google.com 

by way, command might not go directly in mail program. credential have saved in browser. since firefox isn't default browser, in case using:

$ google.com http://mail.google.com 

that described me since called site browser use.

an alternate command correct browser is:

$ xdg-open http://mail.google.com 

update:

this commandline focus current tab or create new 1 if gmail isn't open (the first dollar sign $ command prompt. command after command prompt).

$ [[ $(wmctrl -l|egrep "@gmail.*firefox") ]]&&wmctrl -a $(wmctrl -l|egrep "@gmail.*firefox"|awk '{print $7}')||firefox http://mail.google.com 

rather trying type or paste long commandline, can make bash script called firefoxmail:

#!/bin/bash  [[ $(wmctrl -l|egrep "@gmail.*firefox") ]]&&wmctrl -a $(wmctrl -l|egrep "@gmail.*firefox"|awk '{print $7}')||firefox http://mail.google.com 

then call firefoxmail .sh extension optional since have shebang @ top , have exec bit set.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User