-
Notifications
You must be signed in to change notification settings - Fork 661
Add COLORTERM to the lima shell environment #435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks, but CI failing
|
This comment has been minimized.
This comment has been minimized.
1b0c3db
to
d49ad56
Compare
This comment has been minimized.
This comment has been minimized.
|
Ah, Ok. Thanks for spotting it. |
d49ad56
to
b0fb835
Compare
If the variable is set on the host, forward it. Typical value if set would be COLORTERM=truecolor Signed-off-by: Anders F Björklund <[email protected]>
b0fb835
to
418cb3e
Compare
Looks good to me, but for some reason doesn't work: $ COLORTERM=truecolor limactl --debug shell default
DEBU[0000] changeDirCmd="cd \"/Users/jan\" || cd \"/Users/jan\""
DEBU[0000] OpenSSH version 8.1.1 detected
DEBU[0000] AES accelerator seems available, prioritizing [email protected] and [email protected]
DEBU[0000] executing ssh (may take a long)): [/usr/bin/ssh -F /dev/null -o IdentityFile="/Users/jan/.lima/_config/user" -o IdentityFile="/Users/jan/.ssh/[REDACTED]" -o IdentityFile="/Users/jan/.ssh/[REDACTED]" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^[email protected],[email protected]" -o User=jan -o ControlMaster=auto -o ControlPath="/Users/jan/.lima/default/ssh.sock" -o ControlPersist=5m -t -o SendEnv="COLORTERM" -q -p 60022 127.0.0.1 -- cd "/Users/jan" || cd "/Users/jan" ; exec bash --login]
jan@lima-default:/Users/jan$ sudo grep -B6 reload.ssh /var/log/cloud-init-output.log
LIMA| Executing /mnt/lima-cidata/boot/11-colorterm-environment.sh
+ grep -q COLORTERM /etc/ssh/sshd_config
+ sed -i s/^AcceptEnv LANG LC_\*$/AcceptEnv COLORTERM LANG LC_*/ /etc/ssh/sshd_config
+ [ -f /sbin/openrc-init ]
+ command -v systemctl
+ systemctl -q is-active ssh
+ systemctl reload ssh
jan@lima-default:/Users/jan$ grep COLORTERM /etc/ssh/sshd_config
AcceptEnv COLORTERM LANG LC_*
jan@lima-default:/Users/jan$ env | grep TERM
TERM=xterm-256color I wonder if this is somehow related to this being a "lingering" session, so maybe environment variables aren't updated? I haven't looked further; @afbjorklund does this actually work for you? Also wondering if this should be documented somewhere. Afaict, the only setting that would make any kind of difference would be |
If you apply it to a running instance, you need to kill the ssh mux socket. It keeps the old ssh connection up.
|
I haven't seen any documentation, or any other value. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Eventually, we should ensure this to be configured before starting sshd
If the variable is set on the host, forward it.
Typical value if set would be COLORTERM=truecolor
Closes #434