ChatGPT解决这个技术问题 Extra ChatGPT

Window appears off screen on ubuntu [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions about general computing hardware and software on Stack Overflow. You can edit the question so it’s on-topic for Stack Overflow. Closed 6 years ago. Improve this question

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?

Still a problem with 14.04
Mine is easier: Alt + Spacebar And then use left or right arrow to move them back :))
Still happens with Ubuntu 16.04.
Please DO NOT vote to delete this question. It's way too useful to be deleted. I know it's off-topic but there's no harm in keeping it here closed.
This would be very on-topic on askubuntu. Surprised I found it here instead of there.

B
Blairg23

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.


instead of maximize you can use move and then move it with the mouse ;)
You can also maximize and then drag into your screen.
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!
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.
This answer prevented me having a nervous breakdown. Thanks.
G
Georg Jung

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.

Cheers.


Actually, even nice in as much as you don't even have to deal with a menu :)
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".
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 :)
on ubuntu 18, the popup can never be focus if its a file opener / picker
@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...
M
Maks

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.


Avoid posting link-only answers; please edit the post and include the code
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.
Under 17.04, it caused my machine to reboot.
It did move window back to viewing area but It closed my other open windows as well.
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.