启动器的内容如下
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Android Studio
GenericName=Android Studio
Exec="/media/dell/F2CCD331CCD2EEBB/Data/Document/sh/Android Studio/Android Studio.sh"
Terminal=false
Icon="/media/dell/F2CCD331CCD2EEBB/Data/Document/sh/Android Studio/icon.xpm"
Type=Application
Categories=Application;
Comment=Android Studio
保存为 xxx.desktop ,该目录是位于从盘,但是已经让从盘开机自动挂载了,从盘上的另外几个启动器也正常显示图标,双击该启动器可以运行,该目录下有 xpm 格式的图片,但是启动器一直是白色的,重启了若干次还是白色的,是因为文件夹的名字有空格还是因为引号的位置没加好?
1
GGGG430 2016-02-28 22:38:03 +08:00
Android\ Studio
或者换一种格式的图片 |
2
cuteshell 2016-02-29 09:06:48 +08:00
xxx.desktop 和 icon.xpm 的权限对了吗?试试:
sudo chmod a+r "/media/dell/F2CCD331CCD2EEBB/Data/Document/sh/Android Studio/icon.xpm" sudo chmod a+rx xxx.desktop |
5
GGGG430 2016-02-29 19:40:27 +08:00 1
@asdwfwqd 你把 Exec 和 Icon 后面的引号去了试试
顺便放上一个可用的 [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Name=Android Studio Icon=jetbrains-studio.png Path=/home/lg430/soft/android-studio/bin Exec=/usr/lib/jvm/java/bin/java -Xbootclasspath/a:/home/lg430/soft/android-studio/bin/../lib/boot.jar -classpath /home/lg430/soft/android-studio/bin/../lib/bootstrap.jar:/home/lg430/soft/android-studio/bin/../lib/extensions.jar:/home/lg430/soft/android-studio/bin/../lib/util.jar:/home/lg430/soft/android-studio/bin/../lib/jdom.jar:/home/lg430/soft/android-studio/bin/../lib/log4j.jar:/home/lg430/soft/android-studio/bin/../lib/trove4j.jar:/home/lg430/soft/android-studio/bin/../lib/jna.jar:/usr/lib/jvm/java/lib/tools.jar -Xms256m -Xmx1280m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=225m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -da -Djna.nosys=true -Djna.boot.library.path= -Djna.debug_load=true -Djna.debug_load.jna=true -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Dawt.useSystemAAFontSettings=lcd -Djb.vmOptionsFile=/home/lg430/soft/android-studio/bin/studio64.vmoptions -XX:ErrorFile=/home/lg430/java_error_in_STUDIO_%p.log -Djb.restart.code=88 -Didea.paths.selector=AndroidStudio1.4 -Didea.platform.prefix=AndroidStudio com.intellij.idea.Main StartupNotify=false StartupWMClass=jetbrains-studio OnlyShowIn=Unity; X-UnityGenerated=true |
6
cuteshell 2016-03-01 11:04:54 +08:00 1
Icon 路径允许有空格,而 Exec 路径不允许有空格。吧“”和\都去掉就可以了。
Icon=/media/dell/F2CCD331CCD2EEBB/Data/Document/sh/Android Studio/icon.xpm 参考: http://askubuntu.com/questions/722179/icon-path-in-desktop-file |