4

I’m new to Ubuntu so I don’t know much on how the file system works. I have Ubuntu 18.04 on my 256GB SSD and I have mounted a 1TB drive in my media directory. My question is how can I install a large AAA game (through Wine) so that the folders for the game are on the 1TB HDD?

I know that in Windows it’s easy, just select that dir as install dir in the installation wizard. I heard something that it cannot be done because of the way the file system is used in Linux. But I refuse to believe that we live in a world where Linux can’t do something Windows can...

0

3 Answers 3

3

That's pretty easy.

All apps installed through Wine go to the /home/$USER/.wine/ directory. So the solution to your problem is to make a symbolic link (something like a shortcut in Windows) to point to somewhere on your 1 TB drive.

Take a look below and craft it to your needs:

ln -s /media/your-disk  /home/$USER/.wine

You can also do it by mouse right clicking on the destination folder and selecting "Make Link". Then just move it to your home dir and rename to .wine. That's all.

EDIT:
as @muru noticed, an alternative way is to change the WINEPREFIX environmental variable. In this approach simply add to the .bashrc line:

export WINEPREFIX=/media/your-disk/wine-apps
2
  • 2
    +1 '...unless the OP already has a /home/$USER/.wine directory, in which case it'll be slighly trickier. But this is the way to go.
    – Jos
    Jun 18, 2018 at 7:36
  • 2
    Probably better to do export WINEPREFIX=/media/your-disk/some/folder, instead of replacing ~/.wine
    – muru
    Jun 18, 2018 at 16:12
2

You can do this in one of two ways:

  • Wine should expose the Linux root directory (/) as the Z: drive. In that case, change the installation directory in the installer to be something like Z:/media/petar/1tbdrive (or wherever your 1TB drive is mounted).
  • Open winecfg and navigate to the Drives tab to create a new drive mapping for your external drive. This way, your 1TB HDD (or a subdirectory of it) will be exposed to the game's installer as a separate Windows drive.
1
  • Indeed. I didn't know about it. Thanks!
    – G. Demecki
    Jun 18, 2018 at 12:24
2

An alternative method, which does not require symlinks, is to set the WINEPREFIX environment variable to point to the disk.

Add the following to /etc/environment:

WINEPREFIX=<path-to-disk>

This has the added advantage of being able to have multiple wine prefixes, just set the WINEPREFIX to point at another directory. This can be particularly useful for switching between 64 and 32 bit, which I tend to require a lot for games.

If you are installing the game with steam, you could save yourself a lot of effort by adding it as a steam download location.

2
  • 1
    /etc/environment should not contain export, only key-value pairs.
    – OrangeDog
    Jun 18, 2018 at 12:04
  • @OrangeDog you're right, I have updated the anwer
    – Cyclic3
    Jun 18, 2018 at 12:10

Not the answer you're looking for? Browse other questions tagged .