Skip to content

Instantly share code, notes, and snippets.

@puhitaku
Forked from rob-murray/add_intellij_launcer
Last active March 26, 2018 05:47
Show Gist options
  • Save puhitaku/ff99acf45f23210b790359d15d98d87f to your computer and use it in GitHub Desktop.
Save puhitaku/ff99acf45f23210b790359d15d98d87f to your computer and use it in GitHub Desktop.
Add PyCharm launcher shortcut and icon for ubuntu
set -ue -o
APP_ID="clion"
APP_NAME="CLion"
APP_VER="2017.3.4"
APP_DIR="/home/sueda/jetbrains"
sudo bash -c "cat > /usr/share/applications/${APP_ID}.desktop" <<EOF
[Desktop Entry]
Version=${APP_VER}
Type=Application
Terminal=false
Icon[en_US]=${APP_DIR}/${APP_ID}-${APP_VER}/bin/${APP_ID}.png
Name[en_US]=${APP_NAME} ${APP_VER}
Exec=${APP_DIR}/${APP_ID}-${APP_VER}/bin/${APP_ID}.sh
Icon=${APP_DIR}/${APP_ID}-${APP_VER}/bin/${APP_ID}.png
Name=${APP_NAME} ${APP_VER}
EOF
sudo chmod 644 /usr/share/applications/${APP_ID}.desktop
sudo chown root:root /usr/share/applications/${APP_ID}.desktop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment