分页: 1 / 1

我安装了android-studio,但是创建启动器失败

发表于 : 2014-12-12 18:16
supernow
我的sh文件在/usr/whb/android-studio/bin/studio.sh路径下,在ternmail中不需要参数运行
我的启动写成如下形式,但是就是启动不了,我的写法哪里有问题?

代码: 全选

 [Desktop Entry]                                                             
   Version=1.0
  Type=Application
   Name=android-studio
   Icon=/home/whb/android-studio/bin/androidstudio.ico
   Exec=/usr/whb/android-studio/bin/studio.sh %f
   Comment=IDE
   Categories=Development;IDE;Network;
   Terminal=false

Re: 我安装了android-studio,但是创建启动器失败

发表于 : 2014-12-12 18:50
astolia
不能有多余的空白字符。
你完全可以用desktop-file-validate xxx.desktop命令来检验

Re: 我安装了android-studio,但是创建启动器失败

发表于 : 2014-12-12 20:17
supernow
astolia 写了:不能有多余的空白字符。
你完全可以用desktop-file-validate xxx.desktop命令来检验
我用你的命令检查通过了,但是点击运行还是提示启动失败

代码: 全选

[Desktop Entry]
Version=1.0
Type=Application
Name=android-studio
Icon=/home/whb/android-studio/bin/androidstudio.ico
Exec=/usr/whb/android-studio/bin/studio.sh %f
Comment=IDE
Categories=Development;IDE;
Terminal=false

Re: 我安装了android-studio,但是创建启动器失败

发表于 : 2014-12-13 18:01
astolia
那就是你脚本的问题了。用xdg-open xxx.desktop看报错没有

Re: 我安装了android-studio,但是创建启动器失败

发表于 : 2014-12-15 11:23
supernow
astolia 写了:那就是你脚本的问题了。用xdg-open xxx.desktop看报错没有
用您的建议查了,提示:
* (nautilus-autorun-software:4698): WARNING **: Unable to find device for URI: 包含的挂载不存在
这个在google上查不到和类似问题。
有啥提示吗?

Re: 我安装了android-studio,但是创建启动器失败

发表于 : 2014-12-15 11:55
astolia
如果你那个desktop文件不是用于关联某种文件的打开方式, exec就不能加后面的%f

引用自 http://standards.freedesktop.org/deskto ... 01s06.html
If the application should not open any file the %f, %u, %F and %U field codes must be removed from the command line and ignored.