WineGUI icon indicating copy to clipboard operation
WineGUI copied to clipboard

pass environment variables to wine

Open geovex opened this issue 2 years ago • 7 comments

Is there any way to configure different environment variables for "machines". I'm mostly interested in passing different LANG

geovex avatar Nov 10 '23 13:11 geovex

Uhm. Good request. I didn't implement such feature. I could add this in the future so you can add additional environment variables to the wine bottle.

The only alternative for now is to do it manually using command line with the correct wine prefix.

melroy89 avatar Nov 10 '23 13:11 melroy89

I tried modify wine registry, but it works only for running applications, not wine itself and it won't solve any encoding issues. The only alternative for now is starting winegui in prepared environment (and it will share environment across machines) or start wine manually (kind of defeats the purpose)

geovex avatar Nov 10 '23 14:11 geovex

I agree, again it's not implemented. Thanks for your feedback.

melroy89 avatar Nov 10 '23 14:11 melroy89

https://github.com/nisetynet/WineGUI/commits/implement_env_vars_support/

I was able to supply environment variables to wine without affecting existing code. I could pass the environment variable in BottleManager::run_executable function, but I am not sure if we should have an environment variable setting for each Bottle or if we should ask the user to enter the environment variable each time they press the Run button.

nisetynet avatar Feb 17 '24 13:02 nisetynet

The former. I should make an option at Edit to add environment variables to the bottle. Which gets added to the run or maybe also to the application list.

melroy89 avatar Feb 17 '24 14:02 melroy89

If you don't have time for this, I'll try on behalf of you.

nisetynet avatar Feb 18 '24 08:02 nisetynet

Upstream ticket is created: https://gitlab.melroy.org/melroy/winegui/-/issues/41

melroy89 avatar May 05 '24 08:05 melroy89

https://github.com/nisetynet/WineGUI/commits/implement_env_vars_support/

I was able to supply environment variables to wine without affecting existing code. I could pass the environment variable in BottleManager::run_executable function, but I am not sure if we should have an environment variable setting for each Bottle or if we should ask the user to enter the environment variable each time they press the Run button.

I think I will start working on this item.

I also think the easiest way is to indeed implement a list (aka array) of environment variable(s) a user can configure on the "bottle" level.

Since I think configuring env vars per application will make the UI too complex for most people.

melroy89 avatar Aug 23 '24 19:08 melroy89

This is now resolved! https://gitlab.melroy.org/melroy/winegui/-/merge_requests/37

I will release v2.6.0 soon, which will have this functionality.

melroy89 avatar Aug 25 '24 11:08 melroy89