Last Updated: February 25, 2016
· dpashkevich

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:

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
Filed Under

Awesome Job

0dbe43fc 55f1 11e7 9f7e e393aaf472a4
Web Developer
Long Beach, CA
Full Time