[Wine] Putting the c drive on an external drive
Martin Gregorie
martin at gregorie.org
Tue Nov 17 11:02:40 CST 2009
On Tue, 2009-11-17 at 10:11 -0600, douglas wrote:
> Okay well I got it to work when using the terminal however when using
> the method described by vitamin I did not have any success.
>
> Here is a copy of my .bashrc file
>
....snippage....
> #below added for wine
>
> export WINEPREFIX=/media/External/Wine/.wine
>
No, its not wrong. It obviously works BUT it will only work in that
login on that computer. Also, you'll have to remember that its there and
override it for for other WINE environments.
I'd use a small script for each program I ran under WINE:
================== application script ==========================
#!/ bin/bash
#
# Don't forget to make this file executable with chmod
#
export WINEPREFIX=/media/External/Wine/.wine
cd "C:/path_to_your_working_directory"
wine "C:/path_to_program/program.exe" arguments...
===================== end of script ============================
The advantages are:
- all application-specific environmental variables you create in the
script will be discarded when the script exits so they can't upset
other programs.
- you can put the script on your external medium and take it with you.
- it should work on any computer which has WINE installed provided
that the external medium is mounted in the same place on each
computer
- you can build a library of these scripts:
- create a directory, ~/bin
- add ~/bin to your search path by adding this line to .bashrc:
export PATH=~/bin:$PATH
- logout and in again so this change takes effect.
- now, any program or script you put in ~/bin can be run by typing
its name.
- You can extend the script to make it more useful. I usually add this
as the first command:
if [ "$1" == '-?' ]
then
echo "Usage: script [args..]"
exit 1
fi
so typing "script -?" will display the help info.
Martin
More information about the wine-users
mailing list