Ubuntu 14 配置Android Studio的快捷启动方式
2016-04-09 09:44
501 查看
在window7下安装配置了Android Studio之后就想把ubuntu下的Android Studio整舒服。
Ubuntu下解压Android Studio压缩包后有个名为"Install-Linux-tar.txt"的说明文件,里面有这么一段:
Unpack the Android Studio distribution archive that you downloaded to
where you wish to install the program. We will refer to this destination
location as your {installation home} below.
Open a console and cd into "{installation home}/bin" and type:
./studio.sh
to start the application.
[OPTIONAL] Add the "{installation home}/bin" to your PATH environmental
variable so that you may start Android Studio from any directory.
如果只做前两步的话每次启动Android Studio都要用终端进入Android Studio的文件夹运行"./studio.sh",这是很麻烦的。
第一次和第二次都是不正解。不想看请跳过。
第一次:修改/etc/profile文件,添加"{installation home}/bin"到环境变量。重启系统使其生效。
事实证明不作死就不会死啊...重启以后被卡在了输密码登陆的界面,无限循环输密码吗进不去系统。
解决办法:1.Ctrl+Alt+F1进入命令界面, 2.输入sudo vi /etc/profile还原为修改前的内容, 3.输入:wq保存, 4.输入reboot重启系统[1]。
第二次:修改/etc/environment添加"{installation home}/bin" 到PATH环境变量,此时可以从任意文件夹启动Android Studio了,但是还是要在终端里面。
顺便profile和environment的区别:系统是先执行/etc/environment,后执行/etc/profile。/etc/environment是设置整个系统的环境,而/etc/profile是设置所有用户的环境。系统应用程序的执行与用户环境可以是无关的,但与系统环境是相关的[2]。
正解在这里!
Google到一篇名为How to add Android Studio to the launcher?的文章[3],里面有一段Answers内容为:
Here is my AndroidStudio .desktop file which works from the launcher.
Alternatively, you can also open Android Studio, click on Configure(如果已经打开了AS,此处就改为Tools) -> Create Desktop Entry. This should create an entry on the dash:
------------------------
AndroidStudio.desktop文件放桌面上,就是下面这样子。
做了这些之后就可以从桌上和dash里启动Android Studio了。
如果提示未信任的应用启动器的问题,这时只要右键该应用的desktop文件,单击属性,在权限选项卡中勾选“允许作为程序执行文件”即可[4]。
如果你并不需要桌面图标的话,下面这种方式可以更快捷的把AS图标锁定在Launcher上。
在第一次打开AS的欢迎界面的时候,按照下图在configure里点下Create Desktop Entry,此时在Launcher上的AS图标右键Lock to Launcher,就可以把AS的快捷方式锁定在这。
为什么要执行一下Create Desktop Entry呢?因为不执行这一步的话,虽然也有Lock to Launcher这个选项,但是有可能并没有成功锁定在Launcher上,退出AS后Launcher的图标也自动消失了。
另外:如果打开了某个工程进入主界面的时候可以在Tools的下拉菜单里找到Create Desktop Entry选项。
参考:
Ubuntu
14.04解决登录界面无限循环的方法
linux中/etc/profile
与/etc/environment文件的区别
How
to add Android Studio to the launcher?
解决ubuntu下提示未信任的应用启动器的问题
原文地址: http://blog.csdn.net/aaa111/article/details/41833179
桌面图标
Ubuntu下解压Android Studio压缩包后有个名为"Install-Linux-tar.txt"的说明文件,里面有这么一段:Unpack the Android Studio distribution archive that you downloaded to
where you wish to install the program. We will refer to this destination
location as your {installation home} below.
Open a console and cd into "{installation home}/bin" and type:
./studio.sh
to start the application.
[OPTIONAL] Add the "{installation home}/bin" to your PATH environmental
variable so that you may start Android Studio from any directory.
如果只做前两步的话每次启动Android Studio都要用终端进入Android Studio的文件夹运行"./studio.sh",这是很麻烦的。
第一次和第二次都是不正解。不想看请跳过。
第一次:修改/etc/profile文件,添加"{installation home}/bin"到环境变量。重启系统使其生效。
事实证明不作死就不会死啊...重启以后被卡在了输密码登陆的界面,无限循环输密码吗进不去系统。
解决办法:1.Ctrl+Alt+F1进入命令界面, 2.输入sudo vi /etc/profile还原为修改前的内容, 3.输入:wq保存, 4.输入reboot重启系统[1]。
第二次:修改/etc/environment添加"{installation home}/bin" 到PATH环境变量,此时可以从任意文件夹启动Android Studio了,但是还是要在终端里面。
顺便profile和environment的区别:系统是先执行/etc/environment,后执行/etc/profile。/etc/environment是设置整个系统的环境,而/etc/profile是设置所有用户的环境。系统应用程序的执行与用户环境可以是无关的,但与系统环境是相关的[2]。
正解在这里!
Google到一篇名为How to add Android Studio to the launcher?的文章[3],里面有一段Answers内容为:
Here is my AndroidStudio .desktop file which works from the launcher.
[Desktop Entry] Version=1.0 Type=Application Name=Android Studio Exec="/home/username/Programs/AndroidStudio/bin/studio.sh" %f Icon=/home/username/Programs/AndroidStudio/bin/idea.png Categories=Development;IDE; Terminal=false StartupNotify=true StartupWMClass=jetbrains-android-studio Name[en_GB]=android-studio.desktop
Alternatively, you can also open Android Studio, click on Configure(如果已经打开了AS,此处就改为Tools) -> Create Desktop Entry. This should create an entry on the dash:
------------------------
AndroidStudio.desktop文件放桌面上,就是下面这样子。
做了这些之后就可以从桌上和dash里启动Android Studio了。
如果提示未信任的应用启动器的问题,这时只要右键该应用的desktop文件,单击属性,在权限选项卡中勾选“允许作为程序执行文件”即可[4]。
锁定到Launcher
如果你并不需要桌面图标的话,下面这种方式可以更快捷的把AS图标锁定在Launcher上。在第一次打开AS的欢迎界面的时候,按照下图在configure里点下Create Desktop Entry,此时在Launcher上的AS图标右键Lock to Launcher,就可以把AS的快捷方式锁定在这。
为什么要执行一下Create Desktop Entry呢?因为不执行这一步的话,虽然也有Lock to Launcher这个选项,但是有可能并没有成功锁定在Launcher上,退出AS后Launcher的图标也自动消失了。
另外:如果打开了某个工程进入主界面的时候可以在Tools的下拉菜单里找到Create Desktop Entry选项。
参考:
Ubuntu
14.04解决登录界面无限循环的方法
linux中/etc/profile
与/etc/environment文件的区别
How
to add Android Studio to the launcher?
解决ubuntu下提示未信任的应用启动器的问题
原文地址: http://blog.csdn.net/aaa111/article/details/41833179
相关文章推荐
- Android Studio系列(二)使用Android Studio开发/调试整个android系统源代码(不定时更新)
- Debugging native framework code of Android Java applications
- Android sqlite3工具的使用
- android学习记录(十三)Task 和 Activity 回退栈操作。
- android中 代码实现截图功能(静态+动态视频)
- android layout_gravity失效的问题
- android:paddingBottom=“@dimen/activity_horizontal_margin"的意思
- Android学习(11) -- Android的存储
- Android学习(10) -- 常见布局
- android RelativeLayout属性和使用, 实现上面view叠加在下面view之上的效果2
- ClipDrawable制作图片渐进效果
- Android之TextView文字绘制流程
- Android Paint之 setXfermode PorterDuffXfermode 讲解
- Android Studio 导入 Vitamio及其笔记
- Android的启动过程
- 阿里客户端工程师试题简析——Android应用的闪退(crash)分析
- Android获取版本信息的工具类
- Android 新增一个页面注意事项
- LitePal的开源框架-郭神
- 蜂窝教育Android培训 致力培养安卓人才