Created
January 20, 2023 06:22
-
-
Save diki-haryadi/81b6cca5be1dcdd1a2966c98d4d5abc7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# create script | |
nano create-shortcut.sh | |
``` | |
#!/bin/bash | |
echo "Enter the path to the logo image:" | |
read logo_path | |
echo "Enter the path to the executable application:" | |
read executable_path | |
echo "[Desktop Entry]" > my_shortcut.desktop | |
echo "Type=Application" >> my_shortcut.desktop | |
echo "Name=My Shortcut" >> my_shortcut.desktop | |
echo "Exec=$executable_path" >> my_shortcut.desktop | |
echo "Icon=$logo_path" >> my_shortcut.desktop | |
echo "Shortcut created successfully!" | |
``` | |
# Make the script executable | |
chmod +x my_shortcut.desktop | |
# Move the script to the desktop | |
mv my_shortcut.desktop ~/Desktop/ | |
# Refresh the desktop to show the shortcut | |
nautilus ~/Desktop/ | |
# You can now double-click the shortcut on your desktop to launch the application. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment