finding or creating ~/.wine folder (Snow Leopard problem)

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

finding or creating ~/.wine folder (Snow Leopard problem)

Post by hobbsilla »

So I installed the developer's Wine build on my Snow Leopard after searching the internet for close to two weeks i finally have a wine build (using the +universal build) on my hard drive. My only problem is I can't use wine because my Users/username/.wine folder does not exist, pumps out, wine: chdir to /Users/elixir/.wine
: No such file or directory
after typing in wine and dragging the .exe file into the terminal.

Can someone please tell me how I can either find this .wine folder or how I can create it with my entire build within the folder?

I know most people would tell me that you need to read the FAQ to figure this out but I've been reading documentation non-stop and have not found the answer to my question. Can someone give my eyes a break and let me know how, if this is even possible, I can finally get a working build on Snow Leopard.
User avatar
dimesio
Moderator
Moderator
Posts: 13371
Joined: Tue Mar 25, 2008 10:30 pm

Re: finding or creating ~/.wine folder (Snow Leopard problem

Post by dimesio »

hobbsilla wrote:My only problem is I can't use wine because my Users/username/.wine folder does not exist, pumps out, wine: chdir to /Users/elixir/.wine
: No such file or directory
after typing in wine and dragging the .exe file into the terminal.
~/.wine doesn't get created until you run Wine the first time. Typing wineboot at the command prompt will do it. Or you could just install an app; Wine will automatically create ~/.wine if it doesn't exist.
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

Thanks for the response but i still got the same response. I also have the Winebottler combo installed and it has its own directory should i uninstall Winebottler and sudo rm -rf its directory to see if it will work?
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Post by doh123 »

hobbsilla wrote:Thanks for the response but i still got the same response. I also have the Winebottler combo installed and it has its own directory should i uninstall Winebottler and sudo rm -rf its directory to see if it will work?
WineBottler (and any other 3rd party Wine usage app I know of) should not affect your normally installed and running Wine.

basically open up a terminal prompt and type in

Code: Select all

wine winecfg
this will show a message that your .wine in your user folder has been updated... and you'll get winecfg open which you can use if you need, or close it... at this point .wine is created.

I'm not sure thats the root of your problem though. What are you running thats trying to change directory to the .wine folder? some type of start up script? if you just type in to run the exe in wine, it shouldn't ever try to change directories over to .wine

Are you sure you got Wine installed correctly?
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

Damn it still gave me the same error message. Snow Leopard makes wine so much more complicated.
I used my Macports (the most recent one 1.8.2) in my terminal to install it. I had to do enforce-variants (with +universal at the end) for about 10 or 12 different items individually to finally get the wine-devel to build. Wine is up to date and everything.

If you know how to do a more "proper" Snow Leopard install can I get a link? I've gone to 5 different sites/blog posts attempting to explain it. There is very limited documentation on this from what I can gather.
James Mckenzie

finding or creating ~/.wine folder (Snow Leopard problem)

Post by James Mckenzie »

hobbsilla <[email protected]> wrote:
Damn it still gave me the same error message. Snow Leopard makes wine so much more complicated.
I used my Macports (the most recent one 1.8.2) in my terminal to install it. I had to do
enforce-variants (with +universal at the end) for about 10 or 12 different items individually
to finally get the wine-devel to build. Wine is up to date and everything.
This is not a MacPorts issue per-se, but rather a known problem with building 32 bit programs on Snow Leopard. You did exactly what is needed to build 32 bit variants. This is one of the reasons I have not switched from Leopard, as Leopard builds are 32 bit.
If you know how to do a more "proper" Snow Leopard install can I get a link? I've gone to 5
different sites/blog posts attempting to explain it. There is very limited documentation on
this from what I can gather.
You stated you have WineBottler. The builds for it are done on Leopard (maybe even Tiger) and are completely 32 bit and require no external programs.

The only other suggestion is to completely remove WineBottler AND MacPorts Wine and rebuild Wine from MacPorts with the +universal variant.

As to why your .wine is not working, I suggest looking at WineBottler first to see if the bottle exists in it. If it does, delete it from there and then attempt to run

wine winecfg from terminal to see if the bottle will be recreated. In my testing with WineBottler, no Wine bottle was corrupted using it.

Hopefully, this will fix the problem.

James McKenzie

hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

Oh I figured out what I did wrong. My Macports were installed correctly. I'm currently rebuilding my build and everything has been going smoothly with no error messages. I think it will work now.
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

This is really frustrating. Its still giving me the error message of the ~/.wine folder not existing.
I followed this guys tutorial perfectly and did the Snow Leopard options:
http://davidbaumgold.com/tutorials/wine-mac/#part-3

I got no error messages along the way while it was building. Is there anyway to change the root path or prefix or anything like that so the directory will be created? I can't create the directory in my home directory because I don't have permission despite using sudo. I wish this wasn't so troublesome unlike how it was in Ubuntu.
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

Jesus. I even get the same error message in Darwine. Can some one just tell me how I can get the permissions to create the directory?
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Post by doh123 »

hobbsilla wrote:This is really frustrating. Its still giving me the error message of the ~/.wine folder not existing.
I followed this guys tutorial perfectly and did the Snow Leopard options:
http://davidbaumgold.com/tutorials/wine-mac/#part-3

I got no error messages along the way while it was building. Is there anyway to change the root path or prefix or anything like that so the directory will be created? I can't create the directory in my home directory because I don't have permission despite using sudo. I wish this wasn't so troublesome unlike how it was in Ubuntu.
don't run Wine as root or use sudo to run... it will mess things up. your normal user level access can write to your home folder. you can set a different wineprefix for the run...
WINEPREFIX="$HOME/.wine2" wine winecfg
would run winecfg and use a prefix of .wine2 ..... creating it if it didnt exist.
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

I'm not running wine under a root or sudo user. I'm just trying to forcibly create the folder in hopes that it will work. I tried your command and again no luck still the same output but with a 2 at the end of the non-existent directory name. Thanks for your help so far.
James McKenzie

finding or creating ~/.wine folder (Snow Leopard problem)

Post by James McKenzie »

doh123 wrote:
hobbsilla wrote:
This is really frustrating. Its still giving me the error message of the ~/.wine folder not existing.
I followed this guys tutorial perfectly and did the Snow Leopard options:
http://davidbaumgold.com/tutorials/wine-mac/#part-3

I got no error messages along the way while it was building. Is there anyway to change the root path or prefix or anything like that so the directory will be created? I can't create the directory in my home directory because I don't have permission despite using sudo. I wish this wasn't so troublesome unlike how it was in Ubuntu.
don't run Wine as root or use sudo to run... it will mess things up. your normal user level access can write to your home folder. you can set a different wineprefix for the run...
WINEPREFIX="$HOME/.wine2" wine winecfg
would run winecfg and use a prefix of .wine2 ..... creating it if it didnt exist.

This is MOST interesting as you should have permissions to create
directories in your own home environment.

Try the following:

WINEPREFIX=$HOME/Desktop/Winetest wine winecfg

and see of a folder named Winetest is created on your desktop.

BTW, I have several wine prefixes and always create them with $HOME as
it is universally recognized....

James McKenzie

James McKenzie
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

Oh thank you James! Its working now. I'll just have it on my Desktop instead just so long as a I get access to it. I assume if I wanted to I could rename and possible put it in my home directory and change the prefix at a later time correct?
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Post by doh123 »

hobbsilla wrote:Oh thank you James! Its working now. I'll just have it on my Desktop instead just so long as a I get access to it. I assume if I wanted to I could rename and possible put it in my home directory and change the prefix at a later time correct?
if you can write to your desktop, but not your home folder.. you need to fix your permissions, they are really messed up. You can try repair permissions in Disk Utility first... then get Info on your home folder and make sure you have full read/write
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

Grrr! Its come back to the problem again. I've changed the Prefix but wine still wants the default prefix to be in ~/.wine.
James McKenzie

finding or creating ~/.wine folder (Snow Leopard problem)

Post by James McKenzie »

doh123 wrote:
hobbsilla wrote:
Oh thank you James! Its working now. I'll just have it on my Desktop instead just so long as a I get access to it. I assume if I wanted to I could rename and possible put it in my home directory and change the prefix at a later time correct?
if you can write to your desktop, but not your home folder.. you need to fix your permissions, they are really messed up. You can try repair permissions in Disk Utility first... then get Info on your home folder and make sure you have full read/write

That was the implication of the test. If Hobbsilla could not write to
the Desktop, something is very wrong.

hobbsilla: Please open the hard drive object on the Desktop and then
select your user name. Right click and select Get Info. The user MUST
have read/write to their own home directory. If this is 'broken' by
only having read permissions, you will have to correct this as a system
administrator type user (and this applies to all users on any Mac.)
Click on the lock in the right hand bottom corner, and a dialog will
open. Type in the name and password for a user with system
administrator level access. Click on the OK button. Click on
permissions to the right of the user name and then change this to
write/read. Click on the lock to save and make further changes not
possible. After doing this attempt to create a new Wine bottle by
typing in:

wine winecfg.

You should not get the error message anymore.

James McKenzie
Thank you doh123 as well.
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

I went to Disk Utility and verified and repaired disc permissions. I went to Get Info on my home directory (named elixir). It shows elixir(Me) as having read&write permissions and staff and everyone else as having read only permissions. I unlocked my settings and locked it. Typed in the command in the command line and still now luck.
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

I attempted to copy my winetest folder on my desktop into my home directory and rename it .wine but it gives me this message that renaming a folder with a period prefix is only for files "within the system."
James McKenzie

finding or creating ~/.wine folder (Snow Leopard problem)

Post by James McKenzie »

hobbsilla wrote:
I attempted to copy my winetest folder on my desktop into my home directory and rename it .wine but it gives me this message that renaming a folder with a period prefix is only for files "within the system."


Can you move the folder from the Desktop to your user's directory
without renaming it to .wine?

BTW, does this user have system administrator rights?

I have two users and if this is happening, I would like to try this with
the non-administrative one before filing a bug report.

James McKenzie
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

It says under my system preferences that I am indeed an admin. On Get Info for my home directory it says that my username (elixir) which has a parentheses next to them saying Me that I have read&write permissions. I'm the only user on this laptop. Should I create a new account or use a guest?
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

Here is more info:

1. So no, I can not drag the Winetest file that I created earlier into my home directory, if I go one level down in hierachy I can however, if I put it in Photos, Music, Movies etc it works for whatever reason but if I go one level up it doesn't.

2. A ~/Wine and ~/Wine Files folder were already present on my desktop from yesterday when I had Winebottler combo. I removed Winebottler combo and attempted to drag these two folders into my Trashbin. It will delete the contents in these two folders but won't delete the folders themselves.

3. I contacted David Baumgold who wrote the tutorial I followed.
A. He recommended that I do a symlink but I'm not a terminal junkie so I've been researching the 20 minutes on how to do that.
B. I did however use the $WINEPREFIX=$HOME/Wine\ Files wine winecfg in my terminal and what seemed like wine working, a configure window popped up, and content was added to the Wine Files folder in my home directory. However when I got to type $wine winecfg or $wine $applicationname.exe I still get that same error message about ~/.wine directory not existing.

4. Once I submit this message I will go and try doing this as a Guest user.
James McKenzie

finding or creating ~/.wine folder (Snow Leopard problem)

Post by James McKenzie »

hobbsilla wrote:
It says under my system preferences that I am indeed an admin. On Get Info for my home directory it says that my username (elixir) which has a parentheses next to them saying Me that I have read&write permissions. I'm the only user on this laptop. Should I create a new account or use a guest?

No need to create a new user, but you should be able to create . (dot)
files in your user directory. Very interesting that you cannot.
However, I'm using Leopard and will try a test here to see what happens
when I try to create one through the terminal.

I could do so without error. Maybe something is not correct with the
installation of Snow Leopard, or maybe it blocks creating . (dot)
directories. Unfortunately, I don't have it to check. Maybe doh123 or
ryan woodsall can check on this.

James McKenzie
hobbsilla
Level 2
Level 2
Posts: 21
Joined: Sun Mar 28, 2010 5:25 am

Post by hobbsilla »

I don't understand how my OS wasn't installed properly, I think the admin capabilities were deliberately limited by Apple to make it so normal day people wouldn't go around deleting vital folders on their home directory preventing them from using their computer. Its sorta frustrating that their isn't a way to at least create a directory.
James McKenzie

finding or creating ~/.wine folder (Snow Leopard problem)

Post by James McKenzie »

hobbsilla wrote:
Here is more info:

1. So no, I can not drag the Winetest file that I created earlier into my home directory, if I go one level down in hierachy I can however, if I put it in Photos, Music, Movies etc it works for whatever reason but if I go one level up it doesn't.

Interesting that you cannot create a folder in your $HOME directory.
This is NOT normal for any version of MacOSX from what I know. Again,
I'm using Leopard and this version may allow this, but if this were a
major problem, there would be many complaints here about the inability
to create the .wine directory.
2. A ~/Wine and ~/Wine Files folder were already present on my desktop from yesterday when I had Winebottler combo. I removed Winebottler combo and attempted to drag these two folders into my Trashbin. It will delete the contents in these two folders but won't delete the folders themselves.
Again, something is NOT right. Any user created directory should be
deletable. Can you do the same thing that I asked you to do for your
user directory. I'm hoping that these directories are not owned by
root:admin as they should NOT be. If they are, please file a bug report
at the WineBottler trac site as these were created by WineBottler. You
may also try deleting them using the WineBottler configuration application.
3. I contacted David Baumgold who wrote the tutorial I followed.
A. He recommended that I do a symlink but I'm not a terminal junkie so I've been researching the 20 minutes on how to do that.
B. I did however use the $WINEPREFIX=$HOME/Wine\ Files wine winecfg in my terminal and what seemed like wine working, a configure window popped up, and content was added to the Wine Files folder in my home directory. However when I got to type $wine winecfg or $wine $applicationname.exe I still get that same error message about ~/.wine directory not existing.

This is true. You have to set the WINEPREFIX variable anytime you want
to use Wine or you can set it in the terminal for that session by typing in:

export WINEPREFIX=<Path to wine files>

i.e. Wine files are in $HOME/Wine

export WINEPREFIX=$HOME/Wine

4. Once I submit this message I will go and try doing this as a Guest user.

This may work, as the Guest user has a different file environment.

James McKenzie
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Post by doh123 »

by default you cannot name files with a . in front through Finder, you need to rename it in Terminal... and Finder will not show any file that starts with a . as that is for marking it as hidden.

do you already have a ~/.wine folder thats locked down because of a sudo run? you will not be able to see it in Finder if it exists with default settings.

in terminal you can type

Code: Select all

open ~/.wine
and if it opens and shows you the contents of the folder, then you already have a .wine folder there. At that point, if it opens you can right click on it and Get Info to change permissions.... or just use sudo in the Terminal to remove it if there is nothing you wanted inside of it.

if you try to create a folder in your home, what error message do you get? Just go to your home folder in Finder and select to create a new Folder. You may try changing the settings to read only, exiting Get Info, then change it back to read/write. Also check your whole hard drive for errors, not just permission problems, in Disk Utility. If it doesn't let you write to the folder, yet says you have permission to do it, you may have some really serious problems going on.

some other questions...
you installed Wine from Macports? when you type in (no quotes) "which wine" in Terminal, it should say its in /opt/local/bin ... or its not trying to use the Macports install at all. it might have a Wine executable installed to /usr/bin or elsewhere from some other install you used, thats pointing to the wrong locations. if Wine is in /usr/bin (or where ever) from Macports, try editing it as its a bash script. You can open to look at it in TextEdit.app by typing "open -e /usr/bin/wine" or wherever it is. If it opens looking like a bunch of garbage, its a real Wine file, don't change or save anything. If its a text bash script, it should have a couple of lines... need to see what they say.

You are not doing any of this as sudo are you? not using sudo to run Wine the first time? if so its going to create the .wine folder as root, and you wont have any access to it as your user. You do need to use sudo when you install Wine through Macports, but never again.
Locked