Different behaviour between "winefile" and "sudo winefile" commands

Questions about Wine on Linux
Locked
mm.ff
Newbie
Newbie
Posts: 1
Joined: Sun Jul 10, 2022 2:10 pm

Different behaviour between "winefile" and "sudo winefile" commands

Post by mm.ff »

Hi,
I have installed the last stable version of Wine (7.0) on Ubuntu 20.04.1_x64.

I launched Wine using the command "winefile", I installed a Windows program and I run it: all was fine.
After closing winefile, I relaunched Wine using "sudo winefile": I found an empty Windows environment without the program I previously installed.

It seems that "winefile" and "sudo winefile" creates two independent Windows environments: why ?
Actually the Ubuntu user in both cases is always the same (sudo simply allows the same user to execute commands which require superuser permission).

Is there a way to delete one of the 2 Windows environments ?

Thanks a lot for your help.
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: Different behaviour between "winefile" and "sudo winefile" commands

Post by jkfloris »

When wine is run with the sudo command, a new wineprefix (fake Windows installation) is created in /root/.wine.
You can delete the wineprefix in /root/.wine with:

Code: Select all

sudo rm -r /root/.wine
For security reasons, it is not recommended to run wine as root/sudo. Usually this is not necessary either.
https://wiki.winehq.org/FAQ#Should_I_ru ... as_root.3F
Locked