43

In Ubuntu 14.04, when you hold Alt and click a window, you can drag it around. As I understand, you used to be able to disable it through gconf, but Unity doesn't read settings from here any more (hence not being able to change where the window buttons are any more).

There's no setting for this by default, and I can't find anything in Unity Tweak Tool either. Is there anyway to disable Alt+click window movement in 14.04?

  • 2
    Close voters! This post has answers that are superior to the called duplicate. Merge candidate? maybe. Close? never – Elder Geek Dec 8 '16 at 20:33
48

In 14.04 (or 14.10, 15.04, 15.10, 16.04), to set the default key / value:

dconf write /org/gnome/desktop/wm/preferences/mouse-button-modifier  '"<Alt>"'

You can give it a (limited number of) other value(s), but DON'T set it to none like you could in the past. Nor should you set it to an empty string, Doing either will give you some trouble getting control over your mouse back, as I found out...

The practical value of this information is quite limited, since not many alternative keys are accepted. I found only Shift and Super to be working, which I doubt will give you the solution you'd like to have.

Of course you can use dconf-editor as well:

org>gnome>desktop>wm>preferences

enter image description here

  • 15
    kcpr's solution lets you set it to something like <Shift><Control><Alt><Super>Button20 pretty easily. Will be hard to accidentally trigger that. – mpen Apr 8 '15 at 16:18
  • 1
    FYI, this still works in 16.04. – John P Bloch Jan 19 '17 at 23:34
  • @JohnPBloch ah, great, good to hear. Thanks for mentioning. – Jacob Vlijm Jan 19 '17 at 23:35
  • 1
    works perfectly ;) P.S DO NOT TRY to set it to the empty string. I tried :) Mouse will just always move windows. Can't select anything. Clicked on some window and you are dragging it around instead of selecting something. You will have to undo this w/o mouse. – Lukas Mar 12 at 10:58
  • 1
    @mpen Thanks... – Rajesh K. Chaudhary Mar 14 at 9:45
16

You can also do this through Compiz Settings Manager.
Just install it with sudo apt-get install compizconfig-settings-manager.
The addon is called 'Move' and is located in section called 'Window Management' I believe. You can go straight to its settings with ccsm -p move.

I really recommend this application. It gives access to massive amount of system customization options.

  • Indeed, super easy this way. – Vadorequest Mar 10 '16 at 14:34
  • You will also need to do sudo apt-get install compiz-plugins to get the Window Management option – shinobi Feb 21 '18 at 7:34
  • How to save changes in this application? Unchecking option for Alt-move does nothing and does return on next run – Dims Apr 30 at 10:06
  • @Dims, I believe it should be saved automatically. Maybe just try changing the modifier from alt to something else (super is my personal favorite). – kcpr Apr 30 at 21:36
  • I'm using deepin, both ways doesn't work with me – Shqear Jun 26 at 12:34
13

Today I've learned that pressing key

Super

together with

Alt + Click

circumvents (deactivates) the dragging behavior. Solved my issues at least, as the application (Inkscape) I wanted to use Alt+Click with, seems to simply ignore the additional key (Super) been pressed.

sf. https://askubuntu.com/a/445254/618422

#edit

By the way, it's also documented officially at:

https://inkscape.org/en/doc/tutorials/basic/tutorial-basic.en.html#Selecting_under_and_dragging_selected

  • THIS is by far the awesomest thing I've seen today! Thanks - this is why I was trying to disable the ALT -drag in the first place! Thanks buddy! – Kristoffer Berg - EcodeAS Aug 11 '18 at 19:45
  • I needed this for notepad++ square selection/column mode editing inside a windows vm. Very useful. Thank you! – Oliver R. Sep 6 '18 at 12:20
  • Best solution which doesn't need us to over-write the system settings – Krishnakumar Dec 7 '18 at 6:45
9

You can us CompizConfig Settings Manager (CCSM). This tool is essential if you want to tweak Linux for better efficiency, because it makes it easy to configure the desktop environment to be much more efficient then out-of-the-box Ubuntu. I used to use things like dconf-editor, and Ubuntu Tweak, but for tweaking anything related to desktop behavior, I have found CCSM to be much more powerful and easy to use.

  1. Install CompizConfig Settings Manager by typing this in a terminal:

    sudo apt install compizconfig-settings-manager compiz-plugins compiz-plugins-extra
    
  2. Open CCSM (CompizConfig Settings Manager), go to the Window Management section, and find the Move Windows icon.

  3. Make sure Move Window is enabled, and then Click it's button.

enter image description here

  1. Click the button to the right of the Initiate Move Window with the mouse icon next to it.

enter image description here

  1. In the Edit Initiate Window Move window, and then make sure to un-check the Enabled check-box. That will disable it. You can also easily set the Window Move to a different mouse/keyboard/screen-edge combination, if you would like, although binding it to a screen edge wouldn't work. This is where this tool, CCSM, outdoes dconf-editor and Ubuntu Tweak.

enter image description here

  • 3
    Disabling the shortcut didn't work for me in Ubuntu 16.04, instead I had to change the default shortcut. – Jaime Hablutzel Dec 5 '17 at 22:23
  • You will also need to do sudo apt-get install compiz-plugins to get the Window Management option – shinobi Feb 21 '18 at 7:35
  • I never install compiz-plugins, because I assumed compiz-plugins was installed by default, and I still have the Windows Management feature. I do, however, install compiz-plugins-extra on all my Linux installations, so maybe that's where I get the Windows Management plugin. So I added both of them to the command line above. – SunnyDaze Feb 27 '18 at 6:06
  • 1
    Changing the shortcut worked for 18.04 – dyesdyes Sep 18 '18 at 9:28
4

You can also use GNOME Tweak Tool (gnome-tweak-tool).

In 'Windows' section, change the 'Window Action Key' setting.

This tool is obviously for the GNOME Shell tweaking, but some properties are respected by Unity as well.

3

If you are using KDE Plasma then you can use System Settings.

  1. Search for System Settings in the Application Launcher or run systemsettings
  2. Click Window Management under the Workspace section
  3. On the left select Window Behavior and go to the third tab labeled Window Actions.
  4. The second section is labeled Inner Window, Titlebar & Frame. You can change any of these drop-down menus to 'Nothing' to disable their action.

Window Actions Menu

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.