Disable extra drive letters

Questions about Wine on Linux
Locked
etwineb
Level 4
Level 4
Posts: 101
Joined: Wed Dec 10, 2008 12:05 pm

Disable extra drive letters

Post by etwineb »

I am aware that it's more a pedantry than a real necessity, but I find annoying that wine programs create many letters in their environment (e.g., cd-drive, pendrives).

Some of then are reasonable, like the cd-drive, but some letters point to no partition so they are fairly useless.

Here is an example from my system:

Code: Select all

some/wine/prefix/dosdevices $ file *
c::  symbolic link to ../drive_c
d::: symbolic link to /dev/sr0
e::: symbolic link to /dev/sdc
f::: symbolic link to /dev/sdc2
g::: symbolic link to /dev/sdc1
I do not really plan to use my usb stick or cd from this windows application, but the e: letter is really useless as there is no filesystem there.

So, it's possible to force wine to keep only the c: drive letter, and the ones I manually add?
User avatar
dimesio
Moderator
Moderator
Posts: 13208
Joined: Tue Mar 25, 2008 10:30 pm

Re: Disable extra drive letters

Post by dimesio »

You could try making the directory read-only, but any problems that may create will be yours to solve.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Disable extra drive letters

Post by Bob Wya »

etwineb wrote:I am aware that it's more a pedantry than a real necessity, but I find annoying that wine programs create many letters in their environment (e.g., cd-drive, pendrives).
...
So, it's possible to force wine to keep only the c: drive letter, and the ones I manually add?
Just remove the symbolic links (definitely not C: obviously!!) Wine will only re-create the "extra" ones if your system drives change - whilst the wineserver processing is running. If it's still bothersome - then it's time to write a little BASH script... 8)

Code: Select all

winetricks sandbox
... is useful - as it will quickly nuke all the extra symbolic drive links and all links to your (wine) user home directory.
Though you may wish to add the Z:/ link back (e.g. if you wish to launch installers, etc. - "outside" of your WINEPREFIX).

Bob
Locked