jstkdng / ueberzugpp

Drop in replacement for ueberzug written in C++
GNU General Public License v3.0
767 stars 27 forks source link

Does not work in urxvt with X forwarding #217

Open CyberShadow opened 1 month ago

CyberShadow commented 1 month ago

Hi,

I'm trying to use Überzug++ in yazi.

I noticed that image previews don't work over SSH with X forwarding. DISPLAY is declared, so yazi tries using ueberzugpp, but, nothing happens.

I can reproduce it manually, by running ueberzugpp layer, and then pasting e.g. {"action":"add","identifier":"yazi","x":1,"y":1,"max_width":48,"max_height":36,"path":"/home/vladimir/mpv-shot0001.jpg"}.

If I do this locally (not via SSH), it works. But, it does not work over SSH - nothing happens.

I'm not sure if it matters, but I use urxvt. It can't draw images by itself, so to show images, yazi needs to use something like Chafa or Überzug++.

For what it's worth, viewing images over X forwarding does work with ranger + w3m, which I believe uses the same general approach.

I am using ueberzugpp 2.9.6 and rxvt-unicode (urxvt) v9.31.

Thanks!

jstkdng commented 1 month ago

set SPDLOG_LEVEL=debug and post the logfile located in /tmp/ueberzugpp-${USER}.log

CyberShadow commented 4 weeks ago

OK, here you go:

 _   _      _
| | | |    | |                                _     _
| | | | ___| |__   ___ _ __ _____   _  __ _ _| |_ _| |_
| | | |/ _ \ '_ \ / _ \ '__|_  / | | |/ _` |_   _|_   _|
| |_| |  __/ |_) |  __/ |   / /| |_| | (_| | |_|   |_|
 \___/ \___|_.__/ \___|_|  /___|\__,_|\__, |
                                       __/ |
                                      |___/     v2.9.6
[2024-08-15 07:14:00.987] [terminal] [info] TERM = rxvt-unicode-256color
[2024-08-15 07:14:00.987] [terminal] [info] PTY = /dev/pts/43
[2024-08-15 07:14:00.987] [terminal] [debug] ioctl sizes: COLS=133 ROWS=79 XPIXEL=931 YPIXEL=1027
[2024-08-15 07:14:00.987] [terminal] [debug] iterm2 is not supported
[2024-08-15 07:14:01.001] [terminal] [debug] X11 is supported
[2024-08-15 07:14:04.465] [terminal] [debug] Using fallback X11 window id 0
[2024-08-15 07:14:04.467] [terminal] [debug] X11 sizes: XPIXEL=0 YPIXEL=0
[2024-08-15 07:14:04.467] [terminal] [debug] Wayland is not supported
[2024-08-15 07:14:04.467] [terminal] [debug] padding_horiz=0 padding_vert=0
[2024-08-15 07:14:04.467] [terminal] [debug] font_width=7 font_height=13
[2024-08-15 07:14:04.493] [X11] [info] Canvas created
[2024-08-15 07:14:04.493] [main] [info] Listening for commands on socket /tmp/ueberzugpp-2691262.socket
[2024-08-15 07:14:04.523] [main] [info] Command received: {"action":"add","identifier":"yazi","max_height":36,"max_width":48,"path":"/home/vladimir/mpv-shot0001.jpg","x":1,"y":1}
[2024-08-15 07:14:04.527] [opencv] [info] loading file /home/vladimir/.cache/ueberzugpp/d693ab433e4d8e1f3ffa77213ccb99daef83675b347f3626d836e1a26987d8e3d971aaa4732716272ba3c954e55bf34e2a7bd6e58dca97abf9aeddab99e.jpg
[2024-08-15 07:14:04.527] [X11] [debug] Initializing canvas
[2024-08-15 07:14:04.527] [X11] [debug] Created child window 52428800 at (7,13) with parent 0
[2024-08-15 07:14:04.531] [X11] [error] XCB: resource 0 sequence 1
[2024-08-15 07:14:04.531] [X11] [error] XCB: resource 52428800 sequence 2
[2024-08-15 07:14:04.531] [X11] [error] XCB: resource 52428800 sequence 3
[2024-08-15 07:14:04.531] [X11] [error] XCB: resource 52428800 sequence 4
[2024-08-15 07:14:04.531] [X11] [error] XCB: resource 52428800 sequence 5
jstkdng commented 2 weeks ago

Sorry for not answering more quickly. Seems x11 forwarding doesn't work but could with additional code. I'll test some things out