Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow for choosing root directory for host->guest file sharing? #29

Closed
XanderThunder opened this issue Feb 5, 2022 · 10 comments
Labels
enhancement New feature or request feedback requested Maintainer has worked on issue and feedback was requested

Comments

@XanderThunder
Copy link

Hi, before requesting the feature, I wanted to say that I totally love your program. It makes using a windows VM so much easier and more integrated. Thank you very much for creating this!!!

Regarding the feature:
When exploring the settings of cassowary I noticed that the root directory of the host gets shared no matter what. I guess this is needed since xfreerdp only allows for one shared folder (I might be wrong here). With respect to that, I would like to be able to choose which directory should be the "root" for all other shares. I don't like the idea of my windows vm having access to my root filesystem with all the sensitive data stored on there.
So instead of making "/" the root share for all other mappings above I would like to select /mnt/xxx and then be able to just map folders inside /mnt/xxx/* to drive letters. Would this be possible?
I honestly don't mind errors appearing when trying to map something outside of /mnt/xxx/.

Cheers!

@XanderThunder XanderThunder changed the title [Feature Request] Allow for disabling sharing "/" to guest? [Feature Request] Allow for choosing root directory for host->guest file sharing? Feb 5, 2022
@casualsnek
Copy link
Owner

This might require a lot of changes to do!

Host root is shared to ensure that any file on your filesystem can be opened with windows application which a lot of people expect to work without messing up with configurations!
I understand why you might not want / to be shared, I will check the code for path translation and see if it is doable without breaking other stuff. If i figure it out i will either share patch files which you can use, or if feasible i will add a option to configure it from GUI on next release !

@XanderThunder
Copy link
Author

Well, thanks for the lightning fast reply! I didn't know there was other stuff relying on it. Now I understand why you chose to go that way. Thank you very much for looking into it, I'll be happy to assist with testing.

If you come to the conclusion that selecting another root share breaks a lot of stuff, I also wouldn't mind having an option to disable it completely for now (then I might be able to use the xfreerpd CLI parameters on the first config page to share my folder that way).

@casualsnek
Copy link
Owner

I think it can be done properly, give me some days and i will add a parameter on config file that you can change !
Although you can't open any file outside of your set root with windows applications !

@casualsnek
Copy link
Owner

Hello, i have done some work on it and pushed the code changes.
Can you install the built files from here: https://ufile.io/f/p5tod

After installing the windows component, you may need to reboot VM, the setting for shared root is on advanced tab.

Waiting for your feedback :)

@casualsnek casualsnek added enhancement New feature or request feedback requested Maintainer has worked on issue and feedback was requested labels Feb 8, 2022
@XanderThunder
Copy link
Author

Hi,
thank you sooo much for implementing this so quickly! I tested the main functions of the app in your provided temporary build and nearly everything seemed to work just fine.

Did you intentionally remove the field to provide the folderpath in the "Folder Mappings -> Create New Share" dialog since I said that I was totally fine with it not being there and me doing additional mappings manually instead? If so, then this behaviour is to be expected.

Again, thank you very much for doing this extra work for me and others that might have similar requirements.

Here are a few screenshots of my configuration and the findings of my testing:

image
image
image
image

@casualsnek
Copy link
Owner

casualsnek commented Feb 8, 2022

Did you intentionally remove the field to provide the folderpath in the "Folder Mappings -> Create New Share" dialog since I said that I was totally fine with it not being there and me doing additional mappings manually instead? If so, then this behaviour is to be expected.

I guess you are on wrong tab, its for mounting local disk on windows to linux, its mountpoint location is specified on advanced as Windows share mount root ( And you are getting error as expected because local disk A does not exist in VM )

For Linux to windows sharing use linux-> windows sub tab !

@XanderThunder
Copy link
Author

You are absolutely right! I mixed up the tabs because in the previous version, the "Linux->Windows" tab was the first one. I guess I did not look closely enough. Sorry for that!

The drive mappings work (after applying the workaround from issue 11).
If you tried to map a directory outside of the root share directory you would get an error with a helpful explanation - which works perfectly.
And if you afterwards remove a drive mapping in cassowary while Windows is running, the drive becomes inaccessible through explorer. This solves itself by issuing a restart.

Here are (again) my screenshots:

image
image
image

@casualsnek
Copy link
Owner

You are absolutely right! I mixed up the tabs because in the previous version, the "Linux->Windows" tab was the first one. I guess I did not look closely enough. Sorry for that!

The drive mappings work (after applying the workaround from issue 11). If you tried to map a directory outside of the root share directory you would get an error with a helpful explanation - which works perfectly. And if you afterwards remove a drive mapping in cassowary while Windows is running, the drive becomes inaccessible through explorer. This solves itself by issuing a restart.

Here are (again) my screenshots:

image image image

You are absolutely right! I mixed up the tabs because in the previous version, the "Linux->Windows" tab was the first one. I guess I did not look closely enough. Sorry for that!

The drive mappings work (after applying the workaround from issue 11). If you tried to map a directory outside of the root share directory you would get an error with a helpful explanation - which works perfectly. And if you afterwards remove a drive mapping in cassowary while Windows is running, the drive becomes inaccessible through explorer. This solves itself by issuing a restart.

Here are (again) my screenshots:

image image image

For #11 (comment) this issue, i am pushing a change after few hours that should fix it.

For Drive being inaccessible after removing it in cassowary is expected behavior, although windows explorer does not remove the entry instantly. ( Refreshing can get rid of it ). Thank you for testing and feedback !

@casualsnek
Copy link
Owner

Do you have any issue remaining with it or is it okay if i close this issue ?

@XanderThunder
Copy link
Author

Closing is fine, sorry I forgot to do so ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feedback requested Maintainer has worked on issue and feedback was requested
Projects
None yet
Development

No branches or pull requests

2 participants