こういう設定があるのは知っているけど設定をどこでするのか毎回分からない、ので。
[Run]
↓
[Edit Configulations...]
↓
✅ [Show logcat automatically]
✅ [Clear log before launch]
基本的にこの2つはONにしてていいと思います。
こういう設定があるのは知っているけど設定をどこでするのか毎回分からない、ので。
[Run]
↓
[Edit Configulations...]
↓
✅ [Show logcat automatically]
✅ [Clear log before launch]
基本的にこの2つはONにしてていいと思います。
GNU gsed をインストールした後の表示。
GNU "sed" has been installed as "gsed".
If you need to use it as "sed", you can add a "gnubin" directory
to your PATH from your bashrc like:
PATH="$HOMEBREW_PREFIX/opt/gnu-sed/libexec/gnubin:$PATH"
sed のように利用するには PATH を優先しておく、とのことだが。
GNU パッケージは、「パッケージごとに」シンボリックシンクが分かれている。
Commands also provided by macOS and the commands dir, dircolors, vdir have been installed with the prefix "g".
If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH with:
PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"
👉 coreutils — Homebrew Formulae
自分のマシンで見てみる。
❯ ls -l $(brew --prefix)/opt/*/libexec/gnubin
/opt/homebrew/opt/gnu-sed/libexec/gnubin:
total 0
lrwxr-xr-x@ 1 mao admin 14 Nov 7 2022 sed@ -> ../../bin/gsed
/opt/homebrew/opt/gsed/libexec/gnubin:
total 0
lrwxr-xr-x@ 1 mao admin 14 Nov 7 2022 sed@ -> ../../bin/gsed
/opt/homebrew/opt/libtool/libexec/gnubin:
total 0
lrwxr-xr-x@ 1 mao admin 18 Mar 17 2022 libtool@ -> ../../bin/glibtool
lrwxr-xr-x@ 1 mao admin 21 Mar 17 2022 libtoolize@ -> ../../bin/glibtoolize
そうか、インストール時に作ってくれてるんだシンボリックリンク。
sed@ が2個あるけど実体は同じでした。
❯ ls -al /opt/homebrew/opt/gnu-sed
lrwxr-xr-x@ 1 mao admin 21 Oct 5 22:58 /opt/homebrew/opt/gnu-sed@ -> ../Cellar/gnu-sed/4.9
❯ ls -al /opt/homebrew/opt/gsed
lrwxr-xr-x@ 1 mao admin 21 Oct 5 22:58 /opt/homebrew/opt/gsed@ -> ../Cellar/gnu-sed/4.9
よって、以下のようにして GNU パッケージの PATH を一括で通すと良い、とな。
if type brew &>/dev/null; then
HOMEBREW_PREFIX=$(brew --prefix)
# gnubin; gnuman
for d in ${HOMEBREW_PREFIX}/opt/*/libexec/gnubin; do export PATH=$d:$PATH; done
# I actually like that man grep gives the BSD grep man page
#for d in ${HOMEBREW_PREFIX}/opt/*/libexec/gnuman; do export MANPATH=$d:$MANPATH; done
fi
👉 macos - Homebrew: Easy way to add 'gnubin' to path for multiple packages? - Ask Different
他パッケージのインストーラーがこけたりするときないのか、と思ったので眺めておきました。
Touch ID (指紋ボタン) を使って、sudo パスワードを入力する。
こんなことできたんですね。
で、こんな新機能が紹介されています。
In macOS Sonoma, Touch ID for sudo can survive updates – Six Colors https://t.co/56jWHwhKMd
— chanzmao (@maochanz) October 4, 2023
Touch ID can be allowed for sudo with a configuration that persists across software updates using /etc/pam.d/sudo_local. See /etc/pam.d/sudo_local.template for details.
👉 What's new for enterprise in macOS Sonoma - Apple Support
❯ ls -al /etc/pam.d/sudo*
-r--r--r-- 1 root wheel 283 Sep 16 22:28 /etc/pam.d/sudo
-r--r--r-- 1 root wheel 179 Sep 16 22:28 /etc/pam.d/sudo_local.template
❯ cat /etc/pam.d/sudo
# sudo: auth account password session
auth include sudo_local
auth sufficient pam_smartcard.so
auth required pam_opendirectory.so
account required pam_permit.so
password required pam_deny.so
session required pam_permit.so
ということで、OSアップデートの度に更新されてしまう /etc/pam.d/sudo
に
auth include sudo_local
が追加されたそうです。
便利です。
👉 macOS Sonoma 14.xでsudo実行時にTouch IDで認証する機能を有効化する手順 - Qiita
👉 Enable Touch ID for Sudo / Terminal (Sonoma Ready) | by La Clementine | Aug, 2023 | Medium
👉 Persistent Touch ID for sudo