MozillaZine

Restart button for Firefox 58+

Discussion of general topics about Mozilla Firefox
Frank Lion

User avatar
 
Posts: 20102
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom

Post Posted February 5th, 2018, 3:24 pm

An extension to do this still doesn't seem to exist for Firefox 57+, so...

...a simple, but useful, idea for this - Enter about:profiles > right click tab and select Pin Tab > you're done.

Just use the second button down on the right of that page to restart.

If you do a lot of restarts (for example, when theming the fine tuning of text colours can get up to the 30 - 60 restarts an hour type speeds) then here's some optional code for userContent.css that will stop you hitting the SafeMode button by mistake -

Code: Select all
/*Franks Whack SafeMode button in about:profiles....*/
@-moz-document url(about:profiles) {
#restart-in-safe-mode-button {
   display: none !important;
}}


...and, just because everyone always likes pics, you'll end up with something like this -


Image

^ click for full size.
Metal Lion latest SeaMonkey & Thunderbird Themes - Sea Monkey and Silver Sea Monkey
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)

NanM
 
Posts: 177
Joined: September 16th, 2008, 1:04 am
Location: SW WAustralia

Post Posted February 6th, 2018, 7:46 am

Nice, Frank Lion.

I've needed restart a lot while getting used to Quantum and its quirky approach to
extension development. Not a dev myself but trying to help a couple of local users redo their
homemade intranet helpers.
And... for we of fading eyesight, your workaround button is easier to target than a toolbar one anyway.
Ta v much! Might use it in this Gecko too .
Restarting now...ALT 1 , point/click.

morat
 
Posts: 2955
Joined: February 3rd, 2009, 6:29 pm

Post Posted February 6th, 2018, 10:20 am

The about:addons page uses the nsIAppStartup.eRestart constant in the extensions.js file.
The about:profiles page uses the nsIAppStartup.eRestartNotSameProfile constant in the aboutProfiles.js file.

Does the about:profiles command restart the default profile when using a non-default profile?

nsIAppStartup constants
http://developer.mozilla.org/en-US/docs ... #Constants

Reference
http://dxr.mozilla.org/mozilla-release/ ... p.eRestart
http://dxr.mozilla.org/mozilla-release/ ... ersion.txt

Frank Lion

User avatar
 
Posts: 20102
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom

Post Posted February 6th, 2018, 10:47 am

morat wrote:Does the about:profiles command restart the default profile when using a non-default profile?

No. Providing the user has previously selected the non-default profile in the usual approved way - http://kb.mozillazine.org/Profile_Manager


I'll swear some of these guys think I fell off the back of a turnip truck yesterday and wouldn't have already checked that! :)
Last edited by Frank Lion on February 6th, 2018, 10:58 am, edited 1 time in total.
Metal Lion latest SeaMonkey & Thunderbird Themes - Sea Monkey and Silver Sea Monkey
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)

madmudmob

User avatar
 
Posts: 810
Joined: August 30th, 2006, 7:34 am
Location: Somerset, UK

Post Posted February 6th, 2018, 10:56 am

I found this which really does make a Restart button (and am chuffed with myself that I eventually got it right and the button in the toolbar works) ......
https://www.reddit.com/r/FirefoxCSS/com ... le_please/
Mud is good!

morat
 
Posts: 2955
Joined: February 3rd, 2009, 6:29 pm

Post Posted February 8th, 2018, 8:29 am

Okay. I've been using the portable version for so long I've forgotten how to use the profile manager.

Frank Lion wrote:fell off the back of a turnip truck

I heard it was a fish truck. :wink:

http://imgur.com/2NhE4eY

Frank Lion

User avatar
 
Posts: 20102
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom

Post Posted February 8th, 2018, 11:51 am

morat wrote:Okay. I've been using the portable version for so long I've forgotten how to use the profile manager.

Don't worry about it, if you remember just how bad the functionality of the 'Create New Profile' was on the about:profiles page was when they first rushed it out, then Mozilla couldn't even find its own profilemanager, let alone use it. :P

Dreadfully worded that about:profiles page all the way through. 1,000 people working full-time for Mozilla these days and not one of them can write one simple page right or even understand how the average user thinks/understands.
Metal Lion latest SeaMonkey & Thunderbird Themes - Sea Monkey and Silver Sea Monkey
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)

the-edmeister

User avatar
 
Posts: 32122
Joined: February 25th, 2003, 12:51 am
Location: Chicago, IL, USA

Post Posted February 8th, 2018, 12:50 pm

Mozilla seems to lack institutional knowledge about what Mozilla created in the past, never fully completed, and then discarded it before it came into wide usage or was "officially" released to the public. With Profiles it was an XUL Runner Profile Manager project, that iirc was part of a "Summer of Coding" internship program in 2010. Worked fine but needed a bit of tweaking to make it a Release, IMO.

https://jagriffin.wordpress.com/2011/01 ... 1-0_beta1/
http://ftp.mozilla.org/pub/utilities/profilemanager/
https://wiki.mozilla.org/Auto-tools/Pro ... ileManager

Then a few years later Mozilla decided that XUL Runner was in the cards for Firefox future with the eventual demise of XUL.
At least that's my "take" on the events surrounding that Profile Manager application which ran outside of the main Firefox process.
A mind is a terrible thing to waste. Mine has wandered off and I'm out looking for it.

madmudmob

User avatar
 
Posts: 810
Joined: August 30th, 2006, 7:34 am
Location: Somerset, UK

Post Posted February 9th, 2018, 7:24 am

Anyone tried the link I posted a few above?

Working a treat for me and as an extra bonus I can use Customize to move the button wherever I want.
Mud is good!

morat
 
Posts: 2955
Joined: February 3rd, 2009, 6:29 pm

Post Posted February 9th, 2018, 8:00 am

@madmudmob

It's a nice tweak. I like the CustomizableUI.createWidget method. It's easy peasy.

CustomizableUI
http://developer.mozilla.org/en-US/docs ... ableUI.jsm

madmudmob

User avatar
 
Posts: 810
Joined: August 30th, 2006, 7:34 am
Location: Somerset, UK

Post Posted February 9th, 2018, 8:03 am

Image
Mud is good!

Frank Lion

User avatar
 
Posts: 20102
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom

Post Posted February 14th, 2018, 6:50 pm

Somebody asked, the other day, for help showing the profile in use more easily on that about:profiles page. So, you might as well have it as well -

Code: Select all
    /*Franks about:profiles Profile in Use clearer ....*/
    @-moz-document url(about:profiles) {
    #profiles h3 {
   background: #91BFBC !important;
}}


If you wanted the whole lot and the restart button made clearer as well, you just combine it all -

Code: Select all
 /*Franks about:profiles Clearer Style....*/
    @-moz-document url(about:profiles) {
    #restart-in-safe-mode-button {
      display: none !important;
}

#profiles h3, #restart-button  {
   background: #91BFBC !important;
}}



Tip: don't change a user's choice of text colour, unless you really have to. If you don't know the text colour being used, as here, then just pick a background colour of a mid-tone hue in a pleasant, but unlikely colour and you'll be OK.
Metal Lion latest SeaMonkey & Thunderbird Themes - Sea Monkey and Silver Sea Monkey
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)

spideymouse
 
Posts: 15
Joined: January 9th, 2014, 9:10 am

Post Posted April 3rd, 2018, 3:16 pm

Has anyone tried this addon out?

https://addons.mozilla.org/en-US/firefo ... -browser1/

I'm kind of creeped out by the amount of permissions it requires, and I am unsure how to find out what the addon actually does with all of said permissions.

morat
 
Posts: 2955
Joined: February 3rd, 2009, 6:29 pm

Post Posted April 3rd, 2018, 4:39 pm

The extension uses the native messaging API. I assume the extension calls an external program similar to NirCmd closeprocess to politely close Firefox, then waits until the firefox.exe process ends to start Firefox.

Native messaging
http://developer.mozilla.org/Add-ons/WebExtensions/Native_messaging

NirCmd closeprocess
http://nircmd.nirsoft.net/closeprocess.html

Gingerbread Man wrote:With NirCmd, you can tell Firefox to exit gracefully, wait for it to close, then relaunch it. The trouble is, that's not a true restart. Even if you have Firefox set up to show your tabs and windows from last time at startup, you'll lose things like session cookies that a restart would normally preserve.

Similar threads
viewtopic.php?f=38&t=3033833
viewtopic.php?f=38&t=3035617
Last edited by morat on April 3rd, 2018, 4:40 pm, edited 1 time in total.

spideymouse
 
Posts: 15
Joined: January 9th, 2014, 9:10 am

Post Posted April 3rd, 2018, 4:40 pm

morat wrote:The extension uses the native messaging API. I assume the extension calls an external program similar to NirCmd closeprocess to politely close Firefox, then waits until the firefox.exe process ends to start Firefox.

Gingerbread Man wrote:With NirCmd, you can tell Firefox to exit gracefully, wait for it to close, then relaunch it. The trouble is, that's not a true restart. Even if you have Firefox set up to show your tabs and windows from last time at startup, you'll lose things like session cookies that a restart would normally preserve.

Native messaging
http://developer.mozilla.org/Add-ons/We ... _messaging

NirCmd closeprocess
http://nircmd.nirsoft.net/closeprocess.html

Similar threads
viewtopic.php?f=38&t=3033833
viewtopic.php?f=38&t=3035617


Thank you for the info!

Return to Firefox General


Who is online

Users browsing this forum: No registered users and 1 guest