lock app to launcheron ubuntu

在ubuntu上更新PyCharm时之前锁定在launcher上的icon会失效,这里记录下修复的过程,参考原文

  1. cd ~/.local/share/applications
  2. touch jetbrains-pycharm-ce.desktop
  3. add below content
[Desktop Entry]
Encoding=UTF-8  
Version=1.0  
Type=Application  
Name=Welcome to PyCharm Community Edition  
Icon=/mydata/softwares/pycharm-community-2016.3.1/bin/pycharm.png  
Path=/mydata/softwares/pycharm-community-2016.3.1/bin  
Exec=/mydata/softwares/java/jdk1.8.0_20/bin/java -Xbootclasspath/a:./../lib/boot.jar -classpath ./../lib/bootstrap.jar:./../lib/extensions.jar:./../lib/util.jar:./../lib/jdom.jar:./../lib/log4j.jar:./../lib/trove4j.jar:./../lib/jna.jar -Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Dawt.useSystemAAFontSettings=lcd -Djb.vmOptionsFile=./pycharm64.vmoptions -XX:ErrorFile=/home/adolph/java_error_in_PYCHARM_%p.log -Djb.restart.code=88 -Didea.paths.selector=PyCharm50 -Didea.platform.prefix=PyCharmCore -Didea.no.jre.check=true com.intellij.idea.Main  
StartupNotify=false  
StartupWMClass=jetbrains-pycharm-ce  
OnlyShowIn=Unity;  
X-UnityGenerated=true  
  1. chmod +x jetbrains-pycharm-ce.desktop
  2. nautilus