Question about Winetricks...

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
r2rX
Level 3
Level 3
Posts: 69
Joined: Thu Apr 29, 2010 4:28 pm

Question about Winetricks...

Post by r2rX »

Hi guys.

From what i've gathered, you can either download winetricks manually or use the version, placed in /usr/bin, that comes with WINE when installing it in Ubuntu.

At the moment, i'm depending on the version that came pre-configured with WINE 1.2 rc5.

A question, though.....if I run winetricks via gksu winetricks, as opposed to sh winetricks, does that make a difference on how it will save the settings on my account?

Cause I can only run it as gksu....sh does not work...it says:

Code: Select all

/usr/bin$ sh winetricks
winetricks: 3824: cannot create /home/ready2rumbelx/.wine/dosdevices/c:/winetrickstmp/zenity.sh: Permission denied
winetricks: 3824: cannot create /home/ready2rumbelx/.wine/dosdevices/c:/winetrickstmp/zenity.sh: Permission denied
sh: Can't open /home/ready2rumbelx/.wine/dosdevices/c:/winetrickstmp/zenity.sh
Is this normal? Does winetricks running as 'root' save the necessary settings applicable for Wine on my account/profile?

Cheers.

r2rX :D
r2rX
Level 3
Level 3
Posts: 69
Joined: Thu Apr 29, 2010 4:28 pm

Post by r2rX »

Okay.

Two things:

1.) Any settings i've configured with winetricks, so far, has not applied to my .wine folder (in my user folder). Any and all settings have gone to /root/.wine

2.) Whether I run winetricks from /usr/bin, or run it from a downloaded version; executing it with 'sh' simply does not work...I get the same error as posted above.

This is, obviously, not normal.

r2rX :D
User avatar
dimesio
Moderator
Moderator
Posts: 13372
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

r2rX wrote: 1.) Any settings i've configured with winetricks, so far, has not applied to my .wine folder (in my user folder). Any and all settings have gone to /root/.wine
Of course it does. You've been running it as root.
http://wiki.winehq.org/FAQ#head-96bebfa ... 78b0d41014
2.) Whether I run winetricks from /usr/bin, or run it from a downloaded version; executing it with 'sh' simply does not work...I get the same error as posted above.
I don't know how it's set up in Ubuntu, but openSUSE also includes winetricks in its Wine package, and I can run that winetricks with just the winetricks command, no sh, and no need to change directories.
John Drescher

Question about Winetricks...

Post by John Drescher »

On Mon, Jul 5, 2010 at 1:56 PM, r2rX <[email protected]> wrote:
Hi guys.

From what i've gathered, you can either download winetricks manually or use the version, placed in /usr/bin, that comes with WINE when installing it in Ubuntu.

At the moment, i'm depending on the version that came pre-configured with WINE 1.2 rc5.

A question, though.....if I run winetricks via gksu winetricks, as opposed to sh winetricks, does that make a difference on how it will save the settings on my account?

Cause I can only run it as gksu....sh does not work...it says:


Code:
/usr/bin$ sh winetricks
winetricks: 3824: cannot create /home/ready2rumbelx/.wine/dosdevices/c:/winetrickstmp/zenity.sh: Permission denied
winetricks: 3824: cannot create /home/ready2rumbelx/.wine/dosdevices/c:/winetrickstmp/zenity.sh: Permission denied
sh: Can't open /home/ready2rumbelx/.wine/dosdevices/c:/winetrickstmp/zenity.sh



Is this normal? Does winetricks running as 'root' save the necessary settings applicable for Wine on my account/profile?
No this is not normal. Have you ever run wine as root, su, sudo. If so
you messed your virtual wine up.

John
Martin Gregorie

Question about Winetricks...

Post by Martin Gregorie »

On Mon, 2010-07-05 at 12:56 -0500, r2rX wrote:
Code:
/usr/bin$ sh winetricks
winetricks: 3824: cannot create /home/ready2rumbelx/.wine/dosdevices/c:/winetrickstmp/zenity.sh: Permission denied
winetricks: 3824: cannot create /home/ready2rumbelx/.wine/dosdevices/c:/winetrickstmp/zenity.sh: Permission denied
sh: Can't open /home/ready2rumbelx/.wine/dosdevices/c:/winetrickstmp/zenity.sh
Your problem is because you're running winetricks in /usr/bin

DON'T DO THAT. EVER.

/usr/bin is for storing executables that come as part of your distro and
for nothing else. Period. Wine itself is installed in /usr/bin (your
distro put it there) but a .wine directory should never, ever be there.

Any other native Linux executables that you download should go
in /usr/local/bin and their config files should go in /usr/local/etc If
the executable doesn't look there for config files then its badly
written, so raise a bug with its developers.

Winetricks should *always* be run as the user that you're running wine
in and in that user's $HOME directory. If .wine isn't there, set
$WINEPREFIX to point to the .wine directory before running winetricks.
Is this normal? Does winetricks running as 'root' save the necessary
settings applicable for Wine on my account/profile?
No, and never run wine or winetricks as root.

Wine and winetricks are designed to run under a normal user in that
user's own directory structure. If they don't work like that its a clear
sign that you've screwed things up.


Martin
r2rX
Level 3
Level 3
Posts: 69
Joined: Thu Apr 29, 2010 4:28 pm

Post by r2rX »

Hmm....

Well, until now, when I install WINE and install/uninstall winetricks (in synaptic package manager), the file always ends up in /usr/bin.

I even replaced the winetricks, in /usr/bin, with another one that had permissions set to my profile, but to no avail.

Although, the .wine folder IS in my home folder. And when I access /root/, I don't see a .wine folder.

But I did run winetricks as 'su', so that probably messed things up.

So, at this point, what is the necessary steps to correct this?

I'm planning on uninstalling WINE and winetricks completely, then reinstalling wine and manually placing winetricks in my /usr/local/bin folder (with permissions set to my profile) and try again.

If there's another (or a proper) way of doing it, let me know.

Thanks for the input guys. This is a mistake I will not make again in the future. :)

r2rX :D
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Post by doh123 »

r2rX wrote:Hmm....

Well, until now, when I install WINE and install/uninstall winetricks (in synaptic package manager), the file always ends up in /usr/bin.

I even replaced the winetricks, in /usr/bin, with another one that had permissions set to my profile, but to no avail.

Although, the .wine folder IS in my home folder. And when I access /root/, I don't see a .wine folder.

But I did run winetricks as 'su', so that probably messed things up.

So, at this point, what is the necessary steps to correct this?

I'm planning on uninstalling WINE and winetricks completely, then reinstalling wine and manually placing winetricks in my /usr/local/bin folder (with permissions set to my profile) and try again.

If there's another (or a proper) way of doing it, let me know.

Thanks for the input guys. This is a mistake I will not make again in the future. :)

r2rX :D
using su or sudo runs everything as the root user... you do not EVER need to run Winetricks as root... you should never run Wine as root... you might have to use su/sudo on a Wine source build for the install part that copies files into place, but not for any other part.

Winetricks will run fine from /usr/bin its just not supposed to go there. If your Winetricks is set to execute, and its in /usr/bin you should be able to just type Winetricks no matter what folder your in and run it. If your Distro installed it, I wouldn't be surprised if the "Winetricks" in /usr/bin is just a symlink and the real file is along with Wine... but you'd have to check on that yourself.

Its very likely you do not need to reinstall, you can just trash your ~/.wine folder and start over... your Wine install is probably fine, just don't run Winetricks with su or sudo.
r2rX
Level 3
Level 3
Posts: 69
Joined: Thu Apr 29, 2010 4:28 pm

Post by r2rX »

Sweet. I'll give it a go and let you know how it goes. :)

r2rX :D
Martin Gregorie

Question about Winetricks...

Post by Martin Gregorie »

On Mon, 2010-07-05 at 18:16 -0500, r2rX wrote:
Hmm....

Well, until now, when I install WINE and install/uninstall winetricks
(in synaptic package manager), the file always ends up in /usr/bin.
As doh123 said, if your distro put winetricks in /usr/bin, leave it
there.
Although, the .wine folder IS in my home folder. And when I
access /root/, I don't see a .wine folder.
Quite right - there should not be one in root's directory.
But I did run winetricks as 'su', so that probably messed things up.

So, at this point, what is the necessary steps to correct this?
You also have a copy of .wine in /usr/bin and that should be removed.
Run the following as root or via sudo:

cd /usr/bin; rm -rf .wine
I'm planning on uninstalling WINE and winetricks completely, then
reinstalling wine and manually placing winetricks in my /usr/local/bin
folder (with permissions set to my profile) and try again.
The usual set-up is to give read and execute permissions to everybody
and restrict write permission to the file's owner:

chmod ga-w winetricks # make sure group and all can't write it
chmod u+w winetricks # make sure the file's owner can write it
chmod uga+rx winetricks # give read/execute to everybody

After all, you wouldn't put an executable in /usr/local/bin unless you
expect it to be generally used - if you wanted it to only be accessed by
one user you'd:
- create a directory $HOME/bin in that user
- add $HOME/bin to the user's search path by editing .bash_profile
- put the executable in $HOME/bin
- make it executable: chmod u+x filename


Martin
Bryan Baldwin

Question about Winetricks...

Post by Bryan Baldwin »

On Mon, 2010-07-05 at 13:33 -0500, dimesio wrote:
2.) Whether I run winetricks from /usr/bin, or run it from a downloaded version; executing it with 'sh' simply does not work...I get the same error as posted above.
I don't know how it's set up in Ubuntu, but openSUSE also includes winetricks in its Wine package, and I can run that winetricks with just the winetricks command, no sh, and no need to change directories.
openSUSE creates the directory $HOME/bin and adds it to $PATH, if memory
serves. You could do the same thing in any GNU/Linux distribution,
albeit manually rather then via the package management system. To make
winetricks executable do from the shell:

$ chmod a+x winetricks

else you can always:

$ sh winetricks

Aside from having no business being in /usr/bin, the problem with
winetricks in /usr/bin is that winetricks needs to be able to write as
it caches all the stuff it downloads. /usr/bin is not user writable. If
you absolutely must run winetricks directly, do something like this:

$ mkdir $HOME/sh
$ wget http://www.kegel.com/wine/winetricks -O $HOME/sh/winetricks
$ echo "PATH=$PATH:$HOME/sh/winetricks" >> $HOME/.bashrc

Now you can use winetricks without typing explicit paths.

You can target specific Wine directories with winetricks. For instance,
I alway install one program to one Wine directory. To do this, set the
variable WINEPREFIX in your shell command to install a program:

$ WINEPREFIX=$HOME/wine/myprogram wine myprograminstaller.exe

To have winetricks operate on the directory tree for "myprogram" do:

$ WINEPREFIX=$HOME/wine/myprogram winetricks

Tricks performed via the above command will only effect "myprogram" (or
anything else installed with the same WINEPREFIX). Typically, progams
installed with WINEPREFIX set will automagickally detect the WINEPREFIX
and launch the program with the correct prefix set directly from the
Wine entry in the GNOME applications menu. If not, you can change it to
make it do so.

For more information, see:

http://ftp.winehq.org/pub/wine/docs/en/ ... tml#AEN535


Bryan
r2rX
Level 3
Level 3
Posts: 69
Joined: Thu Apr 29, 2010 4:28 pm

Post by r2rX »

Working 100% now. :) Thanks alot, guys.....I owe you one. ;)

r2rX :D
James McKenzie

Question about Winetricks...

Post by James McKenzie »

r2rX wrote:
Working 100% now. :) Thanks alot, guys.....I owe you one. ;)

How about updating our Applications Database? That would be a great
gesture towards others seeking to find this information.

James McKenzie
r2rX
Level 3
Level 3
Posts: 69
Joined: Thu Apr 29, 2010 4:28 pm

Post by r2rX »

I've actually been considering it very much so. :) I'm probably going to start very soon. :)

r2rX :D
Locked