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:
- open site in new browser tab if isn't open (what calling firefox default)
- 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
Post a Comment