NikitaIvanovV / ctpv

Image previews for lf file manager
https://www.nikitaivanov.com/man1/ctpv
MIT License
272 stars 26 forks source link

`ctpv -s` requires Ueberzug? #12

Closed mangkoran closed 2 years ago

mangkoran commented 2 years ago

I got the following error

> ctpv -s 69
cptv: ueberzug not installed

Does it requires ueberzug for running server? I want to use its kitty backend.

NikitaIvanovV commented 2 years ago

Kitty backend doesn't require running the server. The server currently is only required for using ueberzug backend, this is why ctpv -s returns an error if ueberzug is not installed.

mangkoran commented 2 years ago

So what is the correct setup to use ctpv as lf previewer, using kitty backend? As the tutorial in ctpv man page and lf wiki use ctpv -s.

Edit: I also asked this in lf repo, as I am not sure whether its lf issue or ctpv, or maybe not an issue at all, just config error.

NikitaIvanovV commented 2 years ago

Just remove the ctpv -s in the config

NikitaIvanovV commented 2 years ago

It should not happen though, ideally you should leave the line as is even if you use another backend. Thank you for reporting the bug, will fix!

Meanwhile, as I've said, you can try removing the ctpv -s line.

mangkoran commented 2 years ago

Thank you @NikitaIvanovV . However, I have tried removing ctpv -s line (and the ctpvquit), but image preview still not showing in lf.

If I run ctpv in CLI, it runs and shows the image. So I guess this is lf issue? But then I am not sure either.

NikitaIvanovV commented 2 years ago

This is weird. Do other previews (like text) work? If they do I doubt it's lf issue. It's probably a bug in ctpv. What version of lf and kitty do you use?

mangkoran commented 2 years ago

Yes. Other preview such as text works.

System Info:

NikitaIvanovV commented 2 years ago

What does happen if you run ctpv file.png 10 10 10 10 ?

mangkoran commented 2 years ago

It shows the image but small.

NikitaIvanovV commented 2 years ago

Could you please try installing kitty 0.25.2 and see if it works?

mangkoran commented 2 years ago

You are spot on. Now the images shown in lf. Thank you very much.

However, I wonder did you find any changelog in kitty related to this?

NikitaIvanovV commented 2 years ago

No, I simply noticed that we have different versions and I assumed that the bug had something to do with it. Thank you for testing! I will look into why it doesn't work for an older versions of kitty.

mangkoran commented 2 years ago

Thank you too, both for your work on this app and suggestions!

I think the issue title could be updated to match our discussion here 😅

NikitaIvanovV commented 2 years ago

No, I think it would be better if this issue was closed and a new one with a proper title opened.