pospichalales never say only. I was very much a brat when I was young. I found many ways of breaking out of limited applications locks under Windows due to application flaws. Wine will be no exception.
/programy/Terasoft/MATEM/MATEM1.exe is this a full unit path? If its inside /home/windows it will need to be /home/windows/programy/Terasoft/MATEM/MATEM1.exe
/usr/bin/wine start /Unix /programy/Terasoft/MATEM/MATEM1.exe This line it self from security should be in a shell script that drops any extra Arguments passed. Arguments equal bad.
Next you need to define WINEPREFIX so it becomes something like.
WINEPREFIX=[where ever the wineprefix is] /usr/bin/wine start /Unix /programy/Terasoft/MATEM/MATEM1.exe
Defaults!/path/to/command env_keep=HOME
or
Defaults!/path/to/command env_keep=DISPLAY
in sudo can remove the requirement for /usr/bin/xhost +local:windows
You will find doing a man wine there are a lot of environmental vars that can alter how wine functions. Some of these to prevent users doing unattended things need to be formally set if you use env_keep=HOME.
In fact this is bad in a lot of ways to use the xhost solution. This is also why embeding the long command in a shell script is a good thing.
Now even if this works I still hate it. pospichalales there are a lot of security issues you have just created.
If you are after to save on space you are better off to redirect drive c.
Your uses could run into horible problems.
1) Applications refusing to run twice.
2) Application setting changes being global.
Basic wine prefix layout.
/.wine/*.reg these files are intended to be 1 copy per user.
/.wine/dosdevices These are also one copy per user. Altering c: in here can alter drive_c location to else where.
Basic wine operations. wine-server runs 1 copy per prefix/user. This manages the registry. So this is where hell comes to play. Every user using sudo run run wine as user windows will be sharing the one and only wineserver. So if wineserver crashes everyone will crash in your design.
pospichalales fixing bug 11112 properly would be the way forwards. But this requires the parties needing this feature to either put up developers or money to get it done.
http://bugs.winehq.org/show_bug.cgi?id=11112
pospichalales yes I have giving you advice that might make this work. But I totally don't recommend the path you are on it could break insanely badly. Mostly because wine is not designed to be shared.