Tag: Ubuntu

  • 在Ubuntu上安装fprint实现指纹识别

    实验室配的新电脑有指纹识别,才装好Ubuntu没两天,正好折腾了一下。
    因为没有在网上找到很有效的教程,走了很多弯路,这里总结一下,其实很简单。
    废话不多说,上代码:

    [shell]
    sudo add-apt-repository ppa:fingerprint/fprint # 添加 PPA
    sudo apt-get update # 更新软件源
    sudo apt-get install libfprint0 fprint-demo libpam-fprintd gksu-polkit # 安装软件
    [/shell]

    是的,就这三步,此时如果安装没有问题,在 “System Settings” -> “User Accounts” 里会多一个 “Fingerprint Login”,照着提示进行设置就可以了。

    我也写了一个简单的安装脚本,拷贝到单独的文件,直接”sudo sh 文件名”就可以了。

    需要注意的是,要注意区分fprint和fprintd,Ubuntu原来的软件源中有libpam-fprint(最后没有d,d代表Dbus接口),但不是一个东西。

    其他Linux发行版应该也是找到对应软件的安装来源,注意区分一下fprint和fprintd就行

  • 解决在Ubuntu上搭建Android开发环境缺少WST包的问题

    前言:之前写过一篇《Ubuntu 10.04安装Android开发环境》,每天都有不少访问量,估计很多就是遇到了这个问题,一直压在Evernote里没有翻出来,现在已转入Arch阵营,没有再次验证解决方案的正确性,完全参照印象和笔记,有问题尽管留言

    平台:Ubuntu 10.10和Ubuntu 11.04,10.04(写那一篇日志的时候)无此问题

    原因:Ubuntu下的Eclipse是Ubuntu社区打包的,非完整版,少了WST包的支持

    现象:安装ADT的时候会提示类似如下错误(版本号可能会有不同):
    [text gutter=”false”]
    Cannot complete the install because one or more required items could not be found. Software being installed: Android Development Tools 10.0.1.v201103111512-110841 (com.android.ide.eclipse.adt.feature.group 0.0.1.v201103111512-110841) Missing requirement: Android Development Tools 10.0.1.v201103111512-10841 (com.android.ide.eclipse.adt.feature.group 10.0.1.v201103111512-110841) requires ‘org.eclipse.wst.sse.core 0.0.0’ but it could not be found
    [/text]
    解决方案:
    方案1:直接从Eclipse官网下载完整的安装包
    方案2:遵照以下菜单顺序或提示执行
    [text gutter=”false”]
    1:Help –> Install New Software –> Add –> type ‘http://download.eclipse.org/releases/galileo’ in the Location –>OK
    2:Help –> Install New Software –> Add –> type ‘http://dl.google.com/eclipse/plugin/3.5’ in the Location –> OK
    3:Please make sure the option ‘Contact all updates sites during install to find required software’ is checked.
    4:Restart Eclipse,Reinstall ADT
    [/text]
    相关参照:
    1)http://code.google.com/intl/es/eclipse/docs/faq.html#wstinstallerror
    2)http://code.google.com/intl/es/eclipse/docs/install-eclipse-3.5.html

    P.S.本文参与“第二届 Google 暑期大学生博客分享大赛 – 2011 Android 成长篇”,感谢大家支持

  • Shell 自动补全

    1) /etc/passwd

    It shows like this
    [shell]huxuan:x:1002:1002::/home/huxuan:/bin/bash[/shell]
    in format of
    [shell]Username:Password:User ID (UID):Group ID (GID):User ID Info:Home directory:Command/shell[/shell]

    Make sure the Command/shell is the “/bin/bash” and not the “/bin/sh” which may be the default value.

    2) $HOME$/.bashrc or /etc/bash.bashrc
    Make sure the code blew is not commented out.

    [shell]if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
    fi[/shell]

    3) Reference
    http://www.cyberciti.biz/faq/understanding-etcpasswd-file-format/