The officially official Devuan Forum!

You are not logged in.

#1 2025-12-21 00:11:58

Micronaut
Member
Registered: 2019-07-04
Posts: 258  

Multiple Windows programs in a single wine config?

Though there are many good things in Linux, not everything is completely/perfectly duplicated from the Windows ecosystem. Nice utilities like IrfanView, for example. In the process of trying to figure out how to move completely to Linux, I am finding an annoying problem. As it currently works, wine makes a completely separate custom installation for each and every Windows program you want to accommodate. Why is this? Some sort of technical limitation? It threatens to make a real mess in the user account if you want to bring over a dozen utilities or more. Why couldn't you have a single 'virtual windows' install with many utilities running in the same directory with the same virtual windows files? (Is this maybe a specialized question for the wine developers? Where could I ask them this question directly?)

Offline

#2 2025-12-21 01:49:38

Altoid
Member
Registered: 2017-05-07
Posts: 1,953  

Re: Multiple Windows programs in a single wine config?

Hello:

Micronaut wrote:

... maybe a specialized question for the wine developers?

Right on the dot you are.
Wine has nothing to do with how Linux works, so this is really not the place to ask.

Micronaut wrote:

Where could I ask them this question directly?

Here: https://forum.winehq.org/viewforum.php?f=8

I fully understand what you are referring to and am currently suffering some of it. (I run IrfanView and Pegasus Mail)
But I doubt that it is something that can easily be done.

Each and every MS application does [whatever] within (as you say) the MS ecosystem but Wine does not provide an ecosystem.
ie: it is not an emulator so it does not emulate an MS ecosystem: it just gives each of the applications the shit they need to work in Linux.

At least that is what I think I understood.

Best,

A.

Last edited by Altoid (2025-12-21 03:12:17)

Offline

#3 2025-12-21 07:47:42

Calamity
Member
Registered: 2021-10-23
Posts: 37  

Re: Multiple Windows programs in a single wine config?

Wine should not generate a separate prefix for every program launched/installed via it. It provides a way (winecfg) to configure .dll overrides etc. separately for each application if necessary, but it's all done within the current prefix. If you use some kind of frontend for Wine, like playonlinux or lutris, prefixes may be generated for every application, depending on the frontend's settings. But plain Wine doesn't do that, as far as I know.

By default, the only time when a prefix (a 'Windows installation') is generated automatically is when you launch winecfg or a Windows program the first time after installing Wine (and it will be a 64-bit prefix which is not desirable in many situations).

Offline

#4 2025-12-21 10:29:51

rations
Member
Registered: 2025-11-06
Posts: 23  

Re: Multiple Windows programs in a single wine config?

Try installing winetricks sudo apt install winetricks type winetricks in the terminal to open the GUI. Select use default wine prefix then select uninstaller. You can install with the remove/install button. I only install vsts but they're all in the default prefix.


You will own nothing and be depressed

Offline

#5 2025-12-21 16:17:05

JWM-Kit
Member
Registered: 2020-06-29
Posts: 160  
Website

Re: Multiple Windows programs in a single wine config?

I don't use wine much, but the way I remember it was that wine installs everything in the default wine prefix ~/.wine unless configured differently. Has this changed or is the issue related to a specific tool being using to manage wine, or how a specific distro/respin is configured?

Also, my advice is use native software as much as possible. IrfanView is good software, but considering all the image viewers available for Linux I can't imagine using it instead of native software. A big part of moving to a different OS is moving to native apps. Wine is great when there is no alternatives for the software, but I don't think IrfanView is that special. I can take or leave it and I'll definitively leave it before running it in wine.

Offline

#6 2025-12-21 17:19:13

Calamity
Member
Registered: 2021-10-23
Posts: 37  

Re: Multiple Windows programs in a single wine config?

I agree about the native applications. Most of the beloved Windows programs do have their replacements. A good Linux alternative for IrfanView is xnview, it's not in the repositories but the official site offers a .deb package that should be pretty straightforward to install. https://www.xnview.com/en/

It's not an exact 1:1 clone, but the two have a lot in common feature- and interface-wise. I use it to manage my picture collection and as a basic editor, and don't really miss IrfanView - although I do keep a portable copy of it in the prefix just in case. One useful thing xnview currently lacks is quick batch optimization of JPEGs from the thumbnail view. But this can still be done via the command line as jpegoptim is in the Debian repos.

Offline

#7 2025-12-21 20:17:13

greenjeans
Member
Registered: 2017-04-07
Posts: 1,378  
Website

Re: Multiple Windows programs in a single wine config?

One useful thing xnview currently lacks is quick batch optimization of JPEGs from the thumbnail view. But this can still be done via the command line as jpegoptim is in the Debian repos

Or even simpler:

#!/bin/sh

sizebox=$(yad --fixed --borders=10 --window-icon=image --form --title="Resize Image" --field="Resize to:" --width=400 --text-align=center --text="Enter new size (W x H in pixels, i.e. 800x600, 1024x768 etc.)")

size=$(echo $sizebox | awk 'BEGIN {FS="|" } { print $1 }')

if [ -z "$size" ]; then
    exit 0
fi

for file in "$@"; do
    convert "$file" -resize "$size" -set filename:copy '%d/%t-%wx%h' '%[filename:copy].jpg'
done

Combined with a .desktop in your file-manager in the right place:

[Desktop Entry]
Type=Action
Name=Resize Image
Comment=Make a re-sized copy of image
Icon=edit-cut
Profiles=resize;

[X-Action-Profile resize]
Exec=sh -c "cd %d && shrink2 %F" 
MimeTypes=image/bmp;image/jpeg;image/png;image/webp;image/heic;image/heif;image/avif;

And now you can just select in the file-manager and right-click. This makes for tiny file sizes and default output is jpg. Easy enough to tweak settings to change any of it.

It will do singles, and it will do batches as long as they're the same format, wouldn't be too hard to make it do mixed batches too though, i'm just lazy lol. lol


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded October 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. wink Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#8 2025-12-21 20:29:20

Calamity
Member
Registered: 2021-10-23
Posts: 37  

Re: Multiple Windows programs in a single wine config?

Oh, this is pretty cool, although I'm sure xnview can do basic batch resize as well. By optimization I meant the lossless compression of JPEGs by optimizing their Huffman table, clearing metadata and optionally making them progressive. The actual image data is left intact by this operation, but the size is reduced considerably if the pictures are big and there's a lot of them in the folder. This is what IrfanView can do using jpegoptim as a backend. Xnview currently cannot, however in Debian 12 there was a program called trimage which is a very basic GUI for this kind of lossless optimizers (for JPEG and PNG... the latter ones are very slow), and I just found out the package still works in 13 even though it's not in the repositories for whatever reason. Anyway, nice trick, it can certainly be useful for quck resizing of needlessly huge images!

Offline

#9 2025-12-21 21:34:35

greenjeans
Member
Registered: 2017-04-07
Posts: 1,378  
Website

Re: Multiple Windows programs in a single wine config?

^^^Good points! But that's the neat thing about Imagemagick, the command in the above script is just very basic using IM's default settings, but it only takes a few other small commands to do it in a different fashion. Just adding -strip to the above command takes out profiles and comments and such. And the default setting in IM already is to compress by optimizing the Huffman table.

Most image re-sizing programs i've seen are just frontends for IM. wink


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded October 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. wink Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#10 2025-12-21 22:01:22

Calamity
Member
Registered: 2021-10-23
Posts: 37  

Re: Multiple Windows programs in a single wine config?

I've heard about ImageMagick, a very versatile tool indeed. Not sure if xnview uses it for anything, I think it has its own internals for metadata swiping (can do that at least). But it sure would've been nice to have everything in one toolbox - that's why I like trimage (and PNG Gauntlet on Windows). Maybe one day they will finally add real optimizer options in xn. As for the frontends to IM, I do like converseen. And for applying various filters, gmic is just another great tool that seems to be inspired by the IM.

Offline

#11 2025-12-22 00:59:40

Micronaut
Member
Registered: 2019-07-04
Posts: 258  

Re: Multiple Windows programs in a single wine config?

LOL... this thread has gone off the rails.

But the first few replies raise some interesting issues. Yes, I have Lutris on the system(s) I am currently using. One is Devuan 5, the other is MX Linux 23.6, and both have games. So this is a quirk of Lutris? Here's the addition problem then. When I accidentally click on the Windows notepad entry that appears in some 'choose what to open this with' dialogs, I get a pop up telling me that the Wine config in one of those game directories is being 'reconfigured' and there is a ridiculous amount of disk thrashing. I have to wait a full minute or more for the mistaken choice to pop up so I can kill it. And then when I go to run that game, I get a similar pop up and a similar amount of disk thrashing before the game will load. Could that be WHY the developers of Lutris chose to do what they did? Does Wine "reconfigure" its files for every program that you start with it? That would be very annoying. I can see why they have the separate prefixes and directories if that is how it behaves.

Offline

#12 2025-12-22 06:21:33

EDX-0
Member
Registered: 2020-12-12
Posts: 188  

Re: Multiple Windows programs in a single wine config?

speaking of image viewers, in my opinion nothing beats nsxiv https://codeberg.org/nsxiv/nsxiv the interface may be super minimalist but the extensibility and scripting are unmatched, not to mention the latest release is available on devuan stable.

as for optimizing images... i just convert jpg and webp to png and run the pngs through optipng with these scripts

topng

#!/bin/sh

myname="${0##*/}"

convert_to_png () {
    img="$1"
    imgname="${img%.*}"
    pngname="${imgname}.png"

    if [ -f "$pngname" ]; then
        printf 'image: %s already exists!\n' "$pngname"
        if [ -f "$img" ]; then
            trash-put "$img"
            printf 'image: %s deleted\n' "$img"
        fi
    else
        convert "$img" "$pngname"
        printf 'image: %s created\n' "$pngname"
        if [ -f "$img" ]; then
            trash-put "$img"
            printf 'image: %s deleted\n' "$img"
        fi
        optipng -quiet "$pngname"
        printf 'image: %s optimized\n' "$pngname"
    fi
}

if [ $# -lt 1 ]; then
    printf '%s\n' "$myname: error no images passed"
    exit 1
fi

while [ $# -gt 0 ]; do
    if [ -f "$1" ]; then
        if file "$1" | grep -q "image"; then
            convert_to_png "$1"
        else
            printf '%s\n' "$myname: '$1' is not an image!"
        fi
    else
        printf '%s\n' "$myname: '$1' does not exist!"
    fi
    shift
done

jpgconvert

#!/bin/sh

for image in "${PWD}"/*.jp*g; do
    topng "$image"
done

back to OP, wine does little assumptions so it only creates the default wine prefix and runs every program with said prefix unless a prefix is explicitly set.

personally i do not like letting wine create .desktop files and prefer to write runscripts and dedicated .desktop files for the programs i want to run with wine, that includes setting their wineprefix, for that reason i got a runscript template that works for most stuff you wanna run through wine

runscript template

#!/bin/sh
# wine runscript

myname="${0##*/}"
execdir=""
execname=""

# load config
configdir="${XDG_CONFIG_HOME:-$HOME/.config}/${myname}/"
config="${configdir}/config.rc"
if [ -r "${config}" ]; then
    . "${config}"
else
    if [ ! -d "$configdir" ]; then
        mkdir -p "$configdir"
    fi
    echo "# ${myname} runscript config" > "$config"
fi

# go to executable directory
cd "$execdir" || exit

# run executable
wine "$execname"

with that the runscript's config can be as follows

# runscript config
# wineprefix
export WINEPREFIX="${HOME}/.local/share/wineprefixes/pref1"

for a real example my photoshop cs6 runscript

#!/bin/sh
# wine runscript

myname="${0##*/}"
execdir="$HOME/Downloads/Photoshop portable/Photoshop cs6 portable/"
execname="PSCS6.exe"
WINEPREFIX="$HOME/.local/share/wineprefixes/photoshop"

# load config
configdir="${XDG_CONFIG_HOME:-$HOME/.config}/${myname}/"
config="${configdir}/config.rc"
if [ -r "${config}" ]; then
    . "${config}"
else
    if [ ! -d "$configdir" ]; then
        mkdir -p "$configdir"
    fi
    cat << __CONF__ > "$config"
# ${myname} runscript config
WINEPREFIX="\$HOME/.local/share/wineprefixes/photoshop"
__CONF__
fi

# go to executable directory
cd "$execdir" || exit

# export prefix
export WINEPREFIX
# run executable
wine "$execname"

Offline

#13 2025-12-22 10:15:15

Calamity
Member
Registered: 2021-10-23
Posts: 37  

Re: Multiple Windows programs in a single wine config?

Yes, this is clearly not normal Wine behavior. If prefix configuration runs every time a Windows application is launched, something else is causing it to do so.
And that 'something' is probably Lutris's automatic Wine version management (which is enabled by default).

The disk thrashing is most likely due to Wine writing new prefix folders (~600MB-1GB each!), I suggest checking the disk space whenever this happens.

Lutris facilitates some tasks to make Windows games more compatible with Linux (like automatic screen resolution restoration, changing locale on demand, disabling desktop compositor...), however I found that it's best to never ever let it muck around with Wine prefixes and versions. This can cause problems. The default Wine from the repositories is sufficient in most cases. As much as I like Lutris when it comes to keeping a neat game library instead of crammed and unreliable Wine menus, I find its 'Wine management' feature way too intrusive, so I just disable it altogether:

Check under Preferences > Updates > Wine update channel, and make sure it's set to Self-maintained.
Also might be a good idea to turn off Lutris Runtime updates.

Under Preferences > Runners > Wine have Use system Winetricks enabled. Just go through every setting and disable any auto-updates wherever possible. It's much better to have manual control over such things, automatic updates have too many pitfalls. Prefixes may become unusable, or Wine itself may start to behave strangely, like in your case.

After adjusting these options, regenerate your Wine prefix. Back up your games and other actual program data, then just delete the ~/.wine folder.
Then create a new 32-bit prefix with the following command:

WINEARCH=win32 WINEPREFIX=~/.wine winecfg

(this is assuming you don't need any 64-bit Windows applications... otherwise just run winecfg and that's it)

You can also use winetricks for the above procedure, but it's very easy to do this in the command line.
Plus it gives you an idea of what exactly you are doing.

You may need to re-enter registration key information or other stuff after putting the games back into the newly created prefix.
Another option is to simply install them again from scratch.

Don't use Lutris to install games. Instead, run installers in plain Wine and then add an already installed game to Lutris using the corresponding option. And avoid clicking on the Manage Wine Versions button beside the Runner settings. Lutris loves to download its own Wine stuff at the slightest provocation.

----

When it comes to the 'minimal' image programs, I once checked out qimgv and it seems pretty good, although I personally prefer viewnior as a bare-bones quick viewer.

There's also fotoxx / fotocx which looks feature-packed but the interface is ... ugh. Another simple viewer with the thumbnails window is phototonic.

Last edited by Calamity (2025-12-22 14:20:21)

Offline

Board footer