Live data from Hacker News

QRCP: Transfer files to mobile device by scanning a QR code from the terminal

github.com

1–10 of 11 posts

Re: QRCP: Transfer files to mobile device by scanning a QR code from the terminal

#2
Author here, this is a refactoring of qr-filetransfer, already discussed in the past [0].

Here's how it works: qrcp binds a web server to the address of your Wi-Fi network interface on a random port and creates a handler for it. The default handler serves the content and exits the program when the transfer is complete. When used to receive files, qrcp serves an upload page and handles the transfer.

The tool prints a QR code that encodes the text:

  http://{address}:{port}/{random_path}
Most QR apps can detect URLs in decoded text and act accordingly (i.e. open the decoded URL with the default browser), so when the QR code is scanned the content will begin downloading by the mobile browser.

To send one or more files (or directories):

  qrcp /path/to/file
  # Or
  qrcp send /path/to/file
To receive one or more files:

  qrcp receive --output ~/Downloads
[0] https://news.ycombinator.com/item?id=16647977

Re: QRCP: Transfer files to mobile device by scanning a QR code from the terminal

#5
post #3

This is the feature I'm missing the most from KDE Connect, transferring from Computer to mobile, I ended up using syncthing with a 'send_to_mobile' folder, not the main purpose but... it works.

I often transfer files from the computer to the phone using KDE Connect. Right-click on a file in Dolphin > send to device. Many KDE apps also have a similar share button. I don't know how it works in other desktop environments.

Re: QRCP: Transfer files to mobile device by scanning a QR code from the terminal

#6
That is nice and delightfully simple.

When I saw the title I thought, that it will transfer a file entirely via continuous QR code scanning. But it would be probably too error prone and too slow, especially without a back channel to signify acks.

Maybe such a thing could work between two phones facing each other screens using front cameras. I wonder how fast could it practically get.

Re: QRCP: Transfer files to mobile device by scanning a QR code from the terminal

#7
post #5
post #3

This is the feature I'm missing the most from KDE Connect, transferring from Computer to mobile, I ended up using syncthing with a 'send_to_mobile' folder, not the main purpose but... it works.

I often transfer files from the computer to the phone using KDE Connect. Right-click on a file in Dolphin > send to device. Many KDE apps also have a similar share button. I don't know how it works in other desktop environments.

I use a WM, not a DE, that's maybe why, anyway, I didn't see anything in the KDE connect settings.

Re: QRCP: Transfer files to mobile device by scanning a QR code from the terminal

#8
post #7
post #5

Earlier quoted context omitted.

I often transfer files from the computer to the phone using KDE Connect. Right-click on a file in Dolphin > send to device. Many KDE apps also have a similar share button. I don't know how it works in other desktop environments.

I use a WM, not a DE, that's maybe why, anyway, I didn't see anything in the KDE connect settings.

I haven't tried but you most certainly can use

    kdeconnect-cli --share 
Upvoting you to increase the chance you notice my comment.

Re: QRCP: Transfer files to mobile device by scanning a QR code from the terminal

#9
post #8
post #7

Earlier quoted context omitted.

I use a WM, not a DE, that's maybe why, anyway, I didn't see anything in the KDE connect settings.

I haven't tried but you most certainly can use kdeconnect-cli --share Upvoting you to increase the chance you notice my comment.

Didn't know about that, thanks, will surely try when I reach my computer.

Re: QRCP: Transfer files to mobile device by scanning a QR code from the terminal

#10
post #8
post #7

Earlier quoted context omitted.

I use a WM, not a DE, that's maybe why, anyway, I didn't see anything in the KDE connect settings.

I haven't tried but you most certainly can use kdeconnect-cli --share Upvoting you to increase the chance you notice my comment.

Was a bit confused by the fact that you need to input the absolute path to the file, but when I send it I can manage to find where it goes in my device.
Post reply on HN