orbstack / orbstack

Fast, light, simple Docker containers & Linux machines for macOS
https://orbstack.dev
MIT License
5.11k stars 39 forks source link

Allow Changing OrbStack File Sharing Directory Location #239

Open yusoofsh opened 1 year ago

yusoofsh commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, the OrbStack file sharing directory is placed by default on the user’s home folder. This can be inconvenient for users who prefer to organize their files in a different location or drive.

Describe the solution you’d like I would like to request a feature that allows users to change the default directory of the OrbStack file sharing folder.

image
kdrag0n commented 1 year ago

~/OrbStack is where the shared file system is mounted for accessing Linux machine and Docker volume files from macOS. It's just a mountpoint, so no files are actually stored there.

This means that you can delete it and create a symlink to the directory you want it to be mounted at.

Sciencoded commented 1 year ago

~/OrbStack is where the shared file system is mounted for accessing Linux machine and Docker volume files from macOS. It's just a mountpoint, so no files are actually stored there.

This means that you can delete it and create a symlink to the directory you want it to be mounted at.

Still, i have the same issue. I am quite obsessed on my distros about what gets where, and I am frustrated if I cannot fully customise a path.

Moreover, this volume is in the home directory, which gets easily cluttered, and is more suited for rcfiles and folders only.

It would be nice to be able to define the path, if not a default location set under /Volumes - which would make more sense, be portable, while remaining easily accessible.

kdrag0n commented 1 year ago

/Volumes would be nice but it's not possible without root.

Sciencoded commented 1 year ago

True ! Then follow the XGD base directories specifications and environment variables ? This could belong to $XDG_RUNTIME_DIR defaulting to $HOME if a user is mono-distro and has not set their environment variables.

kdrag0n commented 1 year ago

That doesn't make sense for the file sharing directory, and XDG is not really standard on macOS. See #60 for why OrbStack doesn't follow it.

Aeron commented 1 year ago

It is more a convenience issue, not something crucial for sure. Yet I also find it somewhat unpleasant to have an empty directory in my $HOME, where I like to have a strict standard directory structure. I believe users should have a choice if they want it somewhere else. Or if they want it at all. Sym-links are not the same—it is just more excessive entities.

If the option to change the file-sharing path is too demanding to implement or has other limitations, then the file-sharing switch would be a welcome solution. People are used to mounting directories manually. I guess many don’t need the file sharing enabled in the first place. So, it would be great to have the option to turn it on or off, at least.

Both options would be superb.

Sciencoded commented 1 year ago

That doesn't make sense for the file sharing directory, and XDG is not really standard on macOS. See #60 for why OrbStack doesn't follow it.

XDGBDS is aimed for all unix-like systems, so macOS is fully concerned by those specs. I love macOS for the desktop environment, the ecosystem and the ease of use between all my idevices, but when developing I often need to spin-up different linux VMs. It is super convenient to be able to just export the same profile and rc files, all with the same defined environment variables, and jump from one VM to the other like a breeze.

Even though it is not a mandatory requirement (on macOS or any other Linux distros), it is only up to the developers to adopt and encourage XDG conformity :)

~/Library/Application Support/ is more suited for Apple or AppStore-distributed softwares, and desktop applications needing iCloud sync between devices or iCloud docs.

shiqizhenyes commented 9 months ago

I might want to be able to customize the OrbStack File Sharing Directory Location or hide it, I don't want it to bother me, and even though it's convenient to have file sharing turned on by default, I still prefer to transfer files via the command

wmbin commented 7 months ago

The temporary solution is to enter the directory and execute the command in the terminal chflags hidden .

atombender commented 3 months ago

Any update on this? I like to keep my home folder pristine of application cruft, and this folder is not useful to me. I perceive it as very invasive for an application to pollute my home folder.

According to Apple best practices, it should go somewhere under Library. According to Unix best practices, ~/.config or ~/.orbstack would be appropriate.

The temporary solution is to enter the directory and execute the command in the terminal chflags hidden .

That is not permitted on my machine (macOS Sonoma):

~/OrbStack $ sudo chflags hidden .
chflags: .: Operation not supported