Skip to content

Instantly share code, notes, and snippets.

@jamesadney
Created April 9, 2012 21:27
Show Gist options
  • Save jamesadney/2346661 to your computer and use it in GitHub Desktop.
Save jamesadney/2346661 to your computer and use it in GitHub Desktop.
Add "Create New Launcher" shortcut to nautilus context menu
#!/bin/bash
# 1. Install nautilus-actions and create a new action
# 2. Under "Command" tab: "Path" -> "create-launcher.sh" and "Parameters" -> "%f"
# 3. Copy create-launcher.sh to somewhere in $PATH and make executable
# For some reason the desktop gets sent to nautilus actions as "/", so just make launcher go to desktop
# if the current user doesn't own the location sent to the script.
if [ -O $1 ]; then
PATHNAME=$1
else
PATHNAME=$HOME/Desktop
fi
gnome-desktop-item-edit $PATHNAME --create-new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment