Friday, August 6, 2021

Sharing linux directory with windows through remote desktop protocol

Rdesktop is a remote desktop protocol client for linux, to connect to windows machine through remote desktop protocol. Using the usual windows remote desktop client, user can easily drag and drop files between remote and local machines, but not with the rdesktop application.

To overcome this issue, rdesktop comes with an option to share the local linux directory, to the remote windows, so that the windows can access the local linux directory once rdesktop is connected. 

To do that, just specify -r while connecting using rdesktop

$ rdesktop -u administrator -r disk:download=/home/mine/Download mywindows:3389

The above command will share /home/mine/Download to mywindows machine, shown as download, just like below:


 






I can now open the download folder, and it will show me the Download folder in my linux machine (I call it workmachine).

If you do not have rdesktop command, you can easily install it in ubuntu using 

$ sudo apt install rdesktop -y