slavistan / lf-gadgets

A collection of useful and nifty use cases and configurations for lf.
GNU General Public License v3.0
132 stars 16 forks source link

It shows Loading... but not preview #15

Open Archie-2021 opened 1 year ago

Archie-2021 commented 1 year ago

Should I use zsh as my shell for this to work? I installed all the prerequisite packages (including zsh) but it is not working.

slavistan commented 1 year ago

Hi! Which gadget does not preview?

Archie-2021 commented 1 year ago

Hi! Which gadget does not preview?

Hey, non of them, it doesn't even show the simple text files anymore.

PS. Sorry I didn't understand the question properly, It is lf-ueberzug I am talking about.

Archie-2021 commented 1 year ago

image

Archie-2021 commented 1 year ago

i image

Also it doesn't exit properly and crashes on exit.

slavistan commented 1 year ago

Alright, I'll have a look. Haven't updated the scripts to the newer versions of lf.

Archie-2021 commented 1 year ago

Alright, I'll have a look. Haven't updated the scripts to the newer versions of lf.

Thanks

slavistan commented 1 year ago

I've checked the ueberzug and youtube gadgets quickly, and everything seems to work just fine. May I kindly ask you to post the outputs of the following commands:

uname -a
command -v lf
lf -version
ueberzug version
jq --version
youtube-dl --version
zsh --version
Archie-2021 commented 1 year ago

I've checked the ueberzug and youtube gadgets quickly, and everything seems to work just fine. May I kindly ask you to post the outputs of the following commands:

uname -a
command -v lf
lf -version
ueberzug version
jq --version
youtube-dl --version
zsh --version
6.0.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 16 Nov 2022 17:01:17 +0000 x86_64 GNU/Linux
/usr/bin/lf
27
18.1.9
jq-1.6
2021-12.17
zsh 5.9 (x86_64-pc-linux-gnu)
slavistan commented 1 year ago

Looks good to me. The next step is to verify that you can run ueberzug overlays, as that seems to be the problem on your side. Unfortunately, ueberzug apparently isn't maintained anymore so you'll have to check out the README of one of the forks.

Also: you are using X11, right? You're not on wayland, are you?

Archie-2021 commented 1 year ago

Looks good to me. The next step is to verify that you can run ueberzug overlays, as that seems to be the problem on your side. Unfortunately, ueberzug apparently isn't maintained anymore so you'll have to check out the README of one of the forks.

Also: you are using X11, right? You're not on wayland, are you?

Can you link one, I am not sure what you are referring here.

Yes I am on X , using EOS.

slavistan commented 1 year ago

https://github.com/seebye/ueberzug/tree/18.1.9

ueberzug is the program used to create overlays of images on top of terminal emulators, creating the impression of viewing images or videos "inside the terminal". I assume that these don't work on your side. Try getting to run a minimal working example with ueberzug.

using EOS

What is EOS?

fralnz commented 1 year ago

Hi, I have a the same issue. After closing lf with q, I have to manually kill the process with Ctrl-C two times, this is the output:

^C/home/fra/.config/lf/lf-ueberzug-cleaner: 3: cannot create /tmp/lf-ueberzug-vuCz1G/fifo: Interrupted system call
^C/home/fra/.config/lf/lf-ueberzug-cleaner: 3: cannot create /tmp/lf-ueberzug-vuCz1G/fifo: Interrupted system call
cleanup:kill:2: kill 12344 failed: no such process
cleanup:kill:2: kill 12344 failed: no such process
slavistan commented 1 year ago

@WalkingGarbage Hi. Can you check whether ueberzug overlays work in principle on your setup?

https://github.com/seebye/ueberzug/tree/18.1.9

fralnz commented 1 year ago

I'm sorry, I'm not really sure what you mean. I tried doing ueberzug layer -l 613356.png but:

Traceback (most recent call last):
  File "/usr/bin/ueberzug", line 33, in <module>
    sys.exit(load_entry_point('ueberzug==18.1.9', 'console_scripts', 'ueberzug')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ueberzug/__main__.py", line 55, in main
    module.main(options)
  File "/usr/lib/python3.11/site-packages/ueberzug/layer.py", line 204, in main
    display = xutil.get_display()
              ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/ueberzug/xutil.py", line 60, in get_display
    return Xdisplay.Display()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/Xlib/display.py", line 89, in __init__
    self.display = _BaseDisplay(display)
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/Xlib/display.py", line 71, in __init__
    protocol_display.Display.__init__(self, *args, **keys)
  File "/usr/lib/python3.11/site-packages/Xlib/protocol/display.py", line 166, in __init__
    raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n'
Fatal Python error: bool_dealloc: deallocating True or False: bug likely caused by a refcount error in a C extension
Python runtime state: finalizing (tstate=0x00007fd98bf39b38)

Current thread 0x00007fd98bfe8740 (most recent call first):
  Garbage-collecting
  <no Python frame>
zsh: IOT instruction  ueberzug layer -l 613356.png

I tried installing ueberzug from pip3 but it gave me errors: Could not find a version that satisfies the requirement ueberzug (from versions: none)