Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python38-python-xlib is needed #39

Open
jimishol opened this issue Jan 25, 2022 · 1 comment
Open

python38-python-xlib is needed #39

jimishol opened this issue Jan 25, 2022 · 1 comment

Comments

@jimishol
Copy link

jimishol commented Jan 25, 2022

Thank you for your work.

It is not an issue of yours
... but, since i do not see 'issues' in https://github.com/seebye/ueberzug site and since many users will try your Code, here is my experience.
I fresh installed opensuse tubleweed, copying my old 'home' partition in it. I used vifm with w3mimgdisplay that worked ok once. I noticed that it is not working anymore, not in my fresh install nor in my old system (probably some update broke it). I decided to try 'ueberzug'. I 'pip installed' it as normal user. I tried the bash example in seebye's site and it didn't worked complaining about Xlib error not having permission to open display. Of course neither your code was working.
Despite the 'drop python-xlib' of setup.py that mentions the site, I installed the python38-python-xlib package, since fresh install on opensuse tubleweed uses python38 at the present. After that installation your 'Code' works flawlessly.
Probably the pip is not updated with resent code of seebye's work, or i should activate python39 before pip install ueberzug. I do not know. The fact is that a rolling distribution like tubleweed that has python38 as default can not use ueberzug and consequently your code out of the box. So,
python38-python-xlib is needed.

@jimishol
Copy link
Author

Awesome, termux on android and vifm.

Very soon xhost was installed as dependency and preview stopped working again. On my window managers i bind keys to open vifm. In order to make ueberzug working again, in awesomewm i edit rc.lua with

awful.key({}, "Menu", function ()
awful.spawn.with_shell('xhost "local:"')
awful.spawn.with_shell(terminal .. " -e ~/.config/vifm/scripts/vifmrun")
end),

avoiding the 'xhost +' (without knowing for sure if that option is better).

Since, i use to maintain my systems by my mobile phone through termux, without using X environment, in order to have some preview functionality i installed tiv through megamaced repository. Inside my $HOME/.config/vifm directory i created a new directory named 'ascii_preview' and in there i copied vifmrc file, 'color' folder and created an empty 'scripts' folder. The preview part of vifmrc in this new folder is altered as

fileviewer {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},<image/*>
        \ tiv -h %ph -w %pw %c 2> /dev/null
"    	\ ~/.config/vifm/scripts/imgt %px %py %pw %ph %c
"	\ vifmimg draw %px %py %pw %ph %c
"        \ %pc
"        \ vifmimg clear

I had to instruct my terminal to use vifm from this folder so i created an alias in my .bashrc file like
alias vifm="VIFM=~/.config/vifm/ascii_preview vifm"

Now, when i run vifm on terminal at my systems or at my phone, connected to them through ssh by termux, i see text image previews and when i use key bindings on graphical environments I see ueberzug images.

None of these consists an issue of your project. I leave this issue open as a reminder for you to check if you want to add any part of the above as information to your README.md. As soon as you read the issue, it is proper to close it.

Thank you again for your project and i am sorry for any inconvenience brought by this, irrelevant to your project, issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant