How Can I Transfer Files?

Is there a (somewhat non-techie) way to transfer files back and forth between a Linux desktop and L5? I bought a USB3 to USB cable

There’s been quite a bit of discussion on this thread: How to transfer files via USB cable between computer and Librem 5?

The most easy non-techie way I use, is through a sandisk USB-A / USB-C drive

2 Likes

I’m assuming that you mean here that you bought a USB-C to USB-A cable and your computer only has USB-A ports.

An alternative is to use the cable that comes with the Librem 5 (for charging) and use it with a USB-A to USB-C adapter.

How much? 100 MB? 1 GB? 10 GB?

Personally I have installed an SSH server on the Librem 5 (fairly useful anyway, and a tutorial is here) and I use that to export the file system of the Librem 5 using the SFTP subsystem of SSH and I use sshfs on the Linux desktop to mount that file system transparently on the desktop. So then I can just copy files back and forth using whatever I would normally use on the desktop.

I am doing this over WiFi because I couldn’t be bothered with a cable. If you had a lot of data, it might make sense to do it wired.

Is the above “somewhat non-techie”? You tell me. :wink:

1 Like

This is probably the easiest to get going. You could also use a microsd card, though that will involve insering and removing the card from the phone regularly which isn’t the most convenient.

Syncing with nextcloud/dropbox/etc is slightly more effort to setup, but is the way I find to be most convenient. Just login to your account on both devices and pick which folder(s) to sync.

Thanks,
I checked the “cloud” idea out and decided it’s not for me … my desktop does not have a microsd slot so that’s out. I’m looking at the Sandisk USB-A/USB/C drive as the likely solution for me.

Thanks for the tutorial link, irvinewade. I rate it ‘somewhat techie’ and from what I understood from it, the setup could compromise the security level to some extent.
My transfers will involve text, photos, and small video clips and the like - most less than 1gig. I’m thinking frilb5’s suggestion of Sandisk USB-A/USB-C drive will work the best for me.

Thnaks, Sarcasmo220! :+1:

1 Like

I recommend using the Warp app (Warp | Flathub) which uses the Magic Wormhole protocol and works whether the devices are on one network, or on multiple (only using the internet when it has to).

Alternatively, local network only, Warpinator (Warpinator | Flathub) is also pretty nice.

It’s not super fast, but to move the occasional file between my Linux (Debian with Gnome) laptop and my L5 I just use Bluetooth.

:+1: Thanks for the suggestion, lifeform

To some extent, yes. Any time you open something up on the network, you create an additional point of attack. You can mostly mitigate that by correct SSH setup. However if you are really concerned about that then you can enable the SSH server on the Librem 5 only when you intend to transfer files.

Otherwise, yes, sneakernet always works.

1 Like

I did via bluetooth connection from my L13 to L5.

Don’t install SSH.
Is is likely that smartphone should not perform any server tasks.
Also don’t install any specific applications.
It is not Android where very basic tasks can be accomplished only by using 3rd-party GUI applications from their store.

Use serial port:

  1. On host:
$ sudo apt install picocom lrzsz
$ cd DIR_FOR_DL/
  1. Connect your mobile with cord and connect:
$ picocom -b115200 /dev/ttyACM0
  1. On target:
$ sudo apt install lrzsz
$ zsend /dev/ttyACM0 test

Vice versa works. Change port to /dev/ttyGS0 to send from target to host.
It may be needed to use sudo with picocom and zrecv/zsend on host even after adding your username to dialout group. (Don’t know why?)
Also the receiving side should execute zrecv, as I understand, only for the very first time you send something.
The both scripts are below.

$ cat ~/.local/bin/zrecv
#!/usr/bin/env bash

# From here (with some modifications):
#
# https://superuser.com/questions/604055/using-rz-and-sz-under-linux-shell

function use
{
    echo "Usage: $0 port"
    echo "e. g. $0 /dev/ttyGS0"
    exit 1
}

if [ $# -ne 1 ]
then
    use
fi

DEV="$1"

stty -F $DEV 115200
rz > $DEV < $DEV
$ cat ~/.local/bin/zsend
#!/usr/bin/env bash

# From here (with some modifications):
#
# https://superuser.com/questions/604055/using-rz-and-sz-under-linux-shell

function use
{
    echo "Usage: $0 port filepath"
    echo "e. g. $0 /dev/ttyGS0 /tmp/filename"
    exit 1
}

if [ $# -ne 2 ]
then
    use
fi

DEV="$1"
FILENAME="$2"

stty -F $DEV 115200
sz "$FILENAME" > $DEV < $DEV