microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
10.22k stars 305 forks source link

Nautilus / Gparted should access to other Linuxes partitions #615

Open enigma131 opened 2 years ago

enigma131 commented 2 years ago

Gparted access only to active ext4 partition Nautilus access to windows partitions mounted under /mnt. The idea here is to access to Multi boot partitions such as Linux ones

Masamune3210 commented 2 years ago

Gparted works on block devices, which Windows mounts are not described as iirc, would probably not be possible as it would require raw disk access in the emulator

hideyukn88 commented 2 years ago

@enigma131, thanks for trying out WSLg. While this is not specific to Nautilus or any specific Linux application, but here is a way to access other Linux partitions. Let say you want to access Debian's partition from Ubuntu, please try ...

1) Launch Debian's command shell. 2) At Debian shell, from root directory, type "wslpath -w .", then it will return something like "\\wsl.localhost\Debian\" 3) Launch Ubuntu's command shell. 4) At Ubuntu shell, create some dummy folder, such as ~/Debian by "mkdir ~/Debian". 5) At Ubuntu shell, do "sudo mount -t drvfs //wsl.localhost/Debian ~/Debian". The first parameter is from 2), replace '\' with '/' for Linux style path, and second parameter is dummy folder from 4). 6) Debian's root is mounted under ~/Debian.

Thanks!

enigma131 commented 2 years ago

@hideyukn88 . My question was for access to other Linux partitions of my physical disk (ext4 formated)

hideyukn88 commented 2 years ago

@enigma131, thanks for clarification, so does this help?

https://docs.microsoft.com/en-us/windows/wsl/wsl2-mount-disk

Thanks!

enigma131 commented 2 years ago

My disk is partitionned: 3 partitions ext4 and 1 NTFS The second method woks perfectly, thanks. The idea here is to make this possible via GUI... (gnome-disks ?) .. But gnome-disks seems not to work actually (packet gnome-disk-utility is installed) (gnome-disks:99): GNOME-Disks-ERROR **: 13:49:57.603: Error getting udisks client: Could not connect: ..... FYI : Nautilus is working on mounted partition after manual mounting. See #598