document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #!/bin/bash
  2.  
  3. # First, please make sure gksudo is installed
  4. # Run \'sudo apt-get install gksu\' to make it sure
  5.  
  6. # Get the path
  7. if [ -e -n $1 ]; then
  8.     obj="$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
  9. else
  10.     path="`echo $NAUTILUS_SCRIPT_CURRENT_URI | cut -d\'/\' -f3- | sed \'s/%20/ /g\'`"
  11.     selected="$path/${1##*/}"
  12. fi
  13.  
  14. #Check if selected object file or folder
  15. if [ -f "$selected" ]; then
  16.     gksudo gedit "$selected"
  17. elif [ -d "$selected" ]; then
  18.     gksudo nautilus "$selected"
  19. fi
  20.  
  21. exit 0
');