Closed huibosa closed 2 years ago
I cannot test it on WSL2 but I believe it should work there. What do you mean by "not working"? All the previews don't show up? You can try running ctpv <file>
and see if there are any error messages.
I cannot test it on WSL2 but I believe it should work there. What do you mean by "not working"? All the previews don't show up? You can try running
ctpv <file>
and see if there are any error messages.
ctpv
and configured lf
. The lf
just output the string "binary" for an image file.ctpv <file>
and it outputs some random binary character without error messages, so I suppose it worked?ctpv
worked well on it. So I believe my config is OK.If you run the command manually and it works, it means you just need to install more programs to enable the previews. You can find the list in the manual or README under Dependencies section.
If you run the command manually and it works, it means you just need to install more programs to enable the previews. You can find the list in the manual or README under Dependencies section.
But I'm sure to have ueberzug
and pdftoppm
installed already.
Could you try installing exiftool
and see if it works?
Could you try installing
exiftool
and see if it works?
It successfully gives the metadata of png
files and pdf
in lf
, seems there's some problem only concern about the image render?
Yeah, seems like it. Are you sure that ueberzug supports WSL2? I think you can run ueberzug layer
and see if it produces any errors.
Yeah, seems like it. Are you sure that ueberzug supports WSL2? I think you can run
ueberzug layer
and see if it produces any errors.
The output:
Traceback (most recent call last):
File "/home/huibosa/.local/bin/ueberzug", line 8, in <module>
sys.exit(main())
File "/home/huibosa/.local/lib/python3.10/site-packages/ueberzug/__main__.py", line 55, in main
module.main(options)
File "/home/huibosa/.local/lib/python3.10/site-packages/ueberzug/layer.py", line 206, in main
window_infos = xutil.get_parent_window_infos()
File "/home/huibosa/.local/lib/python3.10/site-packages/ueberzug/xutil.py", line 171, in get_parent_window_infos
pid_window_id_map = get_pid_window_id_map()
File "/home/huibosa/.local/lib/python3.10/site-packages/ueberzug/xutil.py", line 99, in get_pid_window_id_map
.value)
AttributeError: 'NoneType' object has no attribute 'value'
I've searched "ueberzug + wsl" this on google, but not find any useful messages.
Is ueberzug
the only method to preview images for ctpv
? I've seen some other software using w3m
to preview.
Right now there two methods: ueberzug and kitty terminal. w3m is really buggy so I don't know if it's a good idea to add support for it (also, I suspect it won't work too).
What I could add support for is chafa. It converts images to characters a terminal can display, which results in poorer image quality but at least it will work on WSL2.
Right now there two methods: ueberzug and kitty terminal. w3m is really buggy so I don't know if it's a good idea to add support for it (also, I suspect it won't work too).
What I could add support for is chafa. It converts images to characters a terminal can display, which results in poorer image quality but at least it will work on WSL2.
I'm afraid kitty does not support on windows, unless running in wsl, which will give poor performance.
Anyway, thank you for your help, it would be nice if you could add support for chafa
Added support for chafa! Please try installing it and see if it works. (And make sure to uninstall Ueberzug.)
Added support for chafa! Please try installing it and see if it works. (And make sure to uninstall Ueberzug.)
Seems not working, output:
chafa: Unknown option --animate
What version of chafa do you have?
What version of chafa do you have?
1.8.0
.1.12.1
) from source, but build failed. It has go beyond my ability to check what the building problem is.I've remove the --animate
option. It was used to display gifs properly. Now I use convert
(Image Magick) instead.
I've remove the
--animate
option. It was used to display gifs properly. Now I useconvert
(Image Magick) instead.
It worked now, both for gif
and png
file, thank you for your work!
Any here's another problem which only occurs in wsl, I don't konw if I should open another issue:
If I directly run sudo make install
, the compiler will give the output:
cc -lmagic -lcrypto src/config.o src/ctpv.o src/error.o src/lexer.o src/preview.o src/server.o src/shell.o src/ulist.o src/utils.o src/vector.o -o ctpv
/usr/bin/ld: src/ctpv.o: in function `init_magic':
ctpv.c:(.text+0x1aa): undefined reference to `magic_open'
/usr/bin/ld: ctpv.c:(.text+0x1c0): undefined reference to `magic_load'
/usr/bin/ld: ctpv.c:(.text+0x1d1): undefined reference to `magic_error'
/usr/bin/ld: ctpv.c:(.text+0x208): undefined reference to `magic_error'
/usr/bin/ld: src/ctpv.o: in function `preview':
ctpv.c:(.text+0x6ca): undefined reference to `magic_file'
/usr/bin/ld: ctpv.c:(.text+0x7f4): undefined reference to `MD5'
/usr/bin/ld: ctpv.c:(.text+0x921): undefined reference to `magic_error'
/usr/bin/ld: src/ctpv.o: in function `mime':
ctpv.c:(.text+0xadb): undefined reference to `magic_file'
/usr/bin/ld: ctpv.c:(.text+0xb9d): undefined reference to `magic_error'
/usr/bin/ld: src/ctpv.o: in function `main':
ctpv.c:(.text.startup+0x184): undefined reference to `magic_close'
collect2: error: ld returned 1 exit status
make: *** [Makefile:45: ctpv] Error 1
I know it's a linker error, so every time I have to change line 45 in Makefile
:
$(CC) $(LDFLAGS) $+ -o $@
to:
$(CC) $+ -o $@ $(LDFLAGS)
This problem only happens in wsl, when I'm use my arch machine, all work well without change the Makefile
.
You just change the order of arguments and it works? Do you have any ideas why it might happen?
You just change the order of arguments and it works? Do you have any idea why it happens?
Thank you! It's weird because I use Arch too and I did not have any issue. I've changed the order of arguments, could you please test if it works?
Thank you! It's weird because I use Arch too and I did not have any issue. I've changed the order of arguments, could you please test if it works?
It's all ok now
I've installed ctpv on wsl2, and follow your setup guide, but seems It's not working on wsl2.
So is it a bug, or the wsl2 hasn't been support yet?
Thank you for your work!