Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New restart method #17

Closed
Madis0 opened this issue Aug 20, 2018 · 3 comments
Closed

New restart method #17

Madis0 opened this issue Aug 20, 2018 · 3 comments

Comments

@Madis0
Copy link
Contributor

Madis0 commented Aug 20, 2018

It seems like the Shift+F2 bar will go away soon, it is gone already for me in 62 beta and 63 nightly.

Easiest way to restart now would be going to about:profiles and clicking Restart normally...

I was also thinking, maybe reStyle can automate some of it, with the help of NativeExt?
Opening the page automatically/with a button would be a good start.


Alternatively, as suggested in the link, user could press Ctrl+Shift+J and then Ctrl+Alt+R, but that is a lot of buttons to press and leaves a potentially confusing log-spamming window open.

@Madis0 Madis0 changed the title Use about:profiles for restart New restart method Aug 20, 2018
@NiklasGollenstede
Copy link
Owner

It's really a shame, I was using that (admittedly buggy) thing for more than just restarting Firefox.

I had actually already changed the text in the restart notice to the about:profiles workaround, just hadn't pushed it yet.


I was also thinking, maybe reStyle can automate some of it, with the help of NativeExt?
Opening the page automatically/with a button would be a good start.

Calling .../firefox -url "about:profiles" actually works, but only for the default profile. If Firefox was started with -no-remote or multiple profiles are open in the same Firefox version, things could get really confusing. (about:profiles would open in a new / other instance and restart that if clicked.)

So I don't think that is a good idea. It only marginally helps in the normal case, but can behave very wrong in other cases.


Another option would be to kill Firefox (the PID is easy to get) and start it again. But this would require the exact original command line (which is not that stable to get across OSes) and would still mess with the process tree. (And would also require the native-ext process to survive the death of its parent).

So that is unstable as well.


I did not know about the Ctrl+Shift+J and then Ctrl+Alt+R way. I personally like it a lot better, but I see your point with the open console window afterwards. Also, I don't know the consequences of this restart method in terms of session end yet (both the previous GCLI method and about:profiles keep the current browser session (cookies etc) open).

But I think, with considerable effort and OS-specific implementations) this could be automated: send Ctrl+Shift+J, wait for the browser window to blur, send Ctrl+Alt+R, wait for the profile to launch again, send Ctrl+Shift+J to focus the console window, close it with Ctrl+W.


Buuut that's a lot of work to get right. So for now the text is changed and that's it.


Reference: https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options

@Madis0
Copy link
Contributor Author

Madis0 commented Oct 22, 2018

FWIW, I just found a cool page on 64.0b2 called about:restartrequired, which pretty much shows some explanatory text and a button for restart. Doesn't really help with the issues you described, but good to know regardless.

NiklasGollenstede added a commit that referenced this issue Oct 22, 2018
- make restart notifications optional (#18)
- make style updates slightly more efficient
- handle subframes differently
@NiklasGollenstede
Copy link
Owner

Thanks for the update! about:restartrequired is indeed a lot more appropriate. It's not some page that happens to have a restart button somewhere, but is explicitly designed for it (even if I have no Idea what Firefox itself uses it for).

reStyle now suggests to use about:restartrequired and also navigates away from that URL after the restart (with some more logic here). That is definitely an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants