Log in

entries friends calendar profile Apple - Mac OS X Previous Previous Next Next
is it possible to have safari default to private browsing? - X times the power, X times the fun!
Read the community rules!
is it possible to have safari default to private browsing?
I'm curious about this for helping protect the hapless users of a computer lab...is there any way to force Safari to always launch in "Private Browsing" mode on a Mac? It's fine if the user is able to change it back themselves if they want to, I'd just prefer it if I could make it launch that way initially. It would be ideal for it to do so without the warning dialog popping up, since that would just confuse some people.

I know in Firefox I can set all private data to be deleted on close and disable any warning dialogs, but in Safari I haven't been able to figure it out yet. Something as simple as editing the preferences file doesn't seem to help, as Safari appears to set the appropriate key to False when it launches (even if you set it to True beforehand).

Any ideas? So far all I've found in searches is other people asking the question and "suggestions" that don't work.

ETA - So far the only workable solution I've found is to replace Safari in the dock with a wrapper script which launches the application (which always sets defaults write com.apple.safari WebKitPrivateBrowsingEnabled 1 to false) and then subsequently uses the defaults command to set WebKitPrivateBrowsingEnabled to true. This seems inelegant though, anything better?
6 comments or Leave a comment
From: beelsebob Date: August 6th, 2008 05:47 pm (UTC) (Link)
I'm not sure how to do it -- but I'm also not sure you want it. Bear in mind that if you enable it the user will *never* be able to get at *any* of their history (including their current session), and will not get things like address prediction. You're better off just educating your users about good security.

khyron From: khyron Date: August 6th, 2008 05:50 pm (UTC) (Link)
I appreciate the advice, but this isn't a general purpose lab and I'm not concerned about as many use cases as one might think. I'm making changes very slowly as a new guy right now, and in a situation where the machines are not cleaned/rebooted/reimaged as often as one would presume, this would just be a small and perhaps temporary step towards potentially having less personal information floating around on them.
cryo From: cryo Date: August 6th, 2008 06:53 pm (UTC) (Link)
hmm. Can you make them all use the Guest account? That would delete everything on their logout (as well as enforcing logout).

khyron From: khyron Date: August 6th, 2008 06:56 pm (UTC) (Link)
None of these machines are even running Leopard, sadly (and they are all 64-bit!).

One thing at a time...

xv From: xv Date: August 7th, 2008 12:20 am (UTC) (Link)
Is it possible to modify the plist and then set its permissions so Safari can't modify it at launch? I think I would prefer to use a background script (or a remote script) to check the plist regularly, as that would cover more Safari launches than just from the dock.
khyron From: khyron Date: August 7th, 2008 02:14 pm (UTC) (Link)
Amusingly enough, that didn't work. I just tried it, and Safari's behavior was the same even though the read-only prefs file had WebKitPrivateBrowsingEnabled set to true. Safari seems bound and determined to have that preference set to false on startup...I wonder if there's some way to debug Safari to change that?
6 comments or Leave a comment