User Preference for "Restore Previous Session" in Firefox About:Config - firefox

I would like to set "Restore Previous Session" in Firefox programmatically using user_pref() in a *.js file. What is the key, value pair for this user preference?
Alternatively, is there a way to detect changes to user preferences (e.g., as can be done with with dconf watch / on linux gsettings? I have diff'ed the prefs.js file before and after manually selecting the "Restore Previous Session" in the GUI, but do not see a corresponding change between the prefs.js files.

I resorted to searching the Firefox source code at https://github.com/mozilla/gecko-dev for "Restore previous session" since my typical Google searches were not turning anything up. From the source code results, I was able to infer the correct key/value pair as
user_pref("browser.startup.page", 3);
This was confirmed by http://kb.mozillazine.org/Browser.startup.page after additional Google searching on this key/value pair. (It also showed up in the pref.js diff's but was not obvious due to the key's cryptic name)

Related

.srt file types doesn't exist under 'Choose default apps by file type' after after formatting windows 10, what to do?

Before I did a clean install of my desktop with windows 10 I had .srt to open by default in Sublime Text after I have formatted my computer I somehow miss the file format .srt under 'Choose default apps by file type'.
The .srt should be be between the .srf and .srw file types, but it isn't (as shown in the image here: https://answers.microsoft.com/en-us/windows/forum/windows_10-desktop-winpc/srt-files-back-to-unknown-application/e33cace8-dd59-4557-9631-e8e82a8307b3?auth=1).
If I try "open with and find Sublime (or any other software for that matter, it will open it, but it will not set it as the default program even though I checked the box) and will still appear as an unknown filetype....
If I go into properties and try to change the "open with" from there, it will just keep showing "choose a program" even still.
tried updating the computer and restart it and frankly I've given up, and it doesn't seem anyone have run into this problem before of missing a filetype under 'Choose default apps by file type'.
I also tried
1) Settings - Indexing Options
2) Advanced button
3) File Types tab
4) Add New Extension to List box, type in extension (without a period) such as "py"
5) Click Add, OK and Close
and while the format does appear in the 'Choose default apps by file type', it still doesn't let me change it at all...
Anyone got an answer to this problem?
I have now tried to go into regedit and use "search" on anything that included "sublime" and ".srt" and deleted them all... restarted the computer, reinstall sublime. The file extension I created myself in the indexing option, has been deleted.
Sublime can still open the file, but if you try to make it default program by simply opening it or or going into the files properties and do it that way, it will just open the file without it making it the default program as it should.
going into the indexing option and create the .srt extension format so it can be found under 'Choose default apps by file type' will allow you to choose notepad or wordpad as default program. When I choose either of them, the will just freeze for 1-2 sec and then nothing has changed and the extension havn't been associated with any of the programs.
I tried following the following links, and nothing has worked. Guess I'll just have to accept there is no solution rather than to live with out until I reform my PC again, cause it works without a problem on my laptop and I formatted them both the same time and installed the exact same things on both and the exact same way s:
I've tried to use the following links for help, but to no avail since non of the things I have tried have fixed it.
https://superuser.com/questions/655600/i-cant-set-a-program-as-the-default-to-open-a-filetype-with-in-windows-7
https://superuser.com/questions/91655/open-with-dialog-ignores-my-selection
https://superuser.com/questions/13653/how-to-set-the-default-program-for-opening-files-without-an-extension-in-windows
Windows 7 file extension association
One way to get an empty .srt entry back in the 'Choose default apps by file type' control panel is to create a new key for .srt in your registry under HKEY_CLASSES_ROOT:
Open Registry Editor, e.g. by typing 'regedit' into the start menu or a command prompt
At the top of the tree, right-click on 'HKEY_CLASSES_ROOT', New -> Key
Rename the new key to '.srt' and press enter to save

Firefox RootStore cert8.db/key3.db not existing

I want to access the Firefox Root Store under Windows (7) with Firefox 45.0.1. I found several sources that told me to navigate to C:\Users\{username}\AppData\Local\Mozilla\Firefox\Profiles\8ab3jkih.default\cert8.db.
Unfortunately I can't find cert8.db, although 8ab3jkih.default is present (and the only folder).
I tried accessing the DB with certutil, which works, but only gives me 4 certificates for -viewstore (should be about 150). Afterwards I tried accessing -getconfig and -databaselocations, but that just tells me that the system can't find the given file. I hoped to find the location of the database.
Yes, I already heard of NSS, but figured I should try it manually first, before working with it.
Is there anything wrong with my installation? Should I try to reinstall? What else can I do? My endgame btw is finding out whether a certain given certificate is a root certificate, so I just want to programmatically access the list of root certificates and compare them to the given cert.
First be sure you have correctly located your Firefox profile directory.
You can open the menu in Firefox (the three horizontal bars button), find the Help, then go to Troubleshooting information.... In this page, you can see the Profile directory button. Press it and there you go.
Or, another way to open this page, is to type in the direction bar:
about:support

Registry Key: Deletion Error

While "playing" with the private software install/uninstall my system ended up in bad state.
There is a key that's causing my application installation to fail and I can not delete it by any means:
Cannot delete ........key: Error while deleting this key" error,
nothing is logged in EventViewer
I've Administrator privilege and tried everything that search engine offers:
Tried to Change Permissions
Tried to Change Owner
Tried to use RegDelNul
Any advanced ideas how to get rid of this Registry Key?
Thanks.
The only solution was to re-image the VM.
I was having a similar problem (although this was with a key from a driver from a large software company).
I tried the same change owner, reboot, etc. After twiddling with regedit I found the following process to work:
Find parent key in regedit
Right mouse, Permissions, Advanced, Owner Tab
Check Replace owner on subcontainers
Select myself as owner
Click OK
On Permissions dialog, Click Add ...
Type user name
Click OK
Click Full Control
Click OK
Repeat steps 1-10 for sub-key. I had to refresh (F5) and recursively repeat for about 20 keys.
After having to do this again. I found that if I repeatedly perform steps 1-10 on the parent key (about 4 times each) I eventually get to a point where all the properties have been propagated. This is faster than doing it recursively.

firefox open local link to directory with explorer

On a Website for our internal use i show links to local files and folders. the links are like this:
href="file://C:/example/"
href="file://C:/example/test.odt"
The Problem is now that the link to the directory does open in firefox itself with a useless directory listing. Useless because you can just see the files or open them but not copy, insert, delete...
The link to the file work normal and the file is opend by OpenOffice.
By changing the configuration of firefox and setting the following key to false I can open the directory in with explorer.exe but for the file I have to choose the right application.
network.protocol-handler.expose.file
Does someone know a way to get both to work like i want? Means that the Directory is shown by explorer.exe and all files are opened by the right application.
This can be by configuring Firefox or windows, changing the links, or even by writing a small program which opens all the file protocol correctly and will be used as protocol handler for the file protocol in firefox.
Thanks
Raffael
I did the above with small changes in Firefox 14.0.1, which works for me:
Create new boolean value network.protocol-handler.expose.file and set it to false
Create new boolean value network.protocol-handler.external.file and set it to true
Click on a link to a local folder.
In the following prompt, link to the explorer.exe in: C:\Windows\explorer.exe
Files are now open with the default application, folders are open with the Windows Explorer!
I know this is not quite what you want, but you might take a look at the "launchy" addon for firefox:
https://addons.mozilla.org/en-US/firefox/addon/81/
Using this addon you can right click on a file link, go to "launchy" sub-menu, and tell it to open in explorer. This will browse directly to the folder as you want.
I want the same feature you want, however this "works" for now. I have asked the author of launchy to allow it to override the left-click behavior for certain protocols (so it would launch explorer with one click), but I don't have a response yet.
edit: Years later, I will post the solution I started using instead of Launchy:
https://addons.mozilla.org/en-us/firefox/addon/local-filesystem-links/
https://github.com/feinstaub/firefox_addon_local_filesystem_links
This scans for file:// links and makes them clickable. It does inject some HTML which can mess with formatting if you aren't careful, but it does the job.
In about:config You need to add a boolean value with the name network.protocol-handler.expose.file and set it to false and also create a string value with the name capability.policy.default.checkloaduri.enabled and set it to allAccess.
Now you will be able to choose C:\Windows\explorer.exe to open file links.
Tested in FF 19.0.2 in Windows 7.
Try this:
Create new boolean value with the name
network.protocol-handler.expose.file and set it to false
Create new boolean value with the name
network.protocol-handler.external.file and set it to true
Open link to a local directory and on the now appearing box, register the "file"-protocol permanently with the "file"-programm (1st entry).
There should now open the windows explorer.
You can deassociate the type "file" in the Firefox-settings (applications-tab).
After that, a link to a document (i.e. file:///x:\dir\file.doc) worked automatically for me (FF8.0).
Or You can use the Plugin "Local Filesystem Links" (DE version of the page) now.
--
edit:
Link for EN version: https://addons.mozilla.org/en-US/firefox/addon/local-filesystem-links/?src=search

Saving Meta in OS X Terminal

Since Terminal appeared I've saved as ~/mySrvr.term a modified stock .term file
which opens to execute an ssh to a remote server and to modify the appearance.
I have NOT been able to save "use option key as meta" for emacs-ery; there's no slot for it
in the term file and I'm reluctant to wrestle with a keyboard dictionary file.
Am I missing something simple? How do I get option-as-meta to stick between sessions?
Thanks
If you're on Leopard open up preferences in Terminal.app. There is a tab called Settings which is actually settings for different styles of terminal windows. Make a copy of one of Apple's defaults and change it to your liking and make sure to select the option-as-meta radio button there.
I don't even bother opening term files now, under Leopard you can save any group of windows via the Windows menu and it saves all of their settings and and you can open these backup via the same menu. For example, I have a window group that ssh's into a server in two tabs and the third tab starts up an ssh tunnel.
Not sure if this helps, but when I go Shell -> Export Settings and save the file as a .terminal file, there are a few lines that save my option-as-meta preference:
<key>useOptionAsMetaKey</key>
<true/>
These lines are for a .terminal preference file, not for a .term (which is pretty hard to Google for) so they may not be what you're looking for.

Resources