To provide a GUI for LXDE users to easily create new .desktop files, which can be used as shortcuts to applications or locations, follow the instructions below:
1. Create file:
/usr/local/bin/create-quicklauncher:
#!/bin/bash
# Use the current time as a unique temporary filename
DATETIME=$(date +%Y%m%d-%H%M%S)
FILENAME=$DATETIME.desktop
lxshortcut –output=$(pwd)/$FILENAME
# Get the Name that user inputed so we can rename our file
NAME=$(cat $FILENAME | grep ‘^Name’ | awk -F = ‘#39;)
if ! [ “$NAME” == “” ]; then
if ! [ -f “$NAME.desktop” ]; then
# Rename file to $NAME.desktop
mv $FILENAME “$NAME.desktop”
fi
fi
2. Make file executable:
chmod +x /usr/local/bin/create-quicklauncher
3. Install Nautilus-Actions Configuration Tool
4. Define a new action in Nautilus-Actions Configuration Tool:
Action:
Tick Display item in selection AND location context menus
Context label = Create quick launcher
Icon = document-new-symbolic.symbolic
Command:
Path = /usr/local/bin/create-quicklauncher
/home/user/.local/share/applications