Created
April 9, 2012 21:27
-
-
Save jamesadney/2346661 to your computer and use it in GitHub Desktop.
Add "Create New Launcher" shortcut to nautilus context menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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