MacOS X Tips: Difference between revisions

Jump to navigation Jump to search
5,028 bytes added ,  9 September 2022
no edit summary
No edit summary
No edit summary
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
*雑多なメモ
Magic Mouse 買った。マウスの軌跡の加速度合いが気に入らないので調べた。
<syntaxhighlight lang="bash" enclose="div">
defaults write .GlobalPreferences com.apple.mouse.scaling -1
</syntaxhighlight>
情報では "-1" というのがほとんどなんだが "-3100" があるので調査中。
https://logs.paulooi.com/how-to-set-to-the-best-mouse-sensitivity-for-apple-magic-mouse.php
結局都市伝説だったらしい。わたしゃ2.5かな
https://discussions.apple.com/thread/252930818
最終的に linearmouse 使うことにした。
https://linearmouse.org/
で 0, 0.31
*雑多なメモ
https://apple.stackexchange.com/questions/434362/mac-m1-how-to-copy-dylib-file-to-usr-lib-in-macos-big-sur
*雑多なメモ
<syntaxhighlight lang="bash" enclose="div">
sudo /usr/libexec/ApplicationFirewall/socketfilterfw -l
</syntaxhighlight>
*雑多なメモ
tccutil
*MontereyのGateKeeperの罠
確証は無いのだが...
brewで入れたemacsが大きなファイルを開いて作業すると落ちる。ひょっとしたらと思いentitlementsをつけてcodesignしたら安定したかも...
*brewで入れたemacs 28.1が.emacsを読み込まない
.emacsを確認
<syntaxhighlight lang="bash" enclose="div">
emacs --batch -f batch-byte-compile .emacs
</syntaxhighlight>
いっぱい警告が出てるが、この秘伝のタレの.emacsは色んな所で動いているのですが...警告を消したら読み込みました...
byte-compileで出来た.emacs.elcは削除しておきましょう。忘れたころに.emacs変更したのに変わらないと悩むから...
*bashからzshに変わって嫌な挙動をなんとかそれらしくする
<syntaxhighlight lang="bash" enclose="div">
set +o ALWAYS_LAST_PROMPT
set -o AUTO_CD
set +o AUTO_MENU
set -o RM_STAR_SILENT
</syntaxhighlight>
*bashからzshに変わって許せない事が一つ解消した
tab で補完する際に、文字列の途中にカーソルを移動させて補完が出来なくなったのを解消する設定
<syntaxhighlight lang="bash" enclose="div">
bindkey '^i' expand-or-complete-prefix
</syntaxhighlight>
あーーーすっきりした
*悪いこととは知りながら...
<syntaxhighlight lang="bash" enclose="div">
brew install pyenv
LDFLAGS="/opt/homebrew/opt/gettext/lib/libintl.a" pyenv install 2.7.18
</syntaxhighlight>
*ldd
Montereyに ldd が無い。
<syntaxhighlight lang="bash" enclose="div">
otool -L
</syntaxhighlight>
alias しておこう...
*コードサイニング系雑多なメモ
コードサイニングする場合は、terminal 経由では駄目でMacでログインしてGUIが機能する必要がある。
自身のキーチェインアクセス.app のGUIが動く必要あり。
こんな感じのエラーがでる。
<syntaxhighlight lang="bash" enclose="div">
my_a.out: errSecInternalComponent
</syntaxhighlight>
コードサインの削除
<syntaxhighlight lang="bash" enclose="div">
codesign --remove-signature my_a.out
</syntaxhighlight>
既存のコードサインの変更
<syntaxhighlight lang="bash" enclose="div">
codesign -s "Developer ID Application: YOUR NAME (YOUR_DEV_ID)" -f --generate-entitlement-der --entitlements entitlements.xml my_a.out
</syntaxhighlight>
entitlements.xml
<syntaxhighlight lang="xml" enclose="div">
<?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>com.apple.security.virtualization</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
</syntaxhighlight>
"com.apple.security.get-task-allow" はリリース時は消すこと。
entitlements の確認
<syntaxhighlight lang="bash" enclose="div">
codesign -dvv --entitlements - my_a.out
</syntaxhighlight>
*コアダンプ
Monterey とか門番強すぎ...
<syntaxhighlight lang="bash" enclose="div">
ulimit -c unlimited
sudo chmod 1775 /cores
sudo chmod o+w  /cores
</syntaxhighlight>
entitlements.xml
<syntaxhighlight lang="xml" enclose="div">
<?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>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
</syntaxhighlight>
codesign はいろいろ情況によるので割愛...
*コードサイニング系メモ
証明書の不備がある時はここから更新
https://www.apple.com/certificateauthority/
*えー
(developer mode is not enabled on this machine and this is a non-interactive debug session.)
(this is a non-interactive debug session, cannot get permission to debug processes.)
<syntaxhighlight lang="bash" enclose="div">
sudo DevToolsSecurity -enable
sudo dseditgroup -o edit -a staff -t group _developer
</syntaxhighlight>
*MontereyのPodcastアプリの挙動
*MontereyのPodcastアプリの挙動
以前の iTunes の Podcast は ID3 tag が入って、それなりに他のデバイスに持って行きやすかったのだが。
以前の iTunes の Podcast は ID3 tag が入って、それなりに他のデバイスに持って行きやすかったのだが。

Navigation menu