12

If "https://mail.google.com" is already open a tab, it it possible to have a browser switch to that tab if I try opening "https://mail.google.com" in a different tab?

What if I try opening the new address via cli (eg, google-chrome https://mail.google.com)? Can I get it to switch to already open tab?

Do any of the major browsers (Firefox, Chrome, Chromium, etc) have this feature?

1
  • 2
    This is not exactly ubuntu specific, it would be better to ask thsi on superuser.com
    – RolandiXor
    Apr 16, 2011 at 2:55

2 Answers 2

14

This is a feature of Firefox 4. If you start typing an already opened address, the drop-down menu will suggest switching to the already active tab pointing to that address.

There is an add-on for Firefox that will give you total keyboard control over the browser called "Pentadactyl" (here). While not required, you'll probably enjoy it more if you already know vi keybindings.

So in fact, there is a way to change tabs with a "terminal" (ok, not really a terminal). But Pentadactyl supports the following commands:

:tabnext
:tabprevious
:tablast

and several others.

3
  • 1
    Neat! Do you know if there is any way to switch to a tab by executing a command from a terminal?
    – sutre
    Apr 16, 2011 at 2:14
  • @sutre no there is not. FireFox 4 is not controlled from the terminal.
    – Thomas Ward
    Jul 12, 2011 at 12:54
  • 4
    Sadly, firefox is one of these weird browsers you control with a mouse, and not from terminal. Jul 12, 2011 at 16:25
7

This can be done in Google Chrome by entering about:flags in the omnibox and scrolling to the very last item, "Focus existing tab on open". Click "Enable" and restart Chrome.

Note: this feature is not documented for a reason. On the about:flags page it states:

"These experimental features may change, break, or disappear at any time. We make absolutely no guarantees about what may happen if you turn one of these experiments on, and your browser may even spontaneously combust."

In other words, you modify these settings at your own risk.

1
  • Seems like this option was removed.
    – Socowi
    Mar 29, 2022 at 15:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .