vpis3w
Last Updated: February 25, 2016
·
960
· dpashkevich
D42a7264714dee5006b9c99d2567a320

Simple HTTP server from Nautilus context menu

So you can easily start a basic HTTP server for current dir under Linux/OSX by running just one command.

You can go even further and add this command to Nautilus (default file manager in Ubuntu and other gnome-based Linux distros) custom scripts context menu:

"Simple HTTP Server" Nautilus context menu item

To do this simply create a script file in ~/.gnome2/nautilus-scripts (the name of the script will be the name of context menu item, e.g. "Simple HTTP Server") with the following contents:

#!/bin/bash
gnome-terminal --working-directory="$PWD" -x bash -c "pwd;python -m SimpleHTTPServer"

Don't forget to add execute permissions to the file and you're done! Now you should have the context menu as in screenshot and be able to quickly serve the current dir via HTTP!

Say Thanks
Respond
Filed Under