winapps-org / winapps

The winapps main project, forked from https://github.com/Fmstrat/winapps/
544 stars 26 forks source link

How do I access files from different location/ drive? #105

Open wxguy opened 1 month ago

wxguy commented 1 month ago

I have successfully configured winapps which works perfectly if I keep my files under home directory. AFAIK, it is mainly due to the mounting of share locations by freerdp command.

My issue is that lot of my files are kept in separate drive which is auto mounted at /mnt/Data directory. If I try to open a file from this directory, it say path not found (naturally, this is what expected).

My query is "how do I access the files kept in separate directory other than /home"?

LDprg commented 1 month ago

@wxguy you can use docker to mount a directory to /shared in the docker container for sharing the directory without freerdp. However you will NEED TO REINSTALL you WINDOWS.

You could also create a softlink in the /home directory to your real directory. This would avoid a reinstall.

Afaik using mounts outside /home should work so maybe check your directory permissions (maybe freerdp cannot access the directory because of that).

LDprg commented 1 month ago

@oskardotglobal Are you sure that you will need to reinstall windows when adding /shared since I didn't find any docs on this. It resets the container for sure but the windows install is saved on an image in /storage. The sharing itself also should work fine without reinstalling.

Maybe we should test this?

wxguy commented 1 month ago

You could also create a softlink in the /home directory to your real directory. This would avoid a reinstall.

I can confirm that it WORKS. Maybe, this needs to be documented somewhere.

Afaik using mounts outside /home should work so maybe check your directory permissions (maybe freerdp cannot access the directory because of that).

How do the freerdp know the location when the command line is used only for mounting home directory? I also tried to mount the /mnt/Data directory using freerdp command in winapp script by including /drive:Data,/mnt/Data argument. I can see the directory inside Windows 11, but still, this does not work when I open word file from Linux.

you can use docker to mount a directory to /shared in the docker container for sharing the directory without freerdp.

Can you please direct me to the sample documentation? Re-installing Windows not an issue, but the issue needs to be solved.

wxguy commented 1 month ago

How about adding an option in ~/.config/winapps/winapps.conf file like SHARE_DIRS="/path/to/mnt/dir1,/path/to/mnt/dir2" to make it convenient to users. Internally, we can have a link to ~/.config/winapps/shared_dirs as part of the installation script to avoid additional steps by users.

It is just an idea. If possible, you may consider for implementation.