Closed Franktdf closed 2 years ago
Hi,
Please check if any of these variables are set in the current terminal session, the reason is that if you're SSH:ing in to a machine then ueberzug will not work and therefore chafa is used.
SSH_CLIENT
SH_TTY
You are really quick to reply. I use zsh, this is what I found:
export | grep SSH: LESSHISTFILE=- SSH_AGENT_PID=5017 SSH_AUTH_SOCK=/tmp/ssh-XXXXXXypsXPJ/agent.5016
export | grep SH: LESSHISTFILE=- MOTD_SHOWN=pam SHELL=/bin/zsh SHLVL=3 SSH_AGENT_PID=5017 SSH_AUTH_SOCK=/tmp/ssh-XXXXXXypsXPJ/agent.5016
Does not seem to be wrong, or?
xinit:
dwm is started this way:
ssh-agent dwm
Maybe that is wrong?
I replaced ssh-agent dwm
with exec dwm
in xinit.
No reference to any SSH anymore when I run export
in the terminal.
The problems is still the same, that images are only viewed with chafa.
Any other proposal?
I'm not sure what the issue is to be honest.
Have you verified your lfrc file and are the cleaner and preview scripts executable?
Yes, the scripts are executable. Preview does execute chafa, I guess. I also added the required two lines to lfrc and start lf with lfrun (actually use an alias to lfrun).
I do not really understand your scripts. I do not even understand how ueberzug is actually executed. How would I need to change preview so that it just executes ueberzug without bothering SSH and chafa? (I tried and failed already here :-) ).
Anyway, thank for you kind feedback, In the end is not the end of the world (not THIS) if lf does not do all I want it to do., I can still use ranger. But having lf with image preview would really be perfect.
I see. If you want to force the use of the ueberzug then simply edit the lfrun script (from which you use to launch lf with ueberzug) and remove the if statement and only keep the code in the else block.
Now that I think of it, are you even using lfrun
to run lf with ueberzug?
There is an alias lf='lfrun'
, but for testing I do call lfrun directly.
After editing lfrun ans proposed, the image preview is only loading . . .
, bit no image preview at all in st
.
Very strangely, in urxvt
chafa is again used for image preview. I also removed the if-else from the preview script, still urxvt calls chafa. st
behaves "normal", I guess.
scope
in '.config/lf' calls chafa for images:
image/*) chafa --fill=block --symbols=block -c 256 -s 80x"${HEIGHT}" "${FILE_PATH}" || exit 1;;
Solved it.
The `~/.config/lf/lfrc' from larbs.xyz by Luke Smith has its own preview mechanism, which collides with your scripts. I removed that, and now image preview works perfectly with your orignal lfrun and preview script.
Thank you for your pations and help!
This is really a nice script, it just does not work for me. When I run lfrun and visit images, the image is only shown with chafa, not ueberzug.
My setup is basically LARBS from Luke Smith, but some minor changes, like using emacs command type in the terminal Windows manager is dwm The Terminal is st. (lfrun does not work with urxvt either on my setup) I installed ueberzug with pip, it is in /usr/bin. ranger works without problem with ueberzug (for image previews :-) )
Please let me know what additional information you may need.