From c3f3bd36669fc6cf6c5998bfe54cb90ae58dde8f Mon Sep 17 00:00:00 2001 From: Chris Copeland Date: Sat, 23 Jul 2022 19:51:16 -0700 Subject: Register Alacritty shells as tty sessions on macOS Unless the `shell` config is specified, launch the user's shell with: ```sh login -flp $USER /bin/sh -c "exec -a -shell /path/to/shell" ``` On macOS, just running a shell prefixed by `-` is not sufficient to be registered as a login session for things like `w` and `logname`. However, using the `login` command changes the directory to `$HOME` before running the program by default, which is not desired. The `-l` flag disables this behavior, but also skips prepending `-` to the executed program, so shells will not run as login shells. Instead we just do this part ourselves with `exec -a`. The result is login shells that run in the intended directory and are registered as tty sessions. Fixes #3420. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b585df9..08c2db9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Windows `Open Alacritty Here` on root of drive displaying error - On macOS, `font.use_thin_strokes` did not work since Big Sur - On macOS, trying to load a disabled font would crash +- On macOS, Alacritty sessions did not appear in the list of tty sessions for `w` and `who` ### Removed -- cgit v1.2.3