guest@dotshare [~/groups/wms/dwm] $ ls sharelocal/ | cat

share_local (raw, dl)

max87 Jan 31, 2015 (wms/dwm)
1
2
3
4
5
6
#!/bin/bash
## Nautilus file share script ~/.local/share/nautilus/scripts/share_local
## Dependencies: notify-osd ( gnome shell ) , netcat
notify-send "Sharing raw file $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS on Port 8080"
cat "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" |  nc -l -p 8080
notify-send "Finished $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS ."

CLICK TO VIEW

x

Notes

share_local is Nautilus ( Gnome Shell File Manager ) script .

The script simply streams selected File to Port 8080 on local machine.

Steps:

Save the script as ~/.local/share/nautilus/scripts/share_local file.

From Nautilus , select File > Context Menu > Scripts > share_local . The file will be streamed through port 8080 of your local machine.

You should be able to download the stream via another machine/browser with http://YourIP:8080/ . Note your browser may not support this. If so, use “wget http://YourIP:8080” and the file will be saved as “index.html”

You can also download the file using a mobile browser , like latest Opera Browser for Android. Try to send a file two times , since Opera attempts to run any file on first attempt.

:)

Comments

necrophcodr said about 8 years ago

I’m not sure why this would be posted in dwm though? BUt it seems pretty cool.