Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I used to close a running application by pressing ALT+F4. But, I realised that the application is still running and the correct way to close (quit) it is the combination of Ctrl+Q keys.

So, what is the purpose of ALT+F4 and how is it different from Ctrl+Q?

share|improve this question

2 Answers 2

up vote 12 down vote accepted

The shortcut Alt-F4 send a close message to the window, as when you press the little x button on the title bar. It is a windows manager configuration.

It depends upon the application weather to respond to this event closing all together the application, or iconize (i.e. like xchat can be configured) or other.

The Ctrl-Q shortcut you mention is not universal, every application can have its own. For example evince use Ctrl-W, some other use Ctrl-Q to close, Ctrl-W to close a single tab and Shift-Ctrl-W to close all tabs (but not all windows).

share|improve this answer

This entirely depends on the application.

By default, applications bind Alt+F4 such that it does the same as closing the window. For some applications that means quitting (like the Calculator), for others it might mean putting them in the background (like Empathy).

The job of Ctrl+Q is the developers' free choice, but convention dictates that it quits the application.

In short: Alt+F4 will normally do the same thing as clicking the X window button. If that only hides the windows, Ctrl+Q will normally quit the application.

share|improve this answer
    
Not 'If that only hides the windows,' it's 'closes the windows,'. –  Oxwivi Jun 4 '11 at 16:44
    
@Oxwivi What do you mean by 'closes the window'? If it doesn't quit the application, then how is it different from 'hides the window'? –  db42 Jun 4 '11 at 16:48
    
@db42, if you say hide the window, it gives the impression that the window is hidden with it's content intact. You don't close a Firefox window which returns to how it was before when you open a new window does it? –  Oxwivi Jun 4 '11 at 16:52
1  
hiding means minimize;so leaving it running where you use the window buttons on the panel to get it back; closing also removes it from the panel. (note: technically Unity has no panel anymore ;) ) –  Rinzwind Jun 4 '11 at 16:53
    
When a window is hidden, it's technically destroyed. Such as when you click the [x] on empathy. But the application (what's called the 'main loop' in gtk) is still running. Clicking the Empathy icon in the messaging menu re-creates the window. –  Stefano Palazzo Jun 4 '11 at 17:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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