Does anyone know how I could access the Firefox preferences hash table when it is running? I want to see what preferences exist in the hash table.
I'm pretty sure it's not possible to programmatically (via web) access about:config preferences. I've found this answer, where Wesley tells the same. I couldn't yet find it in documentation that it's not possible, but I'm sure it is. If it is possible - it's a bug. A critical one.
If a browser allowed this - it would be a huge security leak. Such configs might contain vulnerable data, possibly private or even embarrasing. For example browser.newtabpage.blocked pref contains blocked about:newtab sites, a trace of user's history.
It is however possible to access preferences when driving firefox by an external software, that interacts with firefox UI. It is then perfectly OK, because a user has to initiate such an action.
Related
I'm trying to tell if a user has specific system preferences set. I.e. the app needs to know if they've given Full Disk Access, if they've selected our app under Accessibility, etc. like in the picture below.
I know we can do something like
defaults read com.apple.AppleMultitouchTrackpad
but I'm having trouble finding this out for Full Disk Access, Files and Folders, and Accessibility under Security & Privacy.
Is there a list of the com.apple.XXX somewhere?
I'm basically trying to do something like
defaults read com.apple.security.Privacy_Accessibility
I'm able to open the system preferences pane with electron like
shell.openExternal('x-apple.systempreferences:com.apple.preference.security.Privacy_Accessibility')
So I thought there might be a way similar to this for reading the settings.
To determine if accessibility access is enabled, you can use AXIsProcessTrusted and it's counterpart, AXIsProcessTrustedWithOptions. Both are part of ApplicationServices. From the documentation:
Returns TRUE if the current process is a trusted accessibility client, FALSE if it is not.
It doesn't seem possible to detect if FDA is enabled or not; there is no API for that. Some developers try to test access by attempting to read a known protected file and seeing if that works or not; but this approach is fragile and Apple does recommend against it. More discussion here.
I often have Safari open while working on a project in Xcode, looking up stuff on Stack Overflow and the like. A few times, I've searched something in to the web address/search engine field of Safari, and a word or two from what I typed in and it will be entered into the Search Navigator in Xcode, even though I didn't type it in there. It doesn't do it every time.
EDIT: Text entered in through the Search Navigator can pop up in Safari too.
This doesn't cause any problems, but the words it picks don't seem to have any relevance, and I'm curious as to why this oddity is happening.
I'm running Xcode 4.6.3, Safari 6.0.3, and Mac OS X 10.8.4
Is this a glitch? A half-baked feature?
What you are seeing is the OS X Global Find Pasteboard in action. Anywhere the private class NSFindPanel is invoked (typically in conjunction with a text field) this global pasteboard will get invoked and provides a single, central location for 'find' metadata which includes the most recent query:
In addition to communicating search strings via the find pasteboard, the standard Find panel for NSTextView also communicates search option metadata, including case sensitivity and substring matching options. This metadata is stored in a property list as the NSFindPanelSearchOptionsPboardType value on the global find pasteboard. As such, third party applications may store additional keys in this property list to communicate additional metadata as desired to support the various search options common to many third-party applications' Find panels.
from Section "Find Panel Search Metadata" in the NSTextField documentation on developer.apple.com
I believe the design intent to be, if you've performed a search in one app, there is a reasonably high probability that you'll be doing the same search in another app, so the global find pasteboard acts as a syncing mechanism between Find fields on disparate apps. For those coming from other operating systems, this would appear to be very odd behavior where the find capabilities of an app are very much sandboxed to their own process -- the most recent search term is an app-specific search term, not this global shared space.
As far as replication is concerned, you can always trigger the reported behavior by coping text to the clipboard, then pasting it into a Find field. When you switch from application to application the global find pasteboard will update the find NSFindPanel. This is why you see it going both ways between Xcode and Safari -- as both use NSFindPanel, both reference the global find pasteboard and sync up when the next time they get focus.
Unfortunately, this is not a user-configurable kind of setting; all NSFindPanels have this behavior and there is not a System Preferences or defaults preference you can set to change the behavior. Consider filing an issue with Apple at bugreport.apple.com
I'd like to be able to call a vbscript from Firefox that resides on network share. Thus it is visible to all my team members at work. Using:
<a href='file://///server/path/to/file.vbs'>run me</a>
What this script does is it grabs server side information through Samba from the client-side, and uses that information to bring up a MS Outlook new e-mail window with the HTML formatted server side (a Linux system) information filled in. I do not send the e-mail yet because I want to allow the teammate to make sure what they are about to send is correct. And we have to use Outlook. Unfortunately mailto: does not appear to allow any kind of HTML formatting, which is why I've turned to VBScript.
Seems to work in IE, although you get prompted before it allows you to run it. I guess that's OK for now. It's a little annoying having to make sure you're in IE to run it, especially for those of us who prefer not to use IE.
Right now all Firefox does is display the code contents in the browser.
I'm not even sure if I'm going about all this the right way, but from where I stand, I guess I'd like to be able to run it from Firefox. If not, I'll survive. Thanks
I don't think this is possible. Even if it is, it's probably a security risk.
To launch the script, you'll have to run "wscript.exe file.vbs", but that's not allowed otherwise Viruses can exploit this easily.
Therefore, unless you want to use some browser exploit, this will not be possible.
I have a question about my Mac program's preferences window. I have an application with a CoreData-based back end. My program includes a feature that allows users to switch out the database for a different one. I do not expect users to do this very often—perhaps once or twice a year.
Now, many of the options that users can tweak are stored in the database. These options need to be configured once every time that a new database is used, because they are specific to the database itself.
The Apple Human Interface Guidelines on Preferences state this:
As much as possible, ensure that users rarely need to reset
preferences. Ideally, preferences include settings that users might
want to change only once. If there are settings users might want to
change every time they open your app, or every time they perform a
certain task, don’t put these settings in preferences. Instead, you
could use a menu item or a control in a panel to gives user modeless
access to these settings.
My question is this: Are my database-level settings valid candidates for the preferences window? Does "once or twice a year" count as "rarely"? If not, are there any downsides to creating a second panel (with many panes that are controlled by an NSToolbar) that looks just like a preferences panel but is accessed from a different menu item ("Database Preferences" for example)?
I see database-level settings all the time under Preferences in various apps (1Password and MacJournal come to mind). Thus, Preferences often contains both database-level settings and "actual" preferences that go in a plist file. The former (the data-base level settings) is absolutely crucial, being the actual data. The latter (the plist file) isn't as important and losing this data shouldn't cause too much harm, as it's just simple settings the user can easily get back to manually.
On the other hand, I see nothing wrong with separating the two, especially if your app is a multi-window (document-based) app that can have many databases open at once.
But I do think it's simplest to just put it all into the Preferences. That's what you probably should do, unless you have a good reason to do otherwise.
To answer some of your questions directly:
Are my database-level settings valid candidates for the preferences window?
— Yeah, I think they are. And many apps (such as 1Password and MacJournal) do this too.
Does "once or twice a year" count as "rarely"?
— Yeah.
Are there any downsides to creating a second panel?
— If you have a good reason to separate the two, I see nothing wrong with it.
Just my two cents.
We have an intranet site on our corporate network (SharePoint 3). If I look at it via Internet Explorer - I'm already logged in. If I look at it using Firefox I have to enter my windows username & password.
My questions is this:
Why is there this discrepancy between the browsers? Does Microsoft have some proprietary plugin in IE that can enable this auto login? Can I achieve auto-login in Firefox?
Many thanks.
Open Firefox and type “about:config” in the address bar.
In the ‘Filter’ field type the following “network.automatic-ntlm-auth.trusted-uris”
Double click the name of the preference that we just searched for
Enter the URLs of the sites you wish to pass NTLM auth info to (comma separated)
This is the equivalent to adding the site to the Intranet zone in IE.
This is because Firefox doesn't do a great job of supporting NTLM, also known as Windows Authentication. If you search for firefox ntlm you will find plenty of resources that give you options on how this can work.
I change workplaces every six months or so and have never been able to get this to work reliably. Sometimes it's flawless, other times I always get prompted no matter what. They are slowly improving the support with newer Firefox versions however, so you might like to try a complete uninstall and reinstall of Firefox as well.
Basically, set the network.automatic-ntlm-auth.trusted-uris option in about:config to a comma separated list of host names you want to NTLM with.
I'm not sure if there's a better way to trust all machines on the lan like in IE.