290

I have a dual monitor setup, and I am using Ubuntu 12.04 LTS I have changed the positioning of the monitors several times, and now for some reason some of the windows open up off-screen (outside of both screens), Update Manager, for instance. How can I position the windows on one of my screens?

ti7
  • 16,375
  • 6
  • 40
  • 68
Mladen Danic
  • 3,600
  • 2
  • 25
  • 24

3 Answers3

541

You can get the window back on your screen by using

ALT + spacebar

This would show you the maximize/minimize/ ... options. Click maximize and it would occupy your screen.

You can also hit "move" and then either your mouse or arrow keys to move the window to your current window.

Blairg23
  • 11,334
  • 6
  • 72
  • 72
ibaralf
  • 12,218
  • 5
  • 47
  • 69
  • 41
    instead of maximize you can use `move` and then move it with the mouse ;) – A. Binzxxxxxx Jun 29 '15 at 08:01
  • ubuntu updater offscreen and alt-space only shows "always on top" (wonder if this is some messing of dual monitors) – neu-rah Nov 19 '15 at 09:26
  • 2
    You can also maximize and then drag into your screen. – Goose Aug 11 '16 at 15:27
  • 16
    Quicker way I found after fighting with off-screen widnows (for Ubuntu 16.04): go to Appearance, Behavior, and then check / uncheck Enable workspaces. All windows magically appear! – Roman Susi Nov 08 '16 at 15:16
  • 2
    this is a weird bug. I once moved my window out of the monitor with this option and than any window opened up on the exact last position of that window. Using this shortcut helped me to fix this issue so windows would open up on-screen again. – joaoal May 11 '17 at 15:05
  • 2
    **Alt + Right mouse button** works for me instead of spacebar – floppydisk Sep 20 '17 at 09:33
  • 4
    This answer prevented me having a nervous breakdown. Thanks. – trollkotze Oct 08 '17 at 01:09
  • This made my day too. I have a 4K monitor that is acting up, occasionally it fails to wake up from sleep mode unless I switch to a lower resolution and back. But when I do this I lose windows off-screen. – teukkam Dec 28 '17 at 06:19
  • To activate Move function when window is off screen, highlight window in taskbar, hit **Alt-Space**, then hit the **m** key. Now your window can be moved on-screen with mouse or arrows. Thanks to: http://blog.vogella.com/2013/06/02/ubuntu-how-to-move-an-application-which-is-displayed-offscreen/ – schulwitz Dec 31 '17 at 05:33
  • 18.04 still has this bug – 18446744073709551615 Nov 19 '19 at 23:01
  • In my case, I cannot move the popup window because the top bar was unreachable and the resizable was done on the bottom. Luckily I have two screen and sending it to the other screen fix the issue. Voila! – Martin P. Sep 24 '21 at 14:15
  • 2
    Nope, ALT-space doesn't seem to do anything on 20.04. – SusanW Dec 03 '21 at 11:37
189

Be sure to have the off-screen window selected (use Alt-Tab or Super-W for example). Then hold Alt+F7 and move the window with the cursor keys until it appears in the viewport.

When this happens to me the hidden window is usually below the screen (I occasionally use two screens with one on top of the other, a setup that agrees well with a laptop on a desk). If you use Super-W to select the window, you can guess where it is by looking at the animations. Holding Alt+F7+Up brings the window into view for me.

starball
  • 20,030
  • 7
  • 43
  • 238
Georg Jung
  • 1,991
  • 1
  • 11
  • 4
  • 4
    Actually, even nice in as much as you don't even have to deal with a menu :) – GreenAsJade Apr 15 '14 at 04:57
  • One of the menus for the Ubuntu upgrade menu to Xenial Xerus (why can't they use words I can remember / spell?) is too tall for my screen, and resize is disabled. This let me move the menu up and off the screen (normal methods didn't work) so that I could click "upgrade". – geneorama Jul 30 '16 at 19:51
  • 7
    You don't need to hold Alt+F7, just press it. And you can move it not only with you cursor keys, but also with a mouse :) – Tutankhamen May 24 '17 at 17:54
  • on ubuntu 18, the popup can never be focus if its a file opener / picker – James Tan May 29 '18 at 17:29
  • @JamesTan, wouldn't you be able to focus the window that sparked the opener/picker? Moving that into focus should do the trick? Unfortunately, I can't test it ritght now... – Georg Jung Jun 07 '18 at 11:07
  • hi @GeorgJung , it is focused, but it is totally off screen. i tried short cut keyboard to move the window, but it does not work. – James Tan Jun 08 '18 at 18:11
  • Hi @JamesTan, Ubuntu 18 has dumped Unity and switched to Gnome. I never had the problem with Gnome so far... what is your setup? – Georg Jung Jun 09 '18 at 21:57
  • Hi @GeorgJung fresh install of 18.04, only chrome have this problem – James Tan Jun 20 '18 at 16:39
  • works on ubuntu 18 with unity desktop, unlike the accepted answer – rehctawrats Oct 25 '18 at 11:15
  • This doesn't seem to work on applications that don't play nice with the window manager, like steam. 18.04 kde plasma – Douglas Gaskell Nov 24 '18 at 09:39
11

I made a little script to fix a similiar bug I have in ubuntu 15.04 with two screens: https://github.com/mezga0153/offscreen-window-restore

The script makes use of the wmctrl command line tool to find the offscreen windows and then uses wmctrl to place each one back into a visible area.

Maks
  • 7,562
  • 6
  • 43
  • 65
Tine Mezgec
  • 137
  • 2
  • 6
  • 3
    Avoid posting link-only answers; please edit the post and include the code – ItalyPaleAle May 25 '15 at 19:50
  • great job with the script, works well with 16.04 as well and *much* better than having to fix all the windows one-by-one manually using the shortcut keys. – Maks Jul 04 '16 at 03:41
  • Under 17.04, it caused my machine to reboot. – Dan Hook Oct 04 '17 at 18:14
  • It did move window back to viewing area but It closed my other open windows as well. – Sannu Jan 31 '18 at 14:36
  • **Not working on 2018.04!** Instead of moving off-window objects into the monitor, it enlarged one desktop to the size of both monitors, crashed unity, forcefully logged me out, closing all my programs in the process (including an unsaved inkscape drawing I couldn't save because it was off-screen) and after logging in, left me with a broken session requiring a reboot to fix. – Mark Jeronimus Oct 09 '20 at 19:31