Skip to content
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

New icons do not render properly in tmux #725

Closed
ayamir opened this issue May 8, 2023 Discussed in #720 · 5 comments
Closed

New icons do not render properly in tmux #725

ayamir opened this issue May 8, 2023 Discussed in #720 · 5 comments
Labels
bug Something isn't working env Issues caused by incorrect environment settings (terminal, package manager, etc.) help wanted Extra attention is needed platform:windows

Comments

@ayamir
Copy link
Owner

ayamir commented May 8, 2023

Discussed in #720

Originally posted by AngelontheRoad May 7, 2023
I just merged #447 and updated all plugins. I tried to use the new nerd font with Mono and Propo and everything works perfectly without tmux. But inside tmux I found that icons were not rendered properly.

inside tmux:
quicker_cf16e16a-d84d-40f0-a9a6-6af9aa1cebec.png

outside tmux is OK:
quicker_58aeb3d9-cf82-4be2-a81f-4f79e6815336.png

I found a reddit post that has a similar problem, but no solution works for me.

By the way, I noticed that icons baseline is not a straight line (marked above).😥

Is there any help? Thanks

@ayamir
Copy link
Owner Author

ayamir commented May 8, 2023

Occurs on zellij too. Maybe has to do with environment variables.

image

@ayamir
Copy link
Owner Author

ayamir commented May 14, 2023

Have no idea about it now.

@Jint-lzxy Jint-lzxy added bug Something isn't working help wanted Extra attention is needed env Issues caused by incorrect environment settings (terminal, package manager, etc.) labels May 15, 2023
@AngelontheRoad
Copy link
Contributor

According to the issue posts in wezterm and tmux, the render problem may caused by ConPTY which used only in Windows system. I don't know if this is a problem in a real linux box.

As mentioned in the post, ssh is a feasible way to bypass ConPTY. B/C alacritty is not a multiplexier, I tried in wezterm and it rendered OK.

quicker_af4efdba-2d6a-4381-b546-772500ccbc7d.png

Steps:

  1. set systemd=true under /etc/wsl.conf [boot]
  2. download openssh in wsl2.
  3. shutdown wsl2 by wsl --shutdown
  4. uncomment or add below in /etc/ssh/sshd_config (Port number larger than 1000 is recommended)
Port 2222
ListenAddress 0.0.0.0  
PasswordAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication yes
AcceptEnv LANG LC_*
  1. if using Ubuntu-22.*, set ListenStream=2222 in /lib/systemd/system/ssh.socket
  2. restart ssh service by sudo systemctl restart ssh
  3. get wsl2 IP address by wsl hostname -I
  4. establish ssh connection by wezterm ssh username@ip:2222. If ssh key exists, use wezterm ssh -oIndentityFile='~/.ssh/yoursshkey' username@ip:2222. But I recommend to set ssh_domains in wezterm configuration file.

Summary

In general, this solution may be effective for solving render problems that exist only in wsl (such as undercurl) unless microsoft updates ConPTY. In my short using experience, the only bug is that spawning a new cmd or powershell tab in ssh window will crash wezterm. I don't know how it works in other terminals. IMHO, wsl users who rely on tmux but hate trivial settings, use wezterm straightly is a better choice

@ayamir
Copy link
Owner Author

ayamir commented May 20, 2023

According to the issue posts in wez/wezterm#3704 and tmux/tmux#3566, the render problem may caused by wez/wezterm#3704 (comment) which used only in Windows system.

Indeed, it doesn't occur on my gentoo linux.

@ayamir ayamir closed this as completed May 21, 2023
@ayamir
Copy link
Owner Author

ayamir commented Jul 18, 2023

The latest(20230712-072601-f4abf8fd) wezterm has solved this issue natively, no need to use ssh to connect wsl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working env Issues caused by incorrect environment settings (terminal, package manager, etc.) help wanted Extra attention is needed platform:windows
Projects
None yet
Development

No branches or pull requests

3 participants