Is it possible to leave Firefox open when closing its only tab?

77

12

I am using Firefox 59.0.2 (64-bit) on Ubuntu 16.04 (Xenial Xerus).

When there is only one tab opened in Firefox, closing the tab will also close the web browser. This is contrary to that in Chrome browser, closing the only tab doesn't close the Chrome browser.

Is it possible to leave Firefox open when closing its only tab?

Tim

Posted 2018-04-01T16:41:22.277

Reputation: 12 647

16I'm pretty sure closing the last tab will close Chromium, but there is a setting for "Continue running background apps when Chromium is closed" (whatever that's useful for). Isn't just leaving one blank / new tab good enough? (If it's all the distracting stuff that's in a new tab, it can be set to be empty/blank) – Xen2050 – 2018-04-01T16:58:10.833

4You can pin a blank tab in Firefox. Pinned tab does not close with Ctrl+W. – Biswapriyo – 2018-04-01T18:05:55.500

3@Xen2050: Chromium Apps don't necessarily need to have a GUI, or at least, they don't necessarily need to live in a browser tab. The Google Hangouts app for Chromium, for example, usually lives in a small window outside of the browser GUI. If you use the Hangouts app for, say, video chatting, it would be annoying if your chat were aborted just because you closed the last browser tab, maybe even on a different screen or virtual workspace! – Jörg W Mittag – 2018-04-01T20:08:38.337

3

there are a lot of questions about this on Mozilla support forum: How to stop firefox quiting last tab(when only one tab is open) without warning??, Where is the option for keeping Firefox open when I close the last tab?

– phuclv – 2018-04-02T01:19:10.143

"There are a lot of questions about this on Mozilla support forum..." Honestly, that is rather surprising. I have been utilizing the same about:config setup described in Pippik's answer for several years. That capability has been around for quite some time. – Run5k – 2018-04-02T16:34:31.563

1It is possible, only on macOS. – Michael Hampton – 2018-04-02T21:48:35.800

2Despite the fact I have no idea why you dont want to close it, If you will open download box- by default probably CTRL + J, then you can close all tabs, but firefox fill be still "running" :D – xxxvodnikxxx – 2018-04-03T14:11:43.340

In Opera, this is the default functionality. Closing the last tab opens up a new tab. – Yaakov Ainspan – 2018-04-03T19:22:49.317

Easy with both chrome and firefox: Be in any situation where the described behaviour is completely undesirable - you can rely on it happening :) – rackandboneman – 2018-04-04T11:11:20.390

1(To explain: Both browsers can behave like that if there is any window that bugged itself into being offscreen, 0x0px, or similar...) – rackandboneman – 2018-04-04T11:13:46.687

@Xen2050 It's useful if you're downloading something but want to close chrome to free up a little bit of resources. – LateralTerminal – 2018-04-04T16:06:42.323

1@xxxvodnikxxx in that case Ctrl+Shift+B and Ctrl+Shift+H also work – phuclv – 2018-04-07T16:38:43.010

Answers

125

While it isn't possible to keep Firefox open with no tab showing, you can prevent quitting the application when the last tab is closed by having a new tab created automatically (your choice of home page or blank tab). Use about:config to change this behavior.

  • In the URL box, type about:config and press Enter.
  • If you get a warning that emphasizes "Changing these advanced settings can be harmful...," click the button that says I accept the risk!
  • Find the Preference name browser.tabs.closeWindowWithLastTab by typing it in the Search box or copy-and-paste it from here.
  • Double-click the Preference to change it to false.

DrMoishe Pippik

Posted 2018-04-01T16:41:22.277

Reputation: 13 291

10

You may add the details of that preference from this article http://kb.mozillazine.org/About:config_entries

– Biswapriyo – 2018-04-02T04:47:16.873

4You could also leave a non-tab open like the history or downloads window – user2813274 – 2018-04-03T00:53:42.033

2Just curious: I thought Firefox is free; what warranty are we talking about? – alwayslearning – 2018-04-03T04:00:47.467

3@alwayslearning: It's just to prevent people who know nothing about computers from changing anything there and then complaining that it does not work after they broke it. – user21820 – 2018-04-03T04:49:54.393

10@alwayslearning it's not voiding the warranty. It's in quotes because it tries to convey the spirit of the message, not the actual contents. In reality it starts off with "Here be dragons!" (literally) and then explains that changes made there can be cause a problem and it'd be your fault if that happens. – VLAZ – 2018-04-03T08:00:28.043

2@alwayslearning: There isn't one. DrMoishe is using an analogy for brevity (or as a joke). – Lightness Races with Monica – 2018-04-03T10:13:01.750

@LightnessRacesinOrbit, there really is a warning in Firefox about "voiding the warranty". viaz is correct about the explanation of the message. It's just warning you to be careful with what you configure. – oldtechaa – 2018-04-03T12:24:26.070

@vlaz , we have discussed this many times before. The "Here be dragons!" message appears to be a regional and/or version option, so while it might literally say that for you, I always see "This might void your warranty!" In other words, DrMoishe Pippik's "reality" is different from yours. ;-)

– Run5k – 2018-04-03T12:39:01.270

2So I guess we can all agree that Mozilla should change the message to "Here be dragons!" – mbomb007 – 2018-04-03T15:42:19.920

2

@Run5k <<"This might void your warranty!" is displayed for the English (US) locale.

"Here be dragons!" is displayed for the English (British) locale, and possibly other English locales.>> Source

– mbomb007 – 2018-04-03T15:45:55.643

@mbomb007 , good find. That being said, the only thing where "we can all agree" is that people who post Firefox-related answers should probably avoid referencing their regional Mozilla joke phrasing within their about:config page descriptions to help avoid confusion. – Run5k – 2018-04-03T15:50:01.313

@Run5k that's actually the first time I ever heard it's a regional thing. I've even seen the "here be dragons" message mentioned in articles and by other people, so I assumed it's every version of Firefox that has said it. – VLAZ – 2018-04-03T15:59:38.353

@vlaz that is totally understandable. I have mentioned it in reference to other answers, but some people find it rather hard to believe without a screen shot. The bottom line is that it can be confusing because the funny wording isn't universal, so I try to avoid using it.

– Run5k – 2018-04-03T16:16:04.797

Thanks all for clarifying on the "warranty". I missed the pun as I didn't read between the characters. – alwayslearning – 2018-04-03T20:21:50.283