XYMer's Home away from Home

When http://bbs.xlr8yourmac.com is down (i.e. always)
It is currently Fri Dec 15, 2017 11:09 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Need some Unix help
PostPosted: Thu Nov 30, 2017 2:28 pm 
Offline

Joined: Sat Apr 11, 2009 2:15 pm
Posts: 6022
Location: NYC
Occasionally use Safari in El Cap, which had been updated to 11.0.1 a few weeks ago. Upon opening that version, the home page, which had been set for years to about:blank had been overtaken with a completely obnoxious animated ad for the iPhone X. Couldn't find any way to get rid of it, but found the following command at ASC, which was supposed to do the job:

sudo dscl . mcxsetdelete /Users/USERName com.apple.Safari HomePage always -string "ADDRESS"

OK, after doing that, the home page showed something along the lines of:

Attachment:
Screen Shot 2017-11-09 at 11.08.03 AM.png
Screen Shot 2017-11-09 at 11.08.03 AM.png [ 19.17 KiB | Viewed 113 times ]



Which was a whole lot better than that intrusive Apple ad, but still not the blank page it had been before.

Next, found the following at ASC to reverse that command:

sudo dscl . mcxdelete /Users/USERNAME com.apple.Safari HomePage

Which still didn't work, leaving the following in Preferences>General http;//address/ for home page, which can't be altered no matter what i try.

Attachment:
Screen Shot 2017-11-09 at 11.08.20 AM.png
Screen Shot 2017-11-09 at 11.08.20 AM.png [ 105.66 KiB | Viewed 115 times ]


The reason why I'm trying to completely undo the results of these two commands, is that, in Safari 11.0.1 in Sierra, which I keep on an external, when that obnoxious ad first appeared taking over the home page, as it did in Safari El Cap, I was simply able to add about:blank back in, and it worked successfully. No idea why it didn't in Safari El Cap, but want to give it another try, provided I can undo the work of those two previous commands.

Bottom line question then is, since sudo dscl . mcxsetdelete /Users/USERName com.apple.Safari HomePage always -string "ADDRESS" didn't really work, what is the proper way to reverse that first command sudo dscl . mcxsetdelete /Users/USERName com.apple.Safari HomePage always -string "ADDRESS"

No emergency with this, since I don't use Safari all that much, and I can live with the home page as it is now, but out of curiosity, wonder how this can be done.


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Thu Nov 30, 2017 9:58 pm 
Offline

Joined: Sun Nov 05, 2017 7:07 pm
Posts: 48
Hi WZZZ

What does dscl . mcxread /Users/WZZZ show ?
changing WZZZ for your account name, of course :shock:

It would normally give an empty result, for a std or admin user without any managed client settings.

You can probably see them from the GUI in Directory Utility - Directory Editor : select a user in the left pane, then see if there's an entry for MCXSettings, right below JPEGPhoto


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Thu Nov 30, 2017 10:03 pm 
Offline

Joined: Sun Nov 05, 2017 7:07 pm
Posts: 48
Directory Utility is here : /System/Library/CoreServices/Applications/Directory Utility.app

or from System Preferences - Login Options - Network Account Server - Join… - Open Directory Utility...


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Fri Dec 01, 2017 6:12 am 
Offline

Joined: Sat Apr 11, 2009 2:15 pm
Posts: 6022
Location: NYC
Thanks ab, not sure where you're going with this, but

command dscl . mcxread /Users/user name shows empty, as you predicted. No MCXSettings, only MCXFlags

Attachment:
Screen Shot 2017-12-01 at 8.50.53 AM.png [172.44 KiB]
Not downloaded yet


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Fri Dec 01, 2017 7:51 am 
Offline

Joined: Sun Nov 05, 2017 7:07 pm
Posts: 48
Only going where we might find a reason for your HomePage being 'fixed' .

I'm glad that I mentioned Directory Utility, since it's been years, and I'd forgotten about MCXFlags. Sierra's Guest & other managed users don't create that, at least not via Parental Controls, but it doesn't include specifics beyond simultaneous login & 'are there any mcx settings ?' AFAIK… but I might try removing that anyway,

Does another user also have fixed HomePage ?.
defaults read com.apple.safari HomePage : this returns '…does not exist' ?

HomePage isn't actually stored there any more, but trying to cover bases.


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Fri Dec 01, 2017 6:13 pm 
Offline

Joined: Sat Apr 11, 2009 2:15 pm
Posts: 6022
Location: NYC
Quote:
Does another user also have fixed HomePage ?.
defaults read com.apple.safari HomePage : this returns '…does not exist' ?

I'm the only user and run standard with admin accounts for authentication. Interestingly, logged into one of the almost "virgin" admin accounts, and found Safari 11.0.1 home page as it was before I ran either of those commands. (Immediately unchecked "open safe files after...," even though I will never use Safari there.) Get "does not exist" from defaults read com.apple.safari HomePage

Attachment:
Safari homepage admin user.png
Safari homepage admin user.png [ 106.51 KiB | Viewed 87 times ]

Quote:
are there any mcx settings ?AFAIK… but I might try removing that anyway,

Removed that, but didn't help.

No parental controls set or managed account. For reference sake this is the thread at ASC (my post tacked onto the end) where I found those commands, including the suggestion to delete the Profile in Sys prefs, which doesn't exist for me. Of course, /System/Library/Profiles.prefPane on open produces "no profiles installed."
https://discussions.apple.com/thread/8059123


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Fri Dec 01, 2017 7:55 pm 
Offline

Joined: Sun Nov 05, 2017 7:07 pm
Posts: 48
A new account or upgraded Safari having HomePage set to …apple.com/startpage/ is normal or at least common; being unable to change it, isn't.

In your 'almost "virgin" admin account' : can you change HomePage ?.

I'm trying to see if it only affects your usual account, or others too. The command you originally ran (mcxset) forces & locks the setting for just the one user; and yours appears to have been removed (presumably, a restart followed).

'Set to Current Page' is grayed out until you visit a webpage, then switch to Preferences; the URL should be removable regardless.

The HomePage setting after starting Safari for the first time in an account is now usually stored in ~/Library/Keychains/…[long alphanumeric hardware ID]…/ keychain....db-wal but I don't (didn't?) think that it had any means to 'lock' it.


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Sat Dec 02, 2017 6:55 am 
Offline

Joined: Sat Apr 11, 2009 2:15 pm
Posts: 6022
Location: NYC
Works OK to set about:blank for homepage in admin user. As it works there and since it works in my Sierra Safari, no idea why it wouldn't let me set about:blank the first time I was presented with the ad and apple.com/startpage/ as the URL for the homepage in my main El Cap user. I tried multiple times, and if I recall, even tried setting it to "current page" but couldn't get rid of that horrible animation. Thinking that the second command I ran sudo dscl . mcxdelete /Users/USERNAME com.apple.Safari HomePage actually made things worse, because, even though I'm presented with the option to set current page as homepage, it always reverts to http://address/

Update:

Successful workaround: ran the following sudo dscl . mcxset /Users/username com.apple.Safari HomePage always -string "ABOUT:BLANK" (instead of about:blank, since that wouldn't enter properly at the command line--not sure why it demands upper case there, you probably know why--and restarted. Now have an empty home page, with ABOUT:BLANK greyed out, and about:BLANK in the URL field. I can completely live with this. Nice empty page, just the way I like it. Not going to let the perfect be the enemy of the good enough. Thanks for all the help with this.

Attachment:
Screen Shot 2017-12-02 at 10.10.04 AM.png [72.82 KiB]
Not downloaded yet




Attachment:
Screen Shot 2017-12-02 at 10.10.24 AM.png
Screen Shot 2017-12-02 at 10.10.24 AM.png [ 101.5 KiB | Viewed 77 times ]


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Sat Dec 02, 2017 3:13 pm 
Offline

Joined: Sun Nov 05, 2017 7:07 pm
Posts: 48
Odd eh. Well done finding something good enough.


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Sat Dec 02, 2017 3:18 pm 
Offline

Joined: Thu Jul 05, 2012 4:02 pm
Posts: 1039
Location: Melbourne
WZZZ, you could also try using just empty quotes after the -string ""
This signifies no information, which may give you what you need.

Eg. if editing an exif tag and one wanted to delete the comment, adding "" to the command achieves that. Might work for you.
Note: there is no space between the quotes.


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Sun Dec 03, 2017 9:06 am 
Offline

Joined: Sat Apr 11, 2009 2:15 pm
Posts: 6022
Location: NYC
Interesting idea roam, thanks, but I think I'm going to leave well enough alone, for now.


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Mon Dec 04, 2017 2:36 pm 
Offline
User avatar

Joined: Thu May 15, 2008 8:13 pm
Posts: 9628
Location: Caught between the moon and NYC
If it helps at all, when I issue sudo dscl . mcxread /Users/username com.apple.Safari Homepage I get nothing in return, it immediately goes to the next line without returning any information.

Given that I think that value isn't supposed to be there by default. In theory sudo dscl . mcxdelete /Users/username com.apple.Safari Homepage should delete the value.

I would be very hesitant to do that without a good backup however.

My familiarity OS X's default directory stems from NeXT and Apple has diverged greatly since then. All I do periodically is to tie it to an LDAP server for authentication, and that's not really messing with the built-in service, just adding an external service to directory services. I know there's an actual name for the built in service but it escapes me now... dates back to NeXT... tip of my tongue kind of thing. Argh.


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Tue Dec 05, 2017 7:52 am 
Offline

Joined: Sat Apr 11, 2009 2:15 pm
Posts: 6022
Location: NYC
Tried with absolutely no effect: sudo dscl . mcxdelete /Users/username com.apple.Safari Homepage

Then, in a WTF moment, tried: sudo dscl . mcxset /Users/usernamecom.apple.Safari HomePage always -string ""

That one left the homepage button completely inoperable, greyed out, and everything in Prefs>General>homepage empty/greyed out, with no way to enter anything.

Restored using /Users/username com.apple.Safari HomePage always -string "ABOUT:BLANK"


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Tue Dec 05, 2017 12:24 pm 
Offline

Joined: Thu Jul 05, 2012 4:02 pm
Posts: 1039
Location: Melbourne
I'm glad no damage was done. About:blank it shall be.


Top
 Profile  
 
 Post subject: Re: Need some Unix help
PostPosted: Tue Dec 05, 2017 1:13 pm 
Offline

Joined: Sat Apr 11, 2009 2:15 pm
Posts: 6022
Location: NYC
Yeah, no harm done. Had a backup in place, so was willing to try almost anything. Wonder what will happen, though, with the next major
Safari upgrade. If it will go back to that apple startpage nonsense, or keep about:blank.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group