Apple Canadian Settings through MCX

Background

I was tired of looking at my end-user’s screens and calling up “Managed Software Center” rather than “Managed Software Centre.” I figured I would enforce both the system-wide language setting, as well as enforce keyboard layouts to include both Canadian English and Hebrew.

Those are kept in two files.

com.apple.HIToolbox.plist holds the Keyboard settings
.GlobalPreferences.plist holds the language settings

The leading . means that it’s an invisible file, but you can use the terminal to copy it to another location:

cp ~/Library/Preferences/.GlobalPreferences.plist /PATH/TO/GlobalPreferences.plist

If you notice that in the second path, I removed the leading . to make it visible.

.Plist setup

The keyboard settings file just need to be setup on a test machine, and then copied, and it will work as is.

When I set it up with the Canadian English keyboard and Hebrew keyboard, it looks like this…

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>AppleCurrentKeyboardLayoutInputSourceID</key>
<string>com.apple.keylayout.Canadian</string>
<key>AppleDateResID</key>
<dict>
<key>smRoman</key>
<integer>0</integer>
</dict>
<key>AppleEnabledInputSources</key>
<array>
<dict>
<key>InputSourceKind</key>
<string>Keyboard Layout</string>
<key>KeyboardLayout ID</key>
<integer>29</integer>
<key>KeyboardLayout Name</key>
<string>Canadian</string>
</dict>
<dict>
<key>InputSourceKind</key>
<string>Keyboard Layout</string>
<key>KeyboardLayout ID</key>
<integer>-18432</integer>
<key>KeyboardLayout Name</key>
<string>Hebrew</string>
</dict>
</array>
<key>AppleInputSourceHistory</key>
<array>
<dict>
<key>InputSourceKind</key>
<string>Keyboard Layout</string>
<key>KeyboardLayout ID</key>
<integer>29</integer>
<key>KeyboardLayout Name</key>
<string>Canadian</string>
</dict>
</array>
<key>AppleNumberResID</key>
<dict>
<key>smRoman</key>
<integer>0</integer>
</dict>
<key>AppleSelectedInputSources</key>
<array>
<dict>
<key>InputSourceKind</key>
<string>Keyboard Layout</string>
<key>KeyboardLayout ID</key>
<integer>29</integer>
<key>KeyboardLayout Name</key>
<string>Canadian</string>
</dict>
</array>
<key>AppleTimeResID</key>
<dict>
<key>smRoman</key>
<integer>0</integer>
</dict>
</dict>
</plist>

The GlobalPreferences.plist had a lot of superfluous settings in it that could be eliminated. So I slimmed it down to as follows. As you can see, AppleLanguages is an array with many entries and it starts with “en-CA”, or Canadian English, then American English, Hebrew, and then French. The rest is superfluous.

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>AppleLanguages</key>
<array>
<string>en-CA</string>
<string>en</string>
<string>he</string>
<string>fr</string>
<string>de</string>
<string>zh-Hans</string>
<string>zh-Hant</string>
<string>ja</string>
<string>es</string>
<string>it</string>
<string>nl</string>
<string>ko</string>
<string>pt</string>
<string>pt-PT</string>
<string>da</string>
<string>fi</string>
<string>nb</string>
<string>sv</string>
<string>ru</string>
<string>pl</string>
<string>tr</string>
<string>ar</string>
<string>th</string>
<string>cs</string>
<string>hu</string>
<string>ca</string>
<string>hr</string>
<string>el</string>
<string>ro</string>
<string>sk</string>
<string>uk</string>
<string>id</string>
<string>ms</string>
<string>vi</string>
</array>
</dict>
</plist>

You’ll then need to rename the file to include the leading . using the cp tool in the terminal.

Convert to PKG and Deployment

For deployment, I use a wonderful open source program called Munki. You can use anything that will deploy profiles. Munki doesn’t, but it deploys pkg files.

To make this MCX file I need two programs developed by Tim Sutton, mcxToProfile and make-profile-pkg.

I’ve got those two setup on my Munki server

./PATH/TO/mcxToProfile.py –plist /PATH/TO/com.apple.HIToolbox.plist –plist/PATH/TO/.GlobalPreferences.plist -i Canada\ Settings -g Organization -o /PATH/TOCanadaSettings.mobileconfig –displayname ‘Canadian Settings’ -m Once

What this is doing is calling to the python script mcxToProfile, telling it to pick up the two plists com.HIToolbox.plist and .GlobalPrefernces.plist, telling it to identify as “Canada Settings” with the organization name “Organization.” Then it uses -o to know where to spit the mobileconfig file to, including a display name and how to be managed. I want my end users to be able to customize it after first use, so we use the Once flag.

This output my .mobileconfig file. So I could quickly double-click on it and it works! However, that’s not going to help me deploy it to 200+ computers. So I need to get it into Munki, first it needs to be a PKG.

./PATH/TO/make_profile_pkg.py -m /PATH/TO/CanadaSettings.mobileconfig

This python script is pretty straightforward. You call it, tell it that you want it to dump into your Munki repo (-m) and then tell it the path to your mobileconfig file. A few seconds later, it’s in your repo and a duplicate PKG is in the directory that your mobileconfig is sitting at.

Now all you need to do is throw it into the appropriate testing manifest, make sure it works, and then slowly roll it out to your fleet.

Future Is The Future

Once upon a time, I did a mini photoshoot with my buddy Natalia.

NataliaTwo4

Now she is starting a clothing store and wanted pictures in a similar style. I CAN DO THAT! And I did… here, look at pictures.

Visit Future Is The Future.

IMG_5213 IMG_5244 IMG_5329 IMG_5397 IMG_5409 IMG_5481 IMG_5497 IMG_5638 IMG_5649 IMG_5707 IMG_5825 IMG_5849 IMG_5870

Wonderwall

Apple Years

 

Between 1968 and 1975, George Harrison released six albums on the Beatles’ record label, Apple. The first record Harrison released was called Wonderwall Music, it was the soundtrack to a film directed by Joe Massot called Wonderwall. Maybe I should watch this film then.

Wonderwall tells the story of obsession. A scientist is obsessed with his work. His life revolves around it and he doesn’t notice anything around him. Not his coworkers, not his apartment. He lives amongst the stacks of papers that line the walls of his apartment.

Suddenly, in a rage, Professor Collins knocks a frame off his wall, exposing a hole. Through this hole he spies in neighbour. His boring life is exposed, and Professor Collins gets a glimpse into the swinging sixties.

Collins begins obsessing over Penny Lane, the woman next door, and the life lived by her and her boyfriend. Collins wishes he could be there living that life. Instead he’s stuck inside his own life. Living alone.

Wonderwall is more of a sketch than a film. There’s an unfinished quality to the story. There’s very little dialogue, Lane never speaks1, and we drift off into these fantasies of Collins’ mind. The fantasies are more reflective of the hippy genre than it is of the character’s senses. While he wishes to be a part of swinging London, he’s not on acid, leaving the audience wondering where these drug-fueled visions are coming from.

While Jane Birkin gets top billing as Penny Lane, she never speaks. Her role is to look beautiful and for Collins to leer. The brief moments of semblance of a characters are glossed over. We learn a brief moment of her life, slightly more than Collins knows. There’s an interesting question there: should the audience see more than Collins sees or should the audience see everything? I’d opt for everything make her a full character, but Massot goes for neither. The director instead shows us a quick glimpse into a possible world of Lane’s; never making her a full character, but making her more than Collins’ obsession. It’s a strange middle ground to be in, a horrible middle ground.

WonderwallConsent is barely touched upon within the film. We see that Collins understands what he is doing is wrong, but continues to invade Lane’s privacy. Collins has a vision of his dead mother shaming him for his inappropriate actions, but never touches upon this again.

Making matters worse, Massot has Collins become the hero of the film. He saves Lane’s life seemingly justifying his actions.

This is where we truly see how poor of a filmmaker Massot is. None of the characters evolve or change, and the actions they take, the bad, horrible actions they take, never go unpunished, instead get rewarded. These actions are not rewarded for social commentary, but seemingly are rewarded due to lazy writing. Collins becomes a hero for breaking into Lane’s apartment, he ends up calling the police and cheating the woman out of the death she desires.

Collins doesn’t break into Lane’s apartment to save her. Instead he breaks in to be a creepy stalker. He just happens to come across her dying.

I don’t think the film will ruin my appreciation for the album Wonderwall Music. Well it’s not a well known album, it’s a great one. It’s nothing like any of George Harrison’s other works and shines because of it. Harrison experiments with Indian ragas and musical tropes he never had the ability to experiment with in The Beatles or as a pop musician.

Harrison’s work fitted the film quite wonderfully. While much of the film didn’t have any form of dialogue, Harrison’s soundtrack created a soundscape that helps transport the viewer away from the mundane as Collins’ wonderwall does for his boring life.

  1. I’ll get back to that shortly []

Doctor Who Serial 060 – Day of the Daleks

Synopsis: Jon Pertwee’s Doctor faces his first Dalek invasion. There’s a man who is organizing a peace conference. An assassination attempt is made. The failed assassin vanished. The Doctor is called.

The Doctor feels, the smartest course of action would be to stay at the haunted house and drink some wine.

vlcsnap-2014-09-01-17h55m31s68

I knew there was a reason I liked Doctor Who. Jo and The Doctor relax and suddenly are faced with a break in by a guerrilla army. They discover that this militia is a group of rebels who are revolting against a Dalek invasion in the 22nd century. The Daleks are using a lower species (who look like Klingons) to be their pawns in this war against the Humans.

vlcsnap-2014-09-01-17h58m05s46

It’s odd because we know in the 22nd century Klingons will make their way to Earth, leading to an early launch of the USS Enterprise NX-01.  In addition, the future rebels use a time machine that looks conspicuously like a tricorder. I’m pretty sure that this is a Star Trek crossover.

vlcsnap-2014-09-01-17h59m23s66

We also find The Doctor fighting a Dalek invasion in the 22nd century. Something that happened once before. It make me wonder if The Doctor is interfering with events that he once fixed already. I do wonder if this is something that was planned before or not.

Overall, this wasn’t the greatest episode. It was silly, but not that exciting, most of the action involved The Doctor with his feet up. Also compared to Into The Dalek which aired a two days ago, it falls on its face. But we’re not at the point where we’re reviewing Capaldi episodes. that’ll have to wait. In the meantime… here’s a clip from The Two Doctors.

vlcsnap-2014-09-01-17h55m16s110

Doctor Who Serial 059 – The Daemons

Synopsis: I don’t really know what this is about. The Master decides that the way to take over the universe is to become a vicar.

vlcsnap-2014-08-27-22h13m48s122

In this story, The Doctor keeps on bemoaning how impossible it is to make Jo Grant a scientist. I have no idea why he’s trying. Someone smarter than The Doctor calls her an idiot. I fully approve.

The Doctor is trying to explain that any science significantly advanced seems like magic. People don’t seem to understand this stuff, and it’s baffling. A car moving on its own isn’t a crazy magic. Are the ’70s so far in the past that we are so disconnected from the manner of thought of those alive only forty years ago.

vlcsnap-2014-08-27-22h15m00s42

 

The best part, hand down, is when The Master gives the devil’s horns. The Master is totes metal.

DOCTOR WHO SERIAL 058 – Colony In Space

Synopsis: In the 25th century, an Earth colony is facing dire times. Their food won’t grow, they’re being attacked by lizards, and worries of Earth miners plague their thoughts.

Jo Grant

Oh hi! It’s been a while. Sorry.

Apparently I misunderstood some of the events of  “Claws of Axos”  and The Doctor cannot leave Earth. The Time Lords, however, feel they need to use The Doctor as their pawn, so they allow him to visit an Earth colony facing crisis. After watching the first episode the bit that stands out most is the line, “There was no animal life, just birds and insects.” Aren’t birds and insects animal life? Then later the same person talks to the native aliens. Yeah, there’s these people, but they don’t count as animals, do they? I still don’t like Jo.

Primitives steal the TARDIS

This story shows the worst side of Doctor Who‘s Britishness. They discuss the “Primitives” in a way that shows their ignorance, and their colonial attitudes. It’s obvious the writers display a thought of British colonization is the the past and the future, that the reality of the sun setting on the British Empire is just a minor setback.  As someone from one of those colonies, the damage of British superiority is very obvious in many ways. We could discuss the Harper government’s dismissals of the plague of missing Aboriginal women, the reverse course on Aboriginal issues after apologizing for tragic history of residential schools. Yet here we see a group dubbed “the Primitives” who are obviously intelligent. They communicate with a species from another planet without any help, and yet the British colonists talk down to them as if they’re three years old. Even The Doctor is condescending to the “Primitives” who performs magic to distract a guard and escape. Only problem is… MAGIC DOESN’T WORK IF THEY CAN READ YOUR MIND.

The Master shows up in part four. Not surprising as he’s quite popular lately. The trial is somehow reminding me of the trial of Louis Riel. Now there’s a good subject to be the basis of a Doctor Who episode.

THERE’S A MUD WRESTLING SCENE IN EPISODE SIX! Sorry.

Save PDFs with one Click in FileMaker

It suddenly came to me that I could probably automate a process I do every time I purchase something for work.

Every time I create a purchase order, I then go to Print and choose “Save as PDF” and then browse to “~/Documents/Purchase Orders/<<Current Fiscal Year Expressed as Hebrew Year>>/<<PO#>> – <<Supplier>>.pdf”

I did a quick second of Googling and found this. So I took that and modified it slightly…

Set Variable [$year; Value:If(Month ( Purchase Orders::Date ) > 6; Year ( Purchase Orders::Date ) + 3761; Year ( Purchase Orders::Date ) + 3760)]

Set Variable [$path; Value:”filemac:/Macintosh HD/Users/<<username>>/Documents/Purchase Orders/” & $year & “/” & Purchase Orders::PO# & ” – ” & Purchase Orders::Supplier & “.pdf”

Print Setup [Restore; No dialog] #Damn Americans don’t know how to spell dialogue

Save Records as PDF [Restore; No dialog; “$path”; Current record]

First it sets the year to 5775 (using the current date 8/8/14). Since I work in a Jewish day school, I organize my files by the Hebrew year. The vast majority of the fiscal year falls into 5775.

Second it sets the $path variable to filemac:/Macintosh HD/Users/<<username>>/Documents/Purchase Orders/5775/1111 – Apple Canada.pdf

This wouldn’t work so well if it was a multiuser database, but I’m the only one who uses it. That file that the fourth step outputs sits in a folder which is synced to our financial administrator’s via BitTorrent Sync.

Work Portraits

I was asked to photograph my coworkers for a magazine we publish, I thought I’d share…

Hailey

Rhonda

Cheryl

Debby Linda Evert Tara Adam Brenda G. Tandie Rachel Louise Brenda C

Recollection Volume 38 – Sun Wizard

Recollection is a project to review my record collection. I will listen to an album I own and review it. The album will be chosen randomly by computron. Today computron chooses…

Album: Sun Wizard
Artist: Sun Wizard
Released: 2010
Format(s) I own it on: CD

SunWizard-Comp2In 2010, I went to Vancouver and had a great time. While I was there I went into a record store, talked to a clerk and asked him to suggest some awesome local Vancouver bands I might not have heard of. He set me up with a CD player and gave me a listen to a few records. Amongst them was this one. If I recall correctly, he was in the band.

It’s a five track EP in the vein of Wilco’s Summerteeth days. In other words, poptastic with a splash of alt-country. Sun Wizard’s instrumentation is in fine form and vocals are great.

I don’t quite understand the “Compact Disc” logo on the front, seeing as it was released in 2010, not 1988, but I do love the plaid shirt. Who doesn’t love plaid? My nationality might be shining through.

This is an EP I’d suggest to nearly anyone.

Highlights

“Day In Day Out” is one of those rock and roll songs you want to move to. Would have fit well in the 1990s alt country scene, or the 1970s.

The hand claps on “You Had The Answer!” I could see them opening for ’90s-era Sloan with this song.

Lowlights

A pretty solid EP, not going to put anything here.

Men 30.625 (81%) | Women 7.375 (19%)
CD: 22.5 (59%) | Vinyl: 12.5 (33%) | Digital: 0 (0%) | 7″: 2 (5%) | Box: 1 (3%)
1960s: 4 (11%) | 1970s: 2 (5%) | 1980s: 1 (3%) | 1990s: 11 (29%) | 2000s: 17 (45%) | 2010s: 3 (8%)
Canada 11.8 (31%) | USA 16.2 (43%) | UK 8 (21%) | NZ 1 (3%) | FR 1 (3%)
Ontario 4 (33%) | Quebec 1 (8%) | Nova Scotia 4 (33%) | New Brunswick 1 (8%) | Manitoba 0 (0%) | British Columbia 1 (8%) | Prince Edward Island 0 (0%)
Saskatchewan 0 (0%) | Alberta 0 (0%) | Newfoundland and Labrador 1 (8%) | Northwest Territories 0 (0%) | Yukon 0 (0%) | Nunavut 0 (0%)

Recollection Volume 37 – From A Love To A Friend

Recollection is a project to review my record collection. I will listen to an album I own and review it. The album will be chosen randomly by computron. Today computron chooses…

Album: From A Love To A Friend
Artist: Paul McCartney
Released: 2001
Format(s) I own it on: CD

28a5e83I believe I bought this CD single when I bought my copy of Driving Rain. I assume I never heard the single before purchasing it as I never recall liking this terrible, terrible song.

Fortunately, I own a CD with not one, but three versions of this song. So let’s listen again…

I think a lot of what makes me hate this song so much is that it seems to start out of nowhere. I think it might have to do with starting a song with the word “and.” It’s much how I feel about his more popular hit “My Love.” And yet as the song plays, I sing along. It does have a catchy chorus and melody, but that’s McCartney’s trademark.

It’s strange, I like the bass line and the melody, and McCartney’s vocals are somewhat weak, as if he’s in pain to sing it. It’s almost beautiful, but yet it doesn’t form into a cohesive song.

The other two tracks on the CD are remixes. The first places McCartney’s vocals in the forefront, keeps the instrumentation sparse. While the bass is preserved, the piano which drives the song is missing. I can’t say I’ve listened to this version of the song more than once, and I don’t see any reason to listen to it again.

The second remix begins with sparse piano. It kind of picks up my soul and gives me faith in the song. The vocals are buried and have too much reverb happening, but it seems David Kahne’s second remix is much better at finding the beauty in this song.

There’s something magical in this song that just isn’t shining in any of these recordings or mixes. It truly could be something spectacular, but falls flat. A man who lost his wife to cancer pleading “let me love again.”

Now I want to listen to Driving Rain, which is a good record.

Men 29.625 (80%) | Women 7.375 (20%)
CD: 21.5 (58%) | Vinyl: 12.5 (34%) | Digital: 0 (0%) | 7″: 2 (5%) | Box: 1 (3%)
1960s: 4 (11%) | 1970s: 2 (5%) | 1980s: 1 (3%) | 1990s: 11 (30%) | 2000s: 17 (46%) | 2010s: 2 (3%)
Canada 10.8 (29%) | USA 16.2 (44%) | UK 8 (22%) | NZ 1 (3%) | FR 1 (3%)
Ontario 4 (36%) | Quebec 1 (9%) | Nova Scotia 4 (36%) | New Brunswick 1 (9%) | Manitoba 0 (0%) | British Columbia 0 (0%) | Prince Edward Island 0 (0%)
Saskatchewan 0 (0%) | Alberta 0 (0%) | Newfoundland and Labrador 1 (9%) | Northwest Territories 0 (0%) | Yukon 0 (0%) | Nunavut 0 (0%)