Ken had asked about a simple way to share files.
This is a little trick for sharing files that I think is slick if you don't want to install anything extra.
As part of the Standard Library for Python is a
SimpleHTTPServer, in Python 3 it's called
http.serverSay you're on IP 192.168.0.10 and you want someone on the LAN to fetch (a) file(s) from your machine.
In the terminal navigate to the directory the file(s) is/are located. Enter:
Code:
python -m SimpleHTTPServer
if you want to be modern it's
Code:
python3 -m http.server
All files in that directory and following subdirectories will be available through a web browser at
http://192.168.0.10:8000When the transfer is finished
<ctrl><c> will terminate the server.
It is so slick I make an alias for it in
.bash_aliasesQuote:
alias serve="python3 -m http.server 8800"
so to serve files I just enter
serve. (Default port is 8000, I use 8800 because 8000 and 8080 are already busy in an unrelated effort.)
You gotta admit this is pretty cool, but what if someone wants to send you a file but don't have a capable operating system like Navigatrix?
Get
droopy. Droopy is a 13kB download, and installed only takes up ~75kB.
Install droopy
Code:
sudo apt-get install droopy
I created a small configuration file
Code:
medit ~/.droopy
It looks like this
Quote:
--message=Hi, You can send Moe a file.
--picture=/home/moe/droopy/wadda111.png
--directory=/home/moe/droopy
8088
This creates a web server (port
8088) with a welcome message and picture. Any files sent to me will go into the droopy directory I previously created (
mkdir ~/droopy).
I like 'point and click' so I created a menu entry
Menu> Internet> RECEIVE Stuff with
Code:
medit ~/.local/share/applications/droopy.desktop
Code:
[Desktop Entry]
Type=Application
Name=RECEIVE Stuff
GenericName=Receive Stuff
Comment=Have people send you things via the intertubes
Icon=/usr/share/icons/cab_view.png
Exec=droopy
NoDisplay=false
Categories=Network;
StartupNotify=true
Terminal=false
The 'file receiver' starts up and you can see it by pointing your browser to
localhost:8080. Anyone on the local network can send a file via, for example,
http://192.168.0.10:8080. There is also a handy device at the top of
your localhost:8080 to give your 'outside' URL so your uncle from Upper Combuckton can send you something as well.
The only think missing from this simple configuration is a startup notification to let you know it's lauched, and, currently the droopy shutdown is
Code:
killall droopy
or logging off.
For the next week, or until I regret publicly posting this URL...take a look at
http://wadda.ddns.net:8088 <--
No-IP redirector because I have a dynamic IP
See what the Python server (
python3 -m http.server 8800) looks like, and download, the files people have sent to me via droopy.
http://wadda.ddns.net:8800/You are responsible for your own actions. Forewarned is forearmed, and everything is logged. But that shouldn't stop the curious.