sxyazi / yazi

💥 Blazing fast terminal file manager written in Rust, based on async I/O.
https://yazi-rs.github.io
MIT License
16.3k stars 377 forks source link

Ueberzugpp pixelated image, pdf #311

Closed greweln closed 1 year ago

greweln commented 1 year ago

What Operating System(s) are you running Yazi on?

Linux X11

Yazi version

0.1.5

Did you try the latest main branch to see if the problem has already been fixed?

No, and I'll explain why below

Describe the bug

Ueberzugpp displays pixelated images,pdf. I've tried both St, Alacritty with the same result. I also tried different settings of "ueberzug_scale" with no result. Is it something that I'm missing ?

maim

Expected Behavior

clear image,pdf preview

To Reproduce

display any image

Configuration

No response

Anything else?

No response

sxyazi commented 1 year ago

Please do a echo $TERM, $TERM_PROGRAM, $XDG_SESSION_TYPE and paste it here.

greweln commented 1 year ago

Please do a echo $TERM, $TERM_PROGRAM, $XDG_SESSION_TYPE and paste it here.

sure, here it is: st-256color, , tty

sxyazi commented 1 year ago

Why your XDG_SESSION_TYPE is not x11?

greweln commented 1 year ago

Why your XDG_SESSION_TYPE is not x11?

hmmm..no idea to be honest. I am running a tiling manager with X on Arch . Just as FYI I did a test on Ranger and Ueberzug works fine.

sxyazi commented 1 year ago

After some google, its value will be tty when there's no display manager installed. In this case, seems that the user's environment can only be detected through WAYLAND_DISPLAY and DISPLAY. Could you paste their value here?

As for Ranger, afaik, it doesn't detect the user's environment but relies on user configuration, which requires the user to understand the differences between each graphic protocol. Quote from Reddit:

Some terminals support all Kitty, Sixel, and iTerm2 protocols, while others only support one of them. When users run Yazi in tmux, only Sixel and iTerm are available; when users run in Zellij, only Sixel is available; when users are on Windows, WezTerm and Mintty can only use iTerm2; if the user's terminal doesn't support any of these, then Ueberzug is needed. The combination of these conditions will make things get complicated, so it's up to Yazi to choose the best way for the user

greweln commented 1 year ago

After some google, its value will be tty when there's no display manager installed. In this case, seems that the user's environment can only be detected through WAYLAND_DISPLAY and DISPLAY. Could you paste their value here?

As for Ranger, afaik, it doesn't detect the user's environment but relies on user configuration, which requires the user to understand the differences between each graphic protocol. Quote from Reddit:

Some terminals support all Kitty, Sixel, and iTerm2 protocols, while others only support one of them. When users run Yazi in tmux, only Sixel and iTerm are available; when users run in Zellij, only Sixel is available; when users are on Windows, WezTerm and Mintty can only use iTerm2; if the user's terminal doesn't support any of these, then Ueberzug is needed. The combination of these conditions will make things get complicated, so it's up to Yazi to choose the best way for the user

sure! $DISPLAY: :0
$WAYLAND_DISPLAY:

sxyazi commented 1 year ago

I made a PR to fix it https://github.com/sxyazi/yazi/pull/312, let me know if it works for you!

greweln commented 1 year ago

still the same :( . Sorry

sxyazi commented 1 year ago

Hey, I've added more logs, please try again and paste the logs form ~/.local/state/yazi/yazi.log here.

greweln commented 1 year ago
  1. it WORKS!!
  2. Actually the issue was fixed by the previous commit: 10456c5c42e2fad6b43813305d91509a67e0a426. I messed up the builds I've tried last night. Sorry about that.
  3. Thanks a lot for taking the time to fix this and for this amazing project.
sxyazi commented 1 year ago

Okay let me merge it now, thanks for testing!

github-actions[bot] commented 11 months ago

I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.