Outside sources
What you need is gnome-desktop-item-edit
program. Basically it does the same thing - it creates a .desktop
file. Why ? Because launchers are .desktop
files, just pinned to launcher. Nothing more than that. Windows shortcuts are .lnk
files too by they way, they just don't show up as files with .lnk
extension, but if you ever mounted a Windows hard drive - you'll know.
The gnome-desktop-item-edit
command is still available if you install gnome-panel
or gnome-tweak-tool
.
Once you have it, you can use this command in terminal:
gnome-desktop-item-edit --create-new ~/Desktop
Homebrew
I've actually written a small script for that purpose before (because why not ? ). You can copy the code, save to file, and run whenever you want it. That simple !
#!/bin/bash
FORM=$(zenity --forms \ --title="Simple shortcut maker" --text="Create new .desktop file" \
--add-entry="Program Name" \
--add-entry="Command or path to file" \
--add-entry="Terminal app(true/false)" \
--add-entry="Icon (path)")
[ $? == 0 ] || exit 1
awk -F'|' -v home="$HOME" '{
FILE = home"/Desktop/"$1".desktop"
print "[Desktop Entry]" >> FILE
print "Type=Application" >> FILE
print "Name="$1 >> FILE
print "Exec="$2 >> FILE
print "Terminal="$3 >> FILE
if ($4 !~ /^[ ]*$/)
print "Icon="$4 >> FILE ;
system("chmod 755 " FILE);
}' <<< "$FORM"
And that's how it looks:

You will have .desktop
file in your Desktop folder, which you can later pin to launcher.
Note: the content about the gnome-desktop-item-edit is provided by fossfreedom's original answer, please upvote his good work !
tkinter
application by any chance? – Jacob Vlijm Feb 06 '16 at 12:30