Tuesday, June 18, 2019

#1 2019-02-19 10:17:21 am

smr1619
Member
Registered: 2019-02-15
Posts: 2

Applescript to change homepage

I ran the write command to change the safari homepage and then I ran the read command and it showed the new homepage. When I open safari, it didn't change.

defaults write ~/Library/Preferences/com.apple.Safari.plist HomePage http://mysite
defaults read~/Library/Preferences/com.apple.Safari.plist HomePage

Offline

 

#2 2019-02-20 05:41:28 am

Nigel Garvey
Moderator
From:: Warwickshire, England
Registered: 2002-11-20
Posts: 4880

Re: Applescript to change homepage

Hi.

Where did you get those commands? There's no "com.apple.Safari" domain on my Mojave system. There is one on my El Capitan machine, but it contains neither a "HomePage" key nor any mention of my Safari home page. On my Mojave system, it's possible to read the home page setting from "com.apple.Safari.SandboxBroker", but setting it that way doesn't seem to be entirely effective — which is good. It would be an obvious security issue if a script were able to change a brower's default home page!


NG

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)