Does anyone know why using ueberzug + ranger in KDE's Konsole does not work on EnOS, but does on Fedora?

So, I’ve got two computers a laptop running endeavourOS and a desktop running fedora. Installing ueberzug through pip and ranger through the official repos and setting the appropriate settings in ranger’s config file shows the image previews in ranger on my desktop running fedora. However installing ueberzug through either the community repo or through pip on arch and using the same configuration settings results in nothing being shown on endeavourOS (Arch). It works properly on the same laptop when using say xTerm just not in konsole. Can it be that konsole was compiled differently in the arch repos than in fedora? Missing support for whatever is responsible for handling image supports in terminal emulators.

You need the package w3m installed in addition to ueberzug EDIT: You only need one or the other.

Also, I would make the strongest recommendation that you don’t install system packages via pip on an Arch-based distro. You should reserve use of pip for development purposes.

If you must use it, be sure to use it without sudo/root.

You can use pacman -Si to review the optional dependencies for packages. For example:

Optional Deps   : atool: for previews of archives
                  elinks: for previews of html pages
                  ffmpegthumbnailer: for video previews
                  highlight: for syntax highlighting of code
                  libcaca: for ASCII-art image previews
                  lynx: for previews of html pages
                  mediainfo: for viewing information about media files
                  odt2txt: for OpenDocument texts
                  perl-image-exiftool: for viewing information about media files
                  poppler: for pdf previews
                  python-chardet: in case of encoding detection problems
                  sudo: to use the "run as root"-feature
                  transmission-cli: for viewing bittorrent information
                  ueberzug: for previews of images
                  w3m: for previews of images and html pages

As you can see from the last line, you need w3m for image previews.

Fedora has the opposite default, it installs “recommended” packages by default.

Some how I stumbled across what was happening right after I posted. I ended up maximizing the window while inside of ranger and all of a sudden the previews started showing. In order to show the previews I have to toggle the maximize effect on the current konsole window. Afterwards the previews show and continue to show regardless as to whether or not the window stays maximized. So I guess something wonky is going on in konsole on EnOS (Arch) that isn’t happening in fedora, or at least isn’t happening at the moment. The version of konsole on Fedora 33 is version 20.13.2 and from arch it is 20.12.3. I didn’t think a minor version upgrade would cause this kind of issue. I decided to downgrade konsole to version 201.12.2 to see if the issue was present there. It was still present even in that version. Then I thought well maybe it was the transparency, blur, the use of the fish shell. These are the differences between my konsole setup on EnOS vs on fedora. I tried using bash and changing the profile back to a standard solid color background. Unfortunately, all to no avail. I’m stumped on the issue. After this I decided to move my current settings for konsole and use the completely default settings, but the issue still persists. For some reason I have to change the size of the terminal in order to get the previews to show up. I don’t even know where to file a bug report. Currently my new theory is that the issue is not with arch, fedora, or konsole, but with ranger itself not setting the proper values for length, width, and the rest. Next I’m gonna see if I can use ueberzug directly to show an image, and then see if the issue still persist.

1 Like

w3m is only one of the methods for image previews that ranger supports. I am attempting to use ueberzug. Unless ueberzug also depends on the w3m package. I made sure to specify pip --user so that anything installed did not affect the system. Instead everything was installed to the home directory.

1 Like

I just tested it and for me it works with either w3m or ueberzug with the appropriate settings.

I am not sure how helpful that is since we probably have lots of system differences

I also just checked to make sure, but w3m is also not present on my fedora system. It is definitely not a requirement unless you specifically want to use the the w3m to display images. The entire reason for the creation of ueberzug was to replace w3m as a method of displaying images because w3m’s method of displaying images was hacky at best.

1 Like

You are right. I just checked and it isn’t needed if you specify set preview_images_method ueberzug . If you don’t specify it, w3m is the default.

1 Like

It woks for me. I don’t know if you saw the reply I wrote to myself. The issue presently is not that it doesn’t show previews at all, but that I have to maximize and unmaximize the terminal in order to show them. The issue is only present in kde’s terminal emulator konsole. I don’t have the problem in xterm. The thing is, the issue is not present in konsole on fedora.

1 Like

For me, this doesn’t occur. It works regardless of the maximized state of the window. It even works in a split terminal.

1 Like

And that is why I am stumped on the issue here. I even tried resetting the konsole profile to default and deleting the config files.

1 Like

Did you try creating a new user account and seeing if the issue persists there?

1 Like

That will be my next step.

1 Like

Also, do you have anything else in your rc.conf? If you do, you might try testing with just:

set preview_images true
set preview_images_method ueberzug
1 Like

Sorry for taking a minute. I know that it works properly with a new user. That means it is definitely something wrong in the home folder. Also I didn’t have anything extra in my rc.conf. One thing I didn’t try was deleting my ranger config and starting over. That might work.

Deleting the ranger config and just recreating rc.conf didn’t work. I think has to be something with my konsole profile or maybe my font settings.

I think I made it worse somehow. xTerm isn’t working properly anymore either. I’ll try a full reboot and see how that goes.

Works here. Installed:

21 aur/ranger-git [installed] [146+] [1.63%] [26 Jun 2020]
aur/python-ueberzug-git 18.1.5.a8ac9c3-1 [installed] [4+] [0.00%] [5 Nov 2019]

Currently booted into bspwm, but it works on plasma too.

I might have to try the git versions from the aur and see if that makes a difference.

In the end, I’ve decided to just carefully move things over to a new user.

It turns out the issue was caused by the fish shell. I think I’ll switch back to zsh and see how that goes.