From da7d15e54153b35b8275e09aae92cc50fdc3cc4b Mon Sep 17 00:00:00 2001 From: Patrick Lucas Date: Mon, 2 Jan 2017 13:10:17 -0500 Subject: [PATCH] Install the .desktop file, if necessary I used this packaging to install IntelliJ on a fairly vanilla Ubuntu install (with Unity) and found that Unity doesn't recognize the installation of a new .desktop file to /usr/share/applications unless `desktop-file-install` is used. --- intellij-idea-community_2016.3.2/debian/postinst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/intellij-idea-community_2016.3.2/debian/postinst b/intellij-idea-community_2016.3.2/debian/postinst index d447a3e..6de0f8b 100644 --- a/intellij-idea-community_2016.3.2/debian/postinst +++ b/intellij-idea-community_2016.3.2/debian/postinst @@ -12,3 +12,8 @@ sudo rm /opt/ideaIC-* ## Make /usr/bin usable sudo mv /usr/bin/intellij-idea-community.sh /usr/bin/intellij-idea-community + +## Install the .desktop file, if necessary +if [ -x "/usr/bin/desktop-file-install" ]; then + sudo /usr/bin/desktop-file-install /usr/share/applications/intellij-idea-community.desktop +fi