move temp files directory?

Questions about Wine on Linux
Locked
tigerdog
Level 1
Level 1
Posts: 9
Joined: Sun Jan 22, 2012 4:01 pm

move temp files directory?

Post by tigerdog »

I would like to point Wine at my Linux temp directory instead of /home/username/.wine/drive_c/users/username/Temp. Is there a way to have the Wine environment variable specify a different location?
Martin Gregorie

move temp files directory?

Post by Martin Gregorie »

On Sun, 2012-01-22 at 15:35 -0600, tigerdog wrote:
I would like to point Wine at my Linux temp directory instead
of /home/username/.wine/drive_c/users/username/Temp. Is there a way
to have the Wine environment variable specify a different location?
The default is: WINEPREFIX="$HOME/.wine"
You can change WINEPREFIX to anything you like:

export WINEPREFIX="$HOME/.wine_for_myapp"

works and so should: export WINEPREFIX="/path/to/wherever/I/want"
but an easier way to handle this is to use a wrapper script, e.g.

===============================================================
#!/bin/bash
export WINEPREFIX=/where/your/app/is"
cd $WINEPREFIX
wine myapp.exe
==============================================================


Martin
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Re: move temp files directory?

Post by jorl17 »

Martin Gregorie wrote:On Sun, 2012-01-22 at 15:35 -0600, tigerdog wrote:
I would like to point Wine at my Linux temp directory instead
of /home/username/.wine/drive_c/users/username/Temp. Is there a way
to have the Wine environment variable specify a different location?
The default is: WINEPREFIX="$HOME/.wine"
You can change WINEPREFIX to anything you like:

export WINEPREFIX="$HOME/.wine_for_myapp"

works and so should: export WINEPREFIX="/path/to/wherever/I/want"
but an easier way to handle this is to use a wrapper script, e.g.

===============================================================
#!/bin/bash
export WINEPREFIX=/where/your/app/is"
cd $WINEPREFIX
wine myapp.exe
==============================================================


Martin
He meant to change the directory that wine uses for temporary files, not the prefix, I think.
User avatar
L. Rahyen
Moderator
Moderator
Posts: 338
Joined: Fri Feb 22, 2008 9:13 pm

move temp files directory?

Post by L. Rahyen »

I would like to point Wine at my Linux temp directory instead of
/home/username/.wine/drive_c/users/username/Temp
You can use ln to create a symbolic link, for example:

rm -rf /home/username/.wine/drive_c/users/username/Temp
ln -s /tmp /home/username/.wine/drive_c/users/username/Temp
tigerdog
Level 1
Level 1
Posts: 9
Joined: Sun Jan 22, 2012 4:01 pm

Re: move temp files directory?

Post by tigerdog »

jorl17 wrote:He meant to change the directory that wine uses for temporary files, not the prefix, I think.
Correct - that's what I want to do.
L. Rahyen wrote:You can use ln to create a symbolic link, for example:

rm -rf /home/username/.wine/drive_c/users/username/Temp
ln -s /tmp /home/username/.wine/drive_c/users/username/Temp
And that did it! Thank you jorl17 and L.Rahyen! Temp files now go where I want. I appreciate the help!
johnywhy
Level 2
Level 2
Posts: 18
Joined: Tue Mar 24, 2009 4:40 pm

Post by johnywhy »

this helps me too.

a linux noob, i think /tmp is the directory we are redirecting to, so if i want to redirect to a mounted hard-disk, would i use something like the following?

rm -rf /home/username/.wine/drive_c/users/username/Temp
ln -s /mnt/sda1/winetemp /home/username/.wine/drive_c/users/username/Temp

and, while we're at it:

rm -rf /root/.wine/drive_c/windows/temp
ln -s /mnt/sda1/winetemp /root/.wine/drive_c/windows/temp

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

Post by doh123 »

symlink is probably the safest way to go, but I do recall one of the .reg files holding that information as well you could probably just edit.
johnywhy
Level 2
Level 2
Posts: 18
Joined: Tue Mar 24, 2009 4:40 pm

Post by johnywhy »

I'm trying to do the same with /tmp, using the following:

Code: Select all

mv /tmp /mnt/new/location/tmp

ln -s /mnt/new/location/tmp /tmp
It fails with either an "in use" error, or when tmp is not in-use, i get:
"inter-device move failed... unable to remove target... Is a directory"

Have tried by exiting x-windows to command prompt, or by mouse-clicks. Same error.

Using saluki puppy Linux, an ubuntu variant. In puppy, /tmp is inaccessible when the OS is not loaded-- it's inside a 4fs file, which I believe is a kind of squash file. So I think the above task must somehow be done while the OS is running.

Note, puppy runs as root user by default.

Suggestions appreciated.
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Post by DanKegel »

For system things like /tmp, you kind of need to understand
the system better.

http://wiki.openwrt.org/doc/techref/process.boot describes how
/tmp is futzed with on one small linux.
johnywhy
Level 2
Level 2
Posts: 18
Joined: Tue Mar 24, 2009 4:40 pm

Post by johnywhy »

thanks. I could not find the futzing with tmp that you mentioned, but i'm thinking i should put the commands into a bash script that executes during boot, after /tmp is created, but before anything is using it.

However, not quite sure (translation: no idea) where to put the script. noob thoughts.
johnywhy
Level 2
Level 2
Posts: 18
Joined: Tue Mar 24, 2009 4:40 pm

rc.local Did Not Work

Post by johnywhy »

/root/Startup/README.txt says:
to execute something at bootup and prior to X desktop loading, edit /etc/rc.d/rc.local
so, i put the commands into rc.local. I believe it did not work Sad

suggestions welcomed!
johnywhy
Level 2
Level 2
Posts: 18
Joined: Tue Mar 24, 2009 4:40 pm

Post by johnywhy »

during the boot, before xWindows starts, i saw the message "cannot move" or "cannot remove" flash by.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

johnywhy wrote:thanks. I could not find the futzing with tmp that you mentioned, but i'm thinking i should put the commands into a bash script that executes during boot, after /tmp is created, but before anything is using it.

However, not quite sure (translation: no idea) where to put the script. noob thoughts.
This is not a Wine question. Ask your distro or a general Linux support forum.
Locked