20

I often have more than ten windows open at the same time and some of them are of the same applications, notably gnome-terminal.

Often when I am currently on one terminal, I just want to get to another terminal. With Alt-Tab you have to choose from windows of all the applications, which is a pain. Even with Gnome3 which groups windows by applications and gives preview of windows with Alt-` it isn't enough because it's hard to distinguish terminal windows from previews. You can only tell which terminal does what when the full view is shown in most cases.

So is there an application/windowing system/gnome shortcut that shows you only other windows of the same application when you are switching?

2
  • 1
    I came looking for this question because I use Mac OSX at work, and it has Alt+` (backtick) to do this built-in. I'd love to see that come to Ubuntu. Feb 26, 2011 at 0:17
  • 1
    Ubuntu now includes the Alt + ` shortcut - the accepted answer is out of date. See second answer. Apr 24, 2020 at 19:11

5 Answers 5

19

This is old question, but I had the same problem and found Alt + ` switches the windows of the same application. Thus, sharing the same for reference.

10

If you install the CompizConfig Settings Manager then you can access and change the Compiz settings that can do this. Once installed launch it via System->Preferences.

If you normally use Alt+Tab then go the "Static Application Switcher". (This plugin shows quite small previews.)

If you normally use Windows/Super+Tab then go to "Shift Switcher Plugin". (This plugin shows quite large previews.)

In the settings for either of the plugins you can set the keyboard (or mouse) shortcut for Next Window (Group) and/or Previous Window (Group).

Screenshot of setting Next Windows Compiz setting to Super+g

(Note: as well as the Static Application Switcher and Shift Switcher you may wish to experiment with the Application Switcher and Ring Switcher)

1
  • This answer is out of date and should include the Alt + ` shortcut. Apr 24, 2020 at 19:09
1

I thought I would add to fluteflute's splendid answer how to do this if you are running Metacity instead of Compiz. Unfortunately this cannot be changed through GNOME Preferences, but has to be changed using gconf-editor or gconftool.

After running gconf-editor, find and change /apps/metacity/global_keybindings/switch_group to the key that you want to use to switch between windows of the same application group.

This can be done on the command line with gconftool. For example:

gconftool -s /apps/metacity/global_keybindings/switch_group -t string "<Mod4>Tab"

(<Mod4> is the Windows key.)

1

You write notably gnome-terminal, which leads me to believe you are unaware of the terminal multiplexers? Then you're in for a treat!

A multiplexer sits like a layer between you and the terminal, making it possible to have multiple separate terminal sessions in a single terminal window. You can also easily have several windows within the same multiplexer session.

Another nice feature with these is that you can detach them from your terminal session, leaving them running in the background. Perfect when you want to start a long-running job, truly move it to the background and then be able to pull it back out later on.

The previous champ was GNU Screen but it is being replaced by tmux, which is my personal favorite. If you try tmux then be sure to also check out teamocil.

Happy CLI'ing!

0

Be careful: Some settings may break an application, so be careful and make sure you know what you're doing. In our case just follow below steps but be careful with dconf editor for any other changes.

If you're looking to cycle windows of the same application on mouse click then do this

  1. Install dconf editor (Open Ubuntu Software application and search for dconf Editor)
  2. Open dconf editor when installed and search this /org/gnome/shell/extensions/dash-to-dock/click-action
  3. Disable the Use default value option and select a custom value of cycle-windows
  4. Apply your changes

Refer to this SO answer if you don't want to install dconf editor & still achieve the above.

You must log in to answer this question.

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