PDA

View Full Version : [ubuntu] Is there a way to reset wine to it's original state?



ki4jgt
March 2nd, 2010, 03:06 PM
Got a Windows virus

Cabs21
March 2nd, 2010, 03:09 PM
uninstall it
reintsall it
stop installing unknown .exe files from porn sites.... I mean be careful what you install into wine

shihkster1015
March 2nd, 2010, 03:19 PM
After you uninstall, go to home folder and show hidden files. Make sure the file ".wine" is not there anymore. And make sure that every instance of wine has been uninstalled. The best way would be to go to terminal and type

sudo apt-get autoremove *wine*Just make sure that the things listed after you press enter is not a vital system file or anything important you need.

Cabs21
March 2nd, 2010, 03:30 PM
After you uninstall, go to home folder and show hidden files. Make sure the file ".wine" is not there anymore. And make sure that every instance of wine has been uninstalled. The best way would be to go to terminal and type

sudo apt-get automreove *wine*Just make sure that the things listed after you press enter is not a vital system file or anything important you need.

as a note automreove command is spelled autoremove

shihkster1015
March 2nd, 2010, 03:34 PM
sorry 'bout that
typed a bit too fast

3Miro
March 2nd, 2010, 04:37 PM
Don't do that. First try moving the .wine directory


mv .wine .wine_mybackup

Then run the wine configuration utility


winecfg

This will create a new and clean .wine folder. You can start all over again without losing anything in the backed up .wine_mybackup folder.

You can actually still run programs from the old folder by using the WINEPREFIX variable:



WINEPREFIX=$HOME/.wine_mybackup wine "something.exe"


This will run the something.exe file, but use the old settings in .wine_mybackup.

shihkster1015
March 2nd, 2010, 04:40 PM
i still think it will be better to wipe out .wine cuz if you move it, the virus will probably be moved along with it. And if you try to run that file, you never know if the virus will strike again

d3v1150m471c
March 2nd, 2010, 04:43 PM
Yep, delete .wine then


sudo apt-get remove wine
sudo apt-get autoremove
sudo apt-get install wine

shihkster1015
March 2nd, 2010, 04:44 PM
Yep, delete .wine then


sudo apt-get remove wine
sudo apt-get autoremove
sudo apt-get install wine


just go ahead an autoremove. It's much cleaner

3Miro
March 2nd, 2010, 05:24 PM
i still think it will be better to wipe out .wine cuz if you move it, the virus will probably be moved along with it. And if you try to run that file, you never know if the virus will strike again

In any case remove will not remove the .wine folder. If you want to zap it completely use either purge or just

rm -fr .wine

@ki4jgt: btw, how did you find out about the virus, AV software usually doesn't work under wine and most windows viruses cannot harm wine dues to compatibility issues (wine is an API layer on top of the Linux kernel and not an emulation of the windows kernel, where most problems are). Also, you might want to notify people in winehq about this.

AndersAA
March 2nd, 2010, 05:35 PM
ignore everyone telling you to uninstall the wine package, it will do nothing.

Wine exists on a system level, your virus is running on a user level. And uninstalling wine won't remove the .wine directory in your home directory.

Paddy Landau
March 2nd, 2010, 05:44 PM
After you've reinstalled Wine (or, rather, deleted your .wine directory), before you install any Windows programs, install PlayOnLinux (http://www.playonlinux.com/). This lets you install every Windows program in a separate "prefix".

Then, if one prefix gets a virus, just tell PlayOnLinux to delete that one and reinstall the program that was there. All your other Windows programs -- and the main Wine program -- will remain unaffected.

ki4jgt
March 5th, 2010, 02:32 PM
First, I deleted the .wine folder, yet all my stuff is still the same after I reinstall. Second, My half witt, full brained cousin wrote the virus specifically for WINE, and we were playing around. It doesn't spread, like normal viruses, but it does cause one big headache

ki4jgt
March 5th, 2010, 02:35 PM
And I can't get rid of it

Paddy Landau
March 5th, 2010, 03:57 PM
My half witt, full brained cousin wrote the virus specifically for WINE, and we were playing around. It doesn't spread, like normal viruses, but it does cause one big headache
That's where PlayOnLinux should help. Unless your cousin got access to root (the Administrator), he can't have damaged Wine (and unfortunately it sounds as though he might have done).

But, generally, a Windows virus can damage only the Windows folder; in PlayOnLinux, each application has its own Windows folder, making it much safer (and hugely easier to uninstall).


And I can't get rid of it
Did you delete the .wine folder, and uninstall with autoremove, and reinstall as per the previous instructions?

Do this:


Uninstall with sudo apt-get purge wine
Remove old packages (in case your cousin got these files) with sudo apt-get autoremove
Clean up further with sudo apt-get clean
Now delete your Wine folder from your home directory with rm -rf ~/.wine (please type that carefully! or do it from Nautilus)

Reinstall Wine with sudo apt-get install wine
Finally, install PlayOnLinux (http://www.playonlinux.com/) (follow the installation instructions on the website). Use PlayOnLinux to install and uninstall Windows programs.

If that still doesn't work, then find out what else he might have changed. Did he change your file .bash_profile in your home directory? Did he change your menu's Wine entries?

nikhilbhardwaj
May 23rd, 2010, 08:01 PM
stop installing unknown .exe files from porn sites.... I mean be careful what you install into wine

damn
i get all my viruses like this

3Miro
May 23rd, 2010, 10:16 PM
damn
i get all my viruses like this

I always enjoy a good piece of Necromancy!

texaswriter
May 24th, 2010, 02:06 AM
i still think it will be better to wipe out .wine cuz if you move it, the virus will probably be moved along with it. And if you try to run that file, you never know if the virus will strike again

The Windows virus can't affect Linux, so moving the folder would suffice. Viruses aren't magical, they actually have to be memory resident to do anything.

Shouldn't need to un/re install Wine either.

If you really feel like it, you may certain do all the above things.