
I switched to Linux (Ubuntu 22.10) recently after using Windows for literally decades. While there are pros (like performance) and cons (like system stability) for this choice, I want to quickly describe one specific problem I faced, and how I solved it. Maybe this helps someone 😉
What is IrfanView?
IrfanViewirfanview.com is one of the most popular image viewers there is. It is very quick and lightweight, but also has some pretty neat features to edit images quickly. While there is no native Linux support, it is possible to run IrfanView using Wine.
Problem: Scaling issues with IranView using Snap and Ubuntu 22.10
As it turned out, simply installing IrfanView using theSnap entry didn't work.
The main problem was that thescaling of the system menu on my 4K monitor didn't work, it was super tiny. Wine has an option to set a custom dpi value (viawinecfg
underGraphics
), but this didn't affect IrfanView 😥
Solution: Use Wine without Snap
After a lot back and forth, I removed the snap version of IrfanView and tried Wine (stable) directly. This is as simply as downloading IrfanView's ZIP file and then runningi_view32.exe
with theWine Windows Program Loader
(viaOpen With
) orwine i_view32.exe
in the terminal.
And to me amazement, this worked immediately. No more unreadable system menu bars 🎉
There was only one more thing I wanted: It should be possible toopen images directly with IrfanView (e.g. viaOpen With
in the file browser).
To make a long story short, you need to do the following:
1. Create a.desktop
file
Create a fileIrfanView.desktop
in yourhome
folder. Don't forget to add the correct path instead of the twoTODO
s!
[Desktop Entry]Name=IrfanViewComment=Open Images with IrfanviewwKeywords=image;Exec=/usr/bin/env sh -c "winepath -w -0 %F | WINEPREFIX='/home/TODO: your user/.wine' xargs -0 wine /home/<TODO: YOUR PATH HERE>/irfanview/i_view32.exe"Terminal=falseType=ApplicationStartupNotify=trueMimeType=image/jpeg;image/png;
TheExec
section passes the target file to wine (and irfanview), but also useswinepath
to transform the file path to a "Windows path" so that IrfanVIew understands it.
2. Register your application wrapper
In yourhome
directory, runsudo desktop-file-install IrfanView.desktop
This validates the file you created, and adds it to the "Open With" applications.
Cheers!
Top comments(0)
For further actions, you may consider blocking this person and/orreporting abuse