Mac での利用で、UIを非表示にしてユーザーに配備したい
現象
Mac での利用で、新規ユーザーが初回ログイン時に表示される UI を非表示にしたい。
診断
デフォルトでは、弊社Mac製品をインストールされますと、その後ログインされるユーザーのデスクトップ画面に、弊社製品のステータスが表示されます。
解決策
管理者として弊社製品をインストール→ユーザーへの配備作業のために、一般ユーザー作成しますと、初回ログイン時に弊社製品のステータスUIが表示されます。
こちらは管理ユーザーにて製品インストール後、以下手順により非表示にして頂けます。
1 ターミナルを利用して以下内容にて任意のフォルダにシェルスクリプトファイルを作成
(例:/tmp/workaround.sh)
#!/bin/bash
cat > "/Applications/F-Secure/F-Secure Mac Protection.app/Contents/MacOS/fscuif-wrapper" << EOF
#!/bin/bash
defaults write "com.f-secure.F-Secure ControlLayer-\${UID}" ui_shown -bool YES
mydir="\`dirname \\"\$0\\"\`"
exec "\${mydir}/fscuif" "\[email protected]"
EOF
chmod +x "/Applications/F-Secure/F-Secure Mac Protection.app/Contents/MacOS/fscuif-wrapper"
sed -i '.bak' 's/<string>fscuif<\/string>/<string>fscuif-wrapper<\/string>/' /Applications/F-Secure/F-Secure\ Mac\ Protection.app/Contents/Info.plist
touch /Library/F-Secure/fsmac/config/suppress-postinstall-dialog
2 以下コマンドにて上記シェルを実行
$ sudo bash -xe /tmp/workaround.sh
3 エラーの無い場合、以下のような出力がされます
FSAPPLE1704:tmp administrator$ sudo bash -xe /tmp/workaround.sh
Password:
+ cat
+ chmod +x '/Applications/F-Secure/F-Secure Mac Protection.app/Contents/MacOS/fscuif-wrapper'
+ sed -i .bak 's/<string>fscuif<\/string>/<string>fscuif-wrapper<\/string>/' '/Applications/F-Secure/F-Secure Mac Protection.app/Contents/Info.plist'
+ touch /Library/F-Secure/fsmac/config/suppress-postinstall-dialog
FSAPPLE0000:tmp administrator$
4 上記実行後に作成されますユーザアカウントでの初回ログイン時に、UIの表示がされなくなります。
※注意 上記スクリプト動作前に作成済のユーザアカウントには、影響がありません。