Short Tip: Move an X window in Linux with the Alt key

Usually an X window is moved under Linux via a click on the tile bar (and a following drag&drop). However, sometimes there are over-sized configuration dialogs or some strange behaviours of windows which move the title bar out of the screen. At that moment the window cannot be moved anymore via the window bar because it is not reachable.

But there is an easy way in Linux (and I wish Windows would have the same!) to move X windows regardless of the window title bar: by pressing and holding the Alt key any window can be moved with the left mouse button. This works under KDE as well as under Gnome.

Everyone who used Linux for a longer time knows that simple shortcut – but maybe there are some new users who don’t know it, and this post is for them.


21 thoughts on “Short Tip: Move an X window in Linux with the Alt key”

  1. Hey Roland,

    if you want, I can send you an invitation for HowFlow, an upcoming open source tricks, tips and howto social bookmarking site, where you can submit those tricks.



  2. Hehe. I remember a friend who was using Linux for a few months. Then one day booted Windows to play a game. First thing that got him in panic was… well, seeing Windoze on his computer 😛 Second was “AHH! No Alt-dragging windows!!! >_<“

  3. another one very handy is alt and right mouse button on the window to resize it. you have to position the mouse near one of the edges to resize horizontally or vertically or in the corners for both.
    KDE only

  4. Another less known way is y using the pager. My friends using Linux KDE for years were surprised when i showed them that it was possible to move windows by moving the little windows that appear in the desktop pager.

  5. When you click Maximize button with right click, it get max size on horisontal size. When you click it with middlebutton (wheel), it gets full size on vertical size. 😉

    The desktop pager is one nice feature what I have used long time, it makes easy to move windows when not using alt+drag, what really is must-have -feature for windows (+ resize function with right click!) 😉

  6. @Reynaldo: No, not KDE only. Metacity/Compiz use the middle mousebutton (afair only them), icewm, fluxbox, … have the behaviour like the most WMs

  7. I’m some new user and I didn’t know this. That’s OK because it doesn’t work for me. I press and hold ALT and the left mousebutton but the window only moves when I hit the titlebar.
    Or aren’t ordinary KDE (3.5.9) apps like Akregator and Konqueror not X windows?

  8. My 2 cents:
    Ctrl + Alt + Esc → Starts Xkill
    Ctrl + Esc → Starts process table (KDE only)
    Middle mousebutton on the desktop → Opens a really useful menu to rearrange windows (KDE only)

  9. Thanks!!

    It’s better that the power off/power on button that I’ve been using for the last 13 years or so.

  10. Dude, I could kiss you. (I won’t though).
    I’ve been using Linux for… gosh, 5 or 6 years now, and I did not know that trick.
    I have needed it a thousand times though. Many thanks.

  11. You have a plenty of other useful features if you go in the KWin configuration window – it’s worth looking around. One more thing: you can bind these actions to the rarely used META key (usually Windows key) instead of Alt – finally we can use it for more things than Windows. 🙂

  12. Andreas, you can send me an invitation if you want, however I cannot promise I will have the time to submit things on my own.

    Reynaldo, I didn’t knew that… wow, every day I learn something new!

    Fri13, that was new to me as well…

    Caesar, if it does not work there is a bug, it should work with every window. If you press Alt and hold it, and then press the left mouse button and hold it (so holding both), your mouse cursor should change the shape. If that does not happen, please fill a bug report at the bugzilla of your distribution.

    Rooster, you’re welcome, it is always a pleasure to help 😉

    Grósz, the META key doesn’t work for me half of the time, and I have no idea why… but that’s something I will figure out after my switch to the next KDE version (still 3.5.x here).

  13. Thanks for the tip. This is a common feature for me, but the first thing I do with it is to change the key from ALT to Super.

  14. Man, I feel like a noob. I’ve been using Linux as my primary OS for about four years now, and I didn’t know about that tip until a couple months ago. If it weren’t for this post and gOS screwing things up on the Cloudbook, I might still not know about it.

  15. Thx to a fellow sidux user: Moving Windows with the ALT key works, I just had to enable ALT as the modifier key… (Control Center, Desktop, Window Behavior). You can also set an alternative for the left mousebutton.
    @ suvi: somewhere there you can set if you want to move maximized screens, that works too.

  16. Personally, I found this feature addictive, and really missed it when using other OS, so…
    In Windows, you can also use “Win32WM”, which is one of the “VirtuaWin” modules, free, and really, really stable (being using it for years on Win2k, Xp & Vista)

    In Os X, you can use “NuclearMouse”, a free SIMBL plugin.
    Or you can take out the wallet and get “MondoMouse”
    Direct link:

  17. You CAN move a window in Windows like this. Just make sure the window has focus, then hit ALT-SPACEBAR, then M (for [M]ove), then hit any arrow key. You can now move the window just like using ALT-leftClick.

  18. This is actually really annoying 😛 I want to turn this feature OFF…
    I noticed this feature when I tried to use Photoshop under Wine. It prevents me from positioning the clone stamp tool with Alt+Left mouse button click, since it initiates a window move…

  19. Anyone know how this feature cab be disabled? It’s a great idea, but unfortunately it interferes with the shortcuts of other programs.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s