SendTo/Share -> TotalCommander:LAN

Support for Android version of Total Commander

Moderators: sheep, Hacker, Stefan2, white

Post Reply
Som30ne
Junior Member
Junior Member
Posts: 14
Joined: 2019-08-28, 15:37 UTC

SendTo/Share -> TotalCommander:LAN

Post by *Som30ne »

I tried to look in the forums but was unable to find if possible/how to do the following:
Say I am browsing the photo gallery, and I want to transfer some photos to my computer.
I can select "Send to" (or Share) and select BlueTooth.
This will transfer the files over bluetooth connection.

I would like to have an ability to select "TotalCommander:LAN",
and select the destination to transfer the files over SMB connection.

Since the photos can be scattered all over the phone,
and trying to find all of these in TotalCommander might be an impossible task
(Some may be received by WhatsApp, for example, and others taken by the phone camera,
and more were received by bluetooth, each phto might be located in a different directory)
JOUBE
Power Member
Power Member
Posts: 709
Joined: 2004-07-08, 08:58 UTC

Re: SendTo/Share -> TotalCommander:LAN

Post by *JOUBE »

Som30ne wrote:
2020-05-30, 23:54 UTC
I tried to look in the forums but was unable to find if possible/how to do the following:
Say I am browsing the photo gallery, and I want to transfer some photos to my computer.
I can select "Send to" (or Share) and select BlueTooth.
This will transfer the files over bluetooth connection.

I would like to have an ability to select "TotalCommander:LAN",
and select the destination to transfer the files over SMB connection.

Since the photos can be scattered all over the phone,
and trying to find all of these in TotalCommander might be an impossible task
(Some may be received by WhatsApp, for example, and others taken by the phone camera,
and more were received by bluetooth, each phto might be located in a different directory)
Oh no. This is a file manager, not a sharing manager. It shares only if there is no way to copy. It has 2 windows side by side, and so you can go on one side with the lan plugin to your smb sever and on the other side to the files you want to copy. Select them and copy them and vise versa. Thats it. (The "vise versa" makes the difference to simple sharing. Do not be a slave of sharing functionality).

JOUBE
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39974
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SendTo/Share -> TotalCommander:LAN

Post by *ghisler(Author) »

This would require to run an SMB server on Android. Unfortunately the SMB ports are so-called privileged ports, which are ports below 1024. Only root users are allowed to run servers on such ports.

You can use my WiFi/WLAN plugin to share the folder. Then you can mount it as a drive in Windows!
Author of Total Commander
http://www.ghisler.com
Som30ne
Junior Member
Junior Member
Posts: 14
Joined: 2019-08-28, 15:37 UTC

Re: SendTo/Share -> TotalCommander:LAN

Post by *Som30ne »

ghisler(Author) wrote:
2020-05-31, 09:32 UTC
This would require to run an SMB server on Android. Unfortunately the SMB ports are so-called privileged ports, which are ports below 1024. Only root users are allowed to run servers on such ports.

You can use my WiFi/WLAN plugin to share the folder. Then you can mount it as a drive in Windows!
Why would this require SMB server on the android device ?
If TC can send files to the PC from it's own interface, without running SMB server on the android device,
why would it require an SMB server to send files to the PC by an external command/API ?
Som30ne
Junior Member
Junior Member
Posts: 14
Joined: 2019-08-28, 15:37 UTC

Re: SendTo/Share -> TotalCommander:LAN

Post by *Som30ne »

JOUBE wrote:
2020-05-31, 09:05 UTC
Oh no. This is a file manager, not a sharing manager. It shares only if there is no way to copy. It has 2 windows side by side, and so you can go on one side with the lan plugin to your smb sever and on the other side to the files you want to copy. Select them and copy them and vise versa. Thats it. (The "vise versa" makes the difference to simple sharing. Do not be a slave of sharing functionality).

JOUBE
But - like I said, I do not know where the files are, I selected multiple files in picture gallery.
To do manual copy, I would have to:
1. check the properties to find the location
2. go to TC
3. go to the relevant directory
4. copy it to the PC
And repeat for each and every file.

Instead of sending all the selected files to the PC with less than 5 clicks.
(Share->TC:Lan->SelectLanServer->select share device)
Som30ne
Junior Member
Junior Member
Posts: 14
Joined: 2019-08-28, 15:37 UTC

Re: SendTo/Share -> TotalCommander:LAN

Post by *Som30ne »

ghisler(Author) wrote:
2020-05-31, 09:32 UTC
This would require to run an SMB server on Android. Unfortunately the SMB ports are so-called privileged ports, which are ports below 1024. Only root users are allowed to run servers on such ports.

You can use my WiFi/WLAN plugin to share the folder. Then you can mount it as a drive in Windows!
It took me a while, but I now understand what you meant by
<< You can use my WiFi/WLAN plugin to share the folder. >>
I think this will probably be usable for my purpose.

But - this raises a question about the url,
for example:
http://1.2.3.4:8081/wxyz
The URL has a port (8081 in the url above) and suffix folder made of some numbers (wxyz in the example above).
Can any of these be changed ?
How are the numbers determined ?

Thanks.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39974
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SendTo/Share -> TotalCommander:LAN

Post by *ghisler(Author) »

You need the latest pre-release version to change these numbers:
https://play.google.com/apps/testing/com.ghisler.tcplugins.wifitransfer

1. The port number can be changed via the new settings menu in the beta. Only ports >=1024 can be used, because apps cannot open the so-called privileged ports below that number. So for example port 80 is a no-go.
2. The suffix acts like a pin number. In the beta, you can now add user names and passwords. In that case, the suffix is always 8888. The client has to support the "digest authentication", which does not send the clear text password over the net. It uses a challenge/response method.
Author of Total Commander
http://www.ghisler.com
Som30ne
Junior Member
Junior Member
Posts: 14
Joined: 2019-08-28, 15:37 UTC

Re: SendTo/Share -> TotalCommander:LAN

Post by *Som30ne »

ghisler(Author) wrote:
2020-06-08, 08:16 UTC
You need the latest pre-release version to change these numbers:
https://play.google.com/apps/testing/com.ghisler.tcplugins.wifitransfer

1. The port number can be changed via the new settings menu in the beta. Only ports >=1024 can be used, because apps cannot open the so-called privileged ports below that number. So for example port 80 is a no-go.
2. The suffix acts like a pin number. In the beta, you can now add user names and passwords. In that case, the suffix is always 8888. The client has to support the "digest authentication", which does not send the clear text password over the net. It uses a challenge/response method.
First, I want to thank you for the answer, and I would like to have a few more inquiries.

1. Thanks, I will try the beta (I understand port is > 1024, and it's ok by me)
2. I do not understand.
I see that on each device the suffix number is different from another device,
but seems to be stable for the same device.
(Is there a way I can set that as well ?
Can that be text and not numbers ? - not very high prio.)

Another phenomenon I saw when testing it is that adding files does not really work (for me).
Scenario:
I received a few images in WhatsApp.
I want to send them all to my pc.
If I select a single image (in whatsApp), I have the Share menu, and can select TotalCommander WiFi
If I select multiple images I do not have the Share menu.
So I tried doing the following:
Select 1 image and share to TC WiFi
Select another image and share to TC WiFi
Select 3rd image and share to TC WiFi
-- on the device I saw that 3 files are shared on the wifi server.
When using a browser to open the URL, I saw all the files listed.
When I actually clicked on the links to the files,
I got error 404/Not Found for all files except the last file added.
(Device Redmi 6A, OS: MIUI 11.0.8.0, Android: 9PPR1.180610.011)

And yet another question:
I see that on web interface I have the option to download all as ZIP.
So the question is - is there a ZIP file created on the device prior to sending, and then the file is sent,
or is it that the ZIP is being done "on-the-fly" to the stream output on the network.

Thanks
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39974
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SendTo/Share -> TotalCommander:LAN

Post by *ghisler(Author) »

2. The suffix is changed every 2 weeks.
If I select multiple images I do not have the Share menu.
There is a separate Android intent to share multiple files. Apparently Whatsapp doesn't support it.
Author of Total Commander
http://www.ghisler.com
Som30ne
Junior Member
Junior Member
Posts: 14
Joined: 2019-08-28, 15:37 UTC

Re: SendTo/Share -> TotalCommander:LAN

Post by *Som30ne »

ghisler(Author) wrote:
2020-06-15, 08:27 UTC
2. The suffix is changed every 2 weeks.
If I select multiple images I do not have the Share menu.
There is a separate Android intent to share multiple files. Apparently Whatsapp doesn't support it.
Thanks for the answer.

I am still curious about how the ZIP is being sent in the WEB interface of the wifi server.
Is it created on the device, and sent after the file exists on the device,
or is it done in memory and sent over the network, without being written to the device beforehand.

Thanks
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39974
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SendTo/Share -> TotalCommander:LAN

Post by *ghisler(Author) »

The ZIP is created "on the fly" as it is sent to the remote client. It is never stored on the device, neither in RAM nor in flash memory.

That's why there is a progress bar on the client only when using zero compression: In this case, the server can calculate the exact size of the ZIP at the beginning, and report that size to the client. When you do use compression, then the size of the ZIP depends on the files you send (some can be compressed well, some not at all), so the server cannot send the total size to the client.
Author of Total Commander
http://www.ghisler.com
Som30ne
Junior Member
Junior Member
Posts: 14
Joined: 2019-08-28, 15:37 UTC

Re: SendTo/Share -> TotalCommander:LAN

Post by *Som30ne »

Thank you very much for all the answers,
and for bearing with me for all these questions.

I really appreciate that.
Som30ne
Junior Member
Junior Member
Posts: 14
Joined: 2019-08-28, 15:37 UTC

Re: SendTo/Share -> TotalCommander:LAN

Post by *Som30ne »

ghisler(Author) wrote:
2020-06-08, 08:16 UTC
You need the latest pre-release version to change these numbers:
https://play.google.com/apps/testing/com.ghisler.tcplugins.wifitransfer

1. The port number can be changed via the new settings menu in the beta. Only ports >=1024 can be used, because apps cannot open the so-called privileged ports below that number. So for example port 80 is a no-go.
2. The suffix acts like a pin number. In the beta, you can now add user names and passwords. In that case, the suffix is always 8888. The client has to support the "digest authentication", which does not send the clear text password over the net. It uses a challenge/response method.
Just saw an update to the wiFi plugin,
seems all the features I mentioned work as expected (Android 7 on S3Neo/Win10).

I really appreciate you for adding requested features.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39974
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SendTo/Share -> TotalCommander:LAN

Post by *ghisler(Author) »

Nice to hear that! Please let me know if you encounter any problems.
Author of Total Commander
http://www.ghisler.com
Post Reply