MozillaZine

keyboard shortcut to restart firefox? [Mac]

User Help for Mozilla Firefox
Ed1
 
Posts: 862
Joined: January 30th, 2005, 2:33 pm

Post Posted December 2nd, 2017, 6:45 am

Thanks, morat.

Is there any way to place this button, or a button with the same restart function, on the Navigation Toolbar?

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

Post Posted December 2nd, 2017, 9:36 am

@Ed1

It is not possible with the userChrome.css file or with a WebExtension.

Ed1
 
Posts: 862
Joined: January 30th, 2005, 2:33 pm

Post Posted December 2nd, 2017, 9:56 am

OK, thanks, morat. Sorry to hear that. It would be a useful addition.

Just so I understand then, your .css code seems to make a restart button always available on the Addons page, rather than the default behavior which is to not show a Restart button on that page unless there is a reason that a restart would be required. Is that correct?

I can't think of when Firefox 57+ would display a Restart button, since Addons now are immediately installed and uninstalled without a Restart being necessary.

The reason I would like a Restart button is to reload Firefox with current tabs open after they and perhaps many other tabs have been opened and/or closed during a very long browser session that has caused RAM ussage to go way up. A restart would be a way to reduce RAM usage during further browser use. With the old Restart addons, that was easily accomplished with either a Restart button or a Restart entry in the File menu. Now it seems impossible.

Gingerbread Man

User avatar
 
Posts: 7710
Joined: January 30th, 2007, 10:55 am

Post Posted December 2nd, 2017, 11:18 am

  1. Shift + F2
  2. restart
  3. Shift + F2
You can send the above to Firefox by creating a macro in either your mouse or keyboard software, or your operating system settings. You'll need to insert a delay in between the commands at some point; how many milliseconds is appropriate varies depending on the system. If such a feature isn't available, you can use an external utility like AutoHotkey for Windows or BetterTouchTool for Mac.

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

Post Posted December 2nd, 2017, 11:44 am

Ed1 wrote:Is that correct?

Yes.

Ed1 wrote:I can't think of when...

It is possible to install legacy extensions in Fx 57+ nightly build so the about:addons restart button is still available.

Ed1
 
Posts: 862
Joined: January 30th, 2005, 2:33 pm

Post Posted December 3rd, 2017, 6:13 am

Thanks, Gingerbread Man! I tried that sequence manually on my Win10 system with FF57 open. Just to clarify what worked for me was:

1. Shift + F2 (to open the console at the bottom of the screen)
2. Type: restart
3. Press: Enter key (to restart Firefox)
4. Shift + F2 (to close the console at the bottom of the screen)

I've noticed lately that when FF57 is restarted, it restarts minimized to the Windows tray area. With the old Restart addons, it used to restart maximized and in focus. So, I'm looking for a way to restart maximized.

I don't know anything about macros or scripting, but I looked at the Autohotkey web page and it looks interesting. I might give it a try!

Gingerbread Man

User avatar
 
Posts: 7710
Joined: January 30th, 2007, 10:55 am

Post Posted December 3rd, 2017, 8:14 am

Ed1 wrote:Thanks, Gingerbread Man!

You're welcome.
Ed1 wrote:I've noticed lately that when FF57 is restarted, it restarts minimized to the Windows tray area. With the old Restart addons, it used to restart maximized and in focus. So, I'm looking for a way to restart maximized.

I can't reproduce that in Nightly.

The following AutoHotkey script does the job. I don't know why the maximize command doesn't work when it's fine in a separate script by itself. I included it commented out, for reference. The following script maximizes the window via keyboard shortcut instead. Paste it into Notepad, then save it as "Restart Firefox.ahk" including the quotation marks.
Code: Select all
WinActivate, ahk_exe firefox.exe ; Focus the Firefox window
SendInput, +{F2} ; Open the Developer Toolbar
Sleep, 350 ; Wait 350ms
SendInput, restart{Enter} ; Type "restart" then press Enter
Sleep, 4250 ; Wait 4.25s for Firefox to load completely
SendInput, +{F2} ; Close the Developer Toolbar
WinActivate, ahk_exe firefox.exe ; Focus the Firefox window
; I can't get the maximize command to work, though it works in other scripts.
; WinMaximize, ahk_exe firefox.exe ; Maximize the Firefox window
SendInput, !{Space}x
Return

I haven't tried, but you can probably launch it from a Firefox toolbar button using the External Application Button add-on.

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 7 guests