protontricks icon indicating copy to clipboard operation
protontricks copied to clipboard

Allow using --gui option from Winetricks (or see alternative)

Open Tiagoquix opened this issue 4 months ago • 2 comments

Winetricks has the following option:

--gui=OPT         Set OPT to kdialog or zenity to override GUI enginex

This allows to use zenity on KDE desktops.

However, I am not able to use that on protontricks. I can only modify the initial dialog with the env. var. PROTONTRICKS_GUI.


Alternative

Although the issue is to allow using --gui from Winetricks, I would say the best thing to do would be to remove the PROTONTRICKS_GUI option and force yad for the initial dialog and zenity for the posterior dialogs for everyone.

Yad for the initial is because the zenity for the initial doesn't show icons; and Zenity for the initial instead of kdialog because kdialog has some visual inconsistencies.

I reported this downstream on Fedora, but I think it is relevant here as well.

This is not a problem for the Flathub package from Protontricks as that one always use Yad and then Zenity on every distro.

Tiagoquix avatar Aug 02 '25 18:08 Tiagoquix

If running Winetricks commands for a single Steam app, it's possible to use Winetricks' --gui like this:

$ protontricks 220 --gui=zenity

In this case everything after the app ID is provided to Winetricks without Protontricks parsing any of it.

PROTONTRICKS_GUI exists because Protontricks supports both Zenity and YAD (YAD is preferred, as you've noticed), while Winetricks as a separate project supports Zenity and KDialog. So removing PROTONTRICKS_GUI in favor of a single --gui parameter that supports both Protontricks and Winetricks is not really a possibility, or I'd have to decide what GUI command Winetricks should use if --gui=yad was provided. Or the other way around with --gui=kdialog.

Protontricks tries to stay unopinionated as far as Winetricks is involved; it doesn't assume much besides that Winetricks supports a --gui parameter that will open the GUI.


I suppose Protontricks' --gui flag could be updated to accept an optional value that is then passed to Winetricks; this would maintain backwards compatibility while not being hard to support. But having the flag enable the Protontricks GUI with the value being used for the Winetricks GUI could introduce confusion.

Alternatively, Winetricks could be updated to allow setting WINETRICKS_GUI outside the command, if the developer accepts a PR implementing it. At the moment it's set internally by Winetricks and will ignore and override any existing WINETRICKS_GUI environment variable.

Matoking avatar Aug 09 '25 16:08 Matoking

From my understanding, I think forcing YAD (for the initial selection) and Zenity (for the posterior screens), for everyone, is the best solution. Kdialog seems very incomplete (at least from my testing with the RPM package from Fedora), and I think Winetricks developers maybe leaned towards more support for GNOME? I dunno if they have a say on how the menus are drawn, but I can say for sure that it looks way better with Zenity.

I'll create an issue upstream linking to this one, but nevertheless I think the ideal solution is to force Yad and Zenity on everyone.

IIRC "pure" winetricks doesn't use YAD because there is no reason to, since you would specify a prefix beforehand with PREFIX=path winetricks, so only Zenity would be used.

Tiagoquix avatar Aug 09 '25 22:08 Tiagoquix