Last active
February 8, 2020 02:36
-
-
Save annalinneajohansson/cf887aa1373505905e0b to your computer and use it in GitHub Desktop.
Generate a xfce4 panel shortcut (.desktop file). Change "launcher-10" to whatever launcher is used.
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 | |
echo "Enter host (defined in ~/.ssh/config):" | |
read host | |
if [ -z "${host}" ]; then | |
echo "No host given. Exiting." | |
else | |
echo "Enter comment: " | |
read comment | |
cd ~/.config/xfce4/panel/launcher-10/ | |
echo "[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Name=ssh $host | |
Comment=$comment | |
Exec=x-terminal-emulator -e 'ssh $host' | |
Icon=utilities-terminal | |
Path= | |
Terminal=false | |
StartupNotify=true" > $host.desktop | |
echo "SSH shortcut ($host) created" | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment