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

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
supernow
帖子: 141
注册时间: 2011-09-28 16:43

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

#1

帖子 supernow » 2014-12-12 18:16

我的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
犀利之神
头像
astolia
论坛版主
帖子: 6703
注册时间: 2008-09-18 13:11

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

#2

帖子 astolia » 2014-12-12 18:50

不能有多余的空白字符。
你完全可以用desktop-file-validate xxx.desktop命令来检验
头像
supernow
帖子: 141
注册时间: 2011-09-28 16:43

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

#3

帖子 supernow » 2014-12-12 20:17

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
犀利之神
头像
astolia
论坛版主
帖子: 6703
注册时间: 2008-09-18 13:11

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

#4

帖子 astolia » 2014-12-13 18:01

那就是你脚本的问题了。用xdg-open xxx.desktop看报错没有
头像
supernow
帖子: 141
注册时间: 2011-09-28 16:43

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

#5

帖子 supernow » 2014-12-15 11:23

astolia 写了:那就是你脚本的问题了。用xdg-open xxx.desktop看报错没有
用您的建议查了,提示:
* (nautilus-autorun-software:4698): WARNING **: Unable to find device for URI: 包含的挂载不存在
这个在google上查不到和类似问题。
有啥提示吗?
犀利之神
头像
astolia
论坛版主
帖子: 6703
注册时间: 2008-09-18 13:11

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

#6

帖子 astolia » 2014-12-15 11:55

如果你那个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.
回复