37

I would like to know how to send or move a window from one monitor to another with a shortcut key under Ubuntu 12.04 and nvidia 8600 GT without proprietary nvidia drivers.

Now, I know I can configure keyboard shortcuts under the "system settings" and "keyboard" but move a window from one monitor to another is not one of the options. Specifically, I'm not interested in moving from one workspace to another, nor do I want to move among multiple windows of the same program. I want to take my gvim (or firefox) window and have it go from the left to right monitor (or vice versa) without having to use the mouse.

There must be a good way to do this, does anyone know?

Thank you, your help is very much appreciated!

Rick

NOTE: I'm avoiding using the proprietary (and ill-reputed) drivers for my nvidia 8600 GT. I did that under my first install of 12.04 and lost the ability to rotate the screens (I use both in portrait view) and couldn't get it back again, which forced me to reinstall 12.04. At this point I'm far enough along in setting things up nicely I don't want to have to reinstall again.

Rick
  • 1,481

3 Answers3

47

If you're using Compiz (used with Unity 3D), there is a nifty plugin that does exactly that, and also moves windows to different parts of the monitor, if desired.

I only know how to set it from CCSM (CompizConfig Settings Manager). You can install CCSM and the compiz plugins by running

sudo apt-get install compizconfig-settings-manager compiz-plugins

The CCSM plugin is called "Put", and is in the "Window Management" section of CCSM.

CCSM Window Management Page

Enable the "Put" plugin by checking it. Next click the "Put" plugin. You can set a shortcut key in the "bindings" tab for "Put to Next Output". By default, it's disabled, but is easy to set. In this example we've set "Put to Next Output" to Super+Right and "Put to Previous Output" to Super+Left.

CCSM Put Binding Tab

If you are not familiar with CCSM, you can get it from the standard repository, but be warned... it can be dangerous to play around with certain settings that you don't understand, so be careful. I've used it a lot over many versions, and can't live without it, but it allows you to chop off your foot if you're not paying attention. don't be too afraid, but don't think it will protect you from yourself.

More info on Compiz: http://wiki.compiz.org/

gene_wood
  • 481
Marty Fried
  • 18,466
  • From what I've read Compiz is a pretty easy way to cripple your system. I don't know enough about which files to backup before I mess with it to ensure that I can return to a working state. I also read somewhere that Compiz worked with Unity before 12.04 but that it is strong recommended NOT to use it now. Maybe I need to consider abandoning Unity and going to another desktop, but for now I've had enough problems getting things to work that I don't want to start breaking things myself. :( – Rick Jun 19 '12 at 16:31
  • I was under the impression that Compiz was still used, but to be honest, I'm not using 12.04 or Unity. For what it's worth, I've used Compiz and compiz config since it started, and personally love it, but it can be dangerous, much like a knife or matches can be dangerous - not necessarily so dangerous as to avoid, just to be careful and only use it when you understand what it's doing. 99% of the settings won't destroy anything - they just change keyboard shortcuts, mouse behavior, etc. But if you change the window manager, Compiz may stop working completely. – Marty Fried Jun 19 '12 at 17:32
  • 1
    Hi there. I'm using 12.04 with Unity and Compiz (with "Put" enabled) and it seems to work. – Jack Kelly Jul 17 '12 at 07:57
  • 4
    It appears that "put" isn't installed in Ubuntu 12.10. To add it, install the "compiz-plugins" package. However, I can't get "put" to work on 12.10. – Jack Kelly Oct 10 '12 at 08:34
  • 8
    Sorry, my mistake: "put" does work on 12.10; it's just that you need to reboot after enabling it. So, to summarise, to install "put" on 12.10: first install CCSM and "compiz-plugins", then enable "put" as described by Marty, then reboot. – Jack Kelly Oct 10 '12 at 08:43
  • 1
    I don't have 12.10, but I think you can restart Compiz without needing to reboot (compiz --replace). – Marty Fried Oct 10 '12 at 19:11
  • It works for me on 12.04 64bit with Unity. I did need to reboot because the launcher didn't pop up anymore on mouse-over after enabling Put. I also increased the Speed on the Animation tab to 5.0. – Sicco Jan 08 '13 at 11:10
  • 1
    This still works in 13.10. I just restarted compiz like you said. Thanks. – isaaclw Jan 01 '14 at 18:15
  • 1
    Glad my comment was useful after all this time. – Marty Fried Jan 02 '14 at 17:59
  • I find Put Pointer option is quite useful – yuan Apr 16 '15 at 07:47
  • It's still relevant almost a year and a half later. Thanks Marty. I'm now using Chrome to view Netflix on my big screen, and browsing the internet here :). – Tamsyn Michael Jun 09 '15 at 14:49
  • 1
    You're welcome - I'm glad I was able to help people; I enjoy that. – Marty Fried Jun 10 '15 at 03:01
  • Works in Ubuntu 16.04 LTS – somethis Jan 07 '18 at 18:08
  • Does not work in gnome :( https://askubuntu.com/questions/980807/compiz-grid-put-not-working-after-upgrading-from-17-04-to-17-10 – Riyafa Abdul Hameed Mar 08 '18 at 08:06
7

I want to take my gvim (or firefox) window and have it go from the left to right >monitor (or vice versa) without having to use the mouse.

A bit late to this discussion, I'm afraid, which I found when trying to do exactly this, but I eventually worked out a no-install no-config solution (for Ubuntu 14:10 at least)

  1. Restore the window, if it is currently Maximised, with Ctrl-Super-DownArrow
  2. Alt-Spacebar to the frame menu, then 'm' to Move
  3. Use arrow keys to move the entire window from one monitor to the other
  4. Hit Enter to stop keyboard dragging - you can have strange side effects later if you skip this step!
  5. Ctrl-Super-UpArrow if you want to maximise again
  • This answer is lacking the shortcut. – CivMeierFan Jun 20 '16 at 22:21
  • Well, it's certainly not a single shortcut key. But OP explains "I want to take my gvim (or firefox) window and have it go from the left to right monitor (or vice versa) without having to use the mouse", and this answer does precisely that. – Francis Norton Jun 21 '16 at 16:09
1

This bash script can do this too, https://github.com/jc00ke/move-to-next-monitor

install dependencies

sudo apt-get install xdotool wmctrl

then

wget https://raw.githubusercontent.com/jc00ke/move-to-next-monitor/master/move-to-next-monitor
chmod +x move-to-next-monitor
mv move-to-next-monitor /usr/bin

and then set a shortcut for it

Fangxing
  • 271