meta data for this page
How to share files between a mobian device and another computer
mtp is the technology which Android and other devices use in order to transfer files to and from the computer (showing up in the file manager). There is such a thing available in the package
umtp-responder which you can install if you are aware of what you are doing and how to configure it. mobian did install it for a while but stopped doing so, as this was not deemed a safe enough solution. For instance, it automatically allowed anyone who plugged in the phone through a USB cable to get all files from the phone without the need to authorize. New files were owned by the root user. mobian wants to bring back a mtp solution, but only when it is secure and convenient.
However, as we said: power to the people, the package is there and available.
In case you have a SSH server running, you can access your file system via sftp:. If you want to connect from a Linux desktop, entering the URL sftp:mobian@mobian (adapt if your hostname/IP address differs) in your file manager should allow to browse the file system with the same permissions as user mobian has. This should work from any reasonable Linux computer. If you are connecting from a Windows computer it might be that you require software such as https://www.nsoftware.com/sftp/drive/ in order to connect (pls verify and correct!)
syncthing is available in Debian and it can be used to synchronize folders/files as long as two devices are connected to a network. It can work locally or use relays to circumvent NATs etc… Their documentation on getting started is reasonable and it is not too difficult to set synchronization up.
You only need to run syncthing in case you want to keep stuff synchronized, if you want to automatically start syncthing on login and keep it running, you could do so by issueing (but keep in mind this will continuely consume resources and keep your phone busy):
systemctl enable firstname.lastname@example.org systemctl start email@example.com
It allows 1-way synchronization or 2-way synchronization of selected folders. syncthing needs to be started before it does its thing, so it might be useful to add a desktop button to start the service (unless you always want to have it autostarted, which you perhaps do not want). While syncthing runs, it can be configured using a nice webinterface. Alternatively, there exist a number of GUIs available as frontend.
cloud solutions (nextcloud/webdav)
One workaround is to use a intermediary cloud storage solution that can be accessed by both devices. For instance webdav/nextcloud instances can be integrated through the Online Accounts feature and the Gnome file manager (nautilus) will be able to mount and use these accounts.
Geek bonus points if you actually use the swiss army knife of network tools:
nc -l -p 31337 > my_file on the receiving side and nc $HOST 31337 < my_file on the sending side