left click twice to left of window to close

Asked by Goksu

Hello,

I have a habbit of closing windows by left clicking twice to the left of a window to close it.
It is a habbit I got because I was opening windows while trying to close them because the buttons where very close to each other.

Ubuntu does not close the window when I do this. I would like to add this functionality to my system.

How do I do that?

thank you. :)

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Andrew (and471) said :
#1

Well I don't think you can get the double click functionality, but you can certainly move the winodw buttons (close, minimize etc.) to the left size (like on mac osx)

Open a Terminal (Accessories > Terminal), and type in:

gconftool-2 --type string --set /apps/metacity/general/button_layout "close,maximize,minimize:menu"

To set it back, type

gconftool-2 --type string --set /apps/metacity/general/button_layout "menu:minimize,maximize,close"

Hope this helps?

Revision history for this message
Goksu (gun-goksu) said :
#2

ok. I'll try that.

Some linux distros have the "left side double click close window" functionality. just not ubuntu.

It will be a real improvement on ease of usability for me as I never ever close from right side.

I didn't know that I could reorder the buttons. :DDD damn all the years I have spend learning & working on mswindows. :(

I dont have the knowhow yet to add the close thingy myself. I'll really appreciate if anyone could tell me how to add the functionality.

if I click once to the left the menu opens. and close is there. like I wish I double click and it just activates the close item?

thank you very much for the reply. I will play around the info you have given.

Göksu. :)

Revision history for this message
Sam_ (and-sam) said :
#3

Hi,
if you run Compiz there is an outrages variety of configuration options.
One of them is in general options -> key bindings
The second one from the top of the list is mouse+close windows, if you acitivate it a pop up appears where you can choose the mouse button e.g. button1 (the left mouse button), then click on e.g. the top left edge of the shown screen, that's it. From now on every time you'll click with the left mouse button on the top left edge on your desktop the active window will close. This can be reversed to default (not activated) any time.
Another alternative of course is Alt+F4 or Ctrl+q.

Revision history for this message
Goksu (gun-goksu) said :
#4

thank you very much. I'll try that.

Revision history for this message
Goksu (gun-goksu) said :
#5

Thanks Sam, that solved my question.

Revision history for this message
Goksu (gun-goksu) said :
#6

Hi Sam,
I tried your idea. it did not work.
some other distros do close the window when left clicked on the top left corner of the window. I'd like to implement that with my ubuntu.

Hi Rugby471,
I dont want to change the button locations or the default view of gnome. a simple option to double click top left will be perfect & minimal.

So, any other ideas please?

Revision history for this message
Sam_ (and-sam) said :
#7

Hi again,
sorry, don't know why the option within compiz doesn't work for you, it does work here.
I couldn't find the solution you prefer either and I guess this makes sense so far, if one has in mind that the majority makes a left click once or twice to acitivate regular actions and doesn't want to close a window by accident. That's why all the options to close a window require certain key involvement.
However, there is the possibility to suggest your idea to brainstorm, developers of metacity or compiz.

Revision history for this message
Goksu (gun-goksu) said :
#8

it does? what is different in mine that it does not work?
topleftedge+button1 just does not work here. the menu opens.
it still is not the same as double click.

I'll also suggest the idea to the developers of compiz.

Revision history for this message
Sam_ (and-sam) said :
#9

Hi,
the pop up which I've talked about does not refer to a window directly, it refers to the screen itself, the desktop so to speak.
quote: click with the left mouse button on the top left edge on your desktop the active window will close.

The meaning of the trick is therefore don't click direct on the window, instead click on empty space in the top left corner of your desktop, if of course you've chosen this position before in compiz.

Revision history for this message
Chucky Ellison (ellisonch) said :
#10

I am also really interested in this feature (but not imitation workarounds). However, I've looked through google results, and for reasons unclear to me, this feature is clearly a controversial one.

I recently installed Ubuntu and absolutely LOVE the fact that I can finally double click on an application's title bar to toggle between maximized and unmaximized---I've been craving this in linux for years. It makes not being able to double click the window's menu-button to close so much more jarring.

Why can't this just be a configurable setting?

Revision history for this message
Kim Stebel (kimstebel) said :
#11

in fact this can be done on ubuntu, and I have had it working for a long time. The only problem is that you will have to patch and compile your own version of metacity. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=381509

Revision history for this message
Sebastian Geiger (lanoxx) said :
#12

i just came across this thead, would be nice to have this feature in karmic.

cheers
lanoxx

Revision history for this message
Goksu (gun-goksu) said :
#13

I'll be very happy if this could be true. :)
patching and compiling is not something I have done before.

Revision history for this message
Goksu (gun-goksu) said :
#14

having to do a patch compile for every machine I use is not feasible. I would settle for having it disabled someplace only waiting for me to enable it.

I always close my windows from the left. because I manage to close a window I want to work on later when I try to minimise when I click to the right. and I do not use the maximise button on the right either, I doubleclick on the bar. always.

Revision history for this message
Sam_ (and-sam) said :
#15

Alternative: other window managers (which support MS behaviour).
As pointed above the double click in *nix world would be seen as redundant.

Not sure about e.g. IceWM
http://www.icewm.org/FAQ/IceWM-FAQ.html

One window manager which is highly configurable and might be able to include the double click feature, is Openbox.
http://icculus.org/openbox/index.php/Main_Page
http://icculus.org/openbox/index.php/Help:GNOME/Openbox

Packages via Synaptic:
openbox (universe)
openbox-themes (universe)
obconf (universe)
obmenu (universe)

Not sure if it can be achieved with obconf, but sure by editing .xml files.
http://icculus.org/openbox/index.php/Help:Bindings#Button
http://icculus.org/openbox/index.php/Help:Actions#Close

To edit .xml and get correct syntax
e.g.
geany (universe)

An Ubuntu based distri with Openbox
http://crunchbanglinux.org/

Revision history for this message
Kim Stebel (kimstebel) said :
#16

Oh please, this
a) isn't what was asked for.
b) doesn't even give a complete answer.

Btw, this behaviour exists in KDE and XFCE, no need to use openbox. Thank you...

So here is what you do if you're using compiz as your window manager with gtk-window-decorator.

- create a new directory (let's call it mycom) and cd to it:
mkdir mycom
cd mycom
- download compiz-gnome sources there:
 apt-get source compiz-gnome
- get build dependencies for it:
 sudo apt-get build-dep compiz-gnome
- cd compiz-0.8.2
- download the patch from http://forum.compiz.org/attachment.php?s=ee23d88c967301e3a3461440a5f7349c&attachmentid=178&d=1190447526 to the current dir.
- apply the patch:
patch -p1 <double_click_to_close.diff
- build the package:
dpkg-buildpackage -rfakeroot -uc -b
this might take a while...
Your deb files will be in mycom.
-remove the current compiz-gnome and compiz packages:
sudo apt-get remove compiz-gnome compiz
-install your version instead:
sudo dpkg -i compiz-gnome_0.8.2-0ubuntu8.1_i386.deb
sudo dpkg -i compiz_0.8.2-0ubuntu8.1_all.deb
-tell your package manager not to apply updates to it in the future:
sudo aptitude hold compiz-gnome
-restart X, done

Please tell me whether this worked for you.

Revision history for this message
roemer2201 (roemer2201) said :
#17

When I try to use your patch with compiz-0.8.6 I get the following error at this line: ‘dpkg-buildpackage -rfakeroot -uc -b’

Error:
Wende Patch 021_hide_tooltip_on_decorator.patch an
patching file gtk/window-decorator/gtk-window-decorator.c
Hunk #1 succeeded at 157 (offset 3 lines).
Hunk #2 succeeded at 472 (offset 5 lines).
Hunk #3 succeeded at 4358 (offset 5 lines).
Hunk #4 succeeded at 6701 with fuzz 2 (offset 74 lines).
Hunk #5 succeeded at 6840 (offset 35 lines).
Hunk #6 FAILED at 6970.
1 out of 6 hunks FAILED — rejects in file gtk/window-decorator/gtk-window-decorator.c
Patch 021_hide_tooltip_on_decorator.patch lässt sich nicht anwenden (erzwingen mit -f)
make: *** [debian/stamp-patched] Fehler 1
dpkg-buildpackage: Fehler: debian/rules build gab Fehler-Exitstatus 2

Any suggestions what to do? I think ‘-f’ is not a solution.

Can you help with this problem?

Provide an answer of your own, or ask Goksu for more information if necessary.

To post a message you must log in.