Package: wine-ctl
Manage Wine PrefixesThe goal of this tool is to manage Wine prefixes from the command line.It is a very thin wrapper around Wine commands to make it simple to
manage multiple prefixes and usual commands (winetricks, dxvk).InstallationYou can install it using PyPI:pip install wine-ctlOr you can run it in-place since it has very few dependencies (you only
need the ansible-roles-ctl script, version.py is only used in the build
process).You need the following dependencies:Wine, any version except:6.5 and 6.6becausewine startis brokenPython >= 3.6 with the following libraries:pyyamljsonschemaargcomplete >= 1.9.2On Debian systems you can install them using:apt install wine64-development wine32-development python3-yaml python3-jsonschema python3-argcompleteOr you can useWineHQ package.These are also recommended:apt install winetricks dxvk-wine64-development dxvk-wine32-developmentYou can use the stable version of Wine on Debian too, but if
wine-development is available then it will be preferred.Configuration fileThe~/.config/wine-ctl.ymlconfiguration file is required but very
simple. In fact onlyinstall_pathis needed to know the path of your
Wine prefixes.Necessary binaries are automatically found in thePATHbut it is
possible to createoverrides.If you have aprogram library, then you can specify
the path (app_lib_path) where your downloaded files are stored. Then
if you create prefixes with the same game directory name it will reflect
on the listing and suggest installers to run at creation time.If you wish certain files to be present in your home directory in the
Wine prefix (your Windows home), then you can specify the path of files
to be copied (home_skel) when the prefix is created.You may also wish to define specific environment variables to be set
when running Wine in a prefix. This can be handy to pass parameters for
your driver (RADV_PERFTEST), libraries (SDL_VIDEODRIVER, recommend
empty on Wayland at the moment), or tools (DXVK_*).Binaries SchemesIn thebin_path_schemesdictionnary in the configuration you can
define any number of custom schemes which define where to find
specific binaries. It can be useful if you wish to switch between
different version of Wine and related tools.The paths forwine,winedbg,wineboot,winecfg,dxvk-setupandwinetrickshave to be defined, although the patch fordxvk-setupandwinetricksmay be set toNullto lookup on the PATH instead of an
override.To select a specific scheme use the--bin-path-schemecommand line
option (or the shorter-s). You can define a default scheme to use
anytime this option is not specified with thedefault_bin_path_schemeconfiguration file parameter.A common configuration for WineHQ packages would be:bin_path_schemes:
  devel:
    wine: /opt/wine-devel/bin/wine
    wineserver: /opt/wine-devel/bin/wineserver
    winedbg: /opt/wine-devel/bin/winedbg
    wineboot: /opt/wine-devel/bin/wineboot
    winecfg: /opt/wine-devel/bin/winecfg
    'dxvk-setup':
    winetricks:
  staging:
    wine: /opt/wine-staging/bin/wine
    wineserver: /opt/wine-staging/bin/wineserver
    winedbg: /opt/wine-staging/bin/winedbg
    wineboot: /opt/wine-staging/bin/wineboot
    winecfg: /opt/wine-staging/bin/winecfg
    'dxvk-setup':
    winetricks:
default_bin_path_scheme: develProgram LibraryA library is simply a storage layout for your programs:one subdirectory per gameeach subdirectory containing installers for the game
(setup, patches, mods…)GoG users usinglgogdownloaderto download their games will end-up with such a structure but you do not
need to use GoG to use this feature, you just need to store your files
using this simple layout.To enable use of the library you just need to specify theapp_lib_pathin your configuration file.When creating a new Wine prefix, if you use the same name as the program
subdirectory, then wine-ctl will know it is part of your library and
several commands will take advantage of this.CompletionCommand completion is done usingargcomplete.
It needs to be enabled first to work. The easiest way is to use theactivate-global-python-argcomplete3script as root. Other methods are
described on theargcompletewebsite.Firejail Support(for wine commands only)You may set thefirejail_profileparameter with the name of the
Firejail profile to use to enable this feature.It is recommended that you further restrict all directories that should
not be read or written by Wine. The library path, if used, should be set
read-only. You may also restrict access to your Wine prefixes using a
glob and the needed prefix will be authorized.Iffirejail_nonetis set to True (the default), then net access will be
restricted except for winetricks.GameMode SupportIfgamemoderunis found in the path then it will automagically be used to run
the program.If also using Firejail, then you need to add "ignore noroot" in your local
overrides (~/.config/firejail/<firejail_profile>.local).UsageSyntax is as follow:wine-ctl [global options] [subcommand] [subcommand options]You can use -h/--help option to list all available options at command
and subcommand level, as well as all available subcommands.Follows documentation about the various subcommands.Listwine-ctl listThis subcommand displays the list of properly setup prefixes. TheLflag indicates it is part of your library.createwine-ctl create <prefix-name>This subcommand creates a new prefix. You may also specify the-uoption if you wish to update an already created prefix.If you wish to lookup for an installer in your library then use the-loption. The prefix name needs to match the game directory in your
library. You can run multiple installers using this command, one at a
time, as the prefix will be preserved after the first invocation.configwine-ctl config <prefix-name>This subcommand is a shortcut for the winecfg command. It is equivalent
towine-ctl run <prefix-name> winecfg.runwine-ctl run <prefix-name>This subcommand runs a command in the prefix. If not specified then a
list of available shortcuts (lnk) will be presented. If--exeis used
then available executables are listed instead.The command can be either a UNIX path (practical to select an installer)
or a command which should be available in the prefix already (likeusual Wine commands: winecfg, winefile, control, wineconsole…).
If you wish to specify command options the you need to quote the
command, for e.g.:wine-ctl run <prefix-name> "reg query 'HKEY_CURRENT_USER\Software\Wine\DllOverrides'"dxvkwine-ctl dxvk <prefix-name>This subcommand is a wrapper to install or uninstallDXVKin the prefix.If run without action then it displays the current installation status.trickwine-ctl trick <prefix-name>This subcommand is a wrapper to runwinetricksin the prefix.dosboxwine-ctl dosbox <prefix-name>This subcommand scans for dosbox games and run them using a locally installed dosbox engine.Currently only GOG layouts are detected.This avoid going through Wine as dosbox is available in many distributions. Moreover it may be beneficial to use a more recent version than the one shipped with the game.The~/.config/wine-ctl_dosbox.confconfiguration file, if present, is used to override specific settings. For example it may be convenient to change themidi/midiconfigparameter to match your sound configuration.Additionally, mount and imgmount paths are converted to UNIX slash convention on-the-fly using temporary files (leaving the original files untouched).scummvmwine-ctl scummvm <prefix-name>This subcommand scans for scummvm games and run them using a locally installed scummvm engine.This avoid going through Wine as scummvm is available in many distributions. Moreover it may be beneficial to use a more recent version than the one shipped with the game.librarywine-ctl libraryThis subcommand displays the list of programs in the library. TheIflag indicates it is installed (in a Wine prefix of the same name). Thewandlflags indicate if an installer is available for Windows or
GNU/Linux, respectively.shutdownwine-ctl shutdown <prefix-name>This subcommand shuts down the prefix: all processes in the prefix are
terminated. It waits for the shutdown to be completed.debugwine-ctl debug <prefix-name>This subcommand displays the list of processes in the prefix and runwinedbgin order to collect debugging information about a faulty
program.More information about the procedure is available on theWine wikiand in thewinedbgmanpage.