zoukankan      html  css  js  c++  java
  • raspberry pi恢复jessie镜像之后

    1.更新源

    nano /etc/apt/source.list
     1 deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free r$
     2 # Uncomment line below then 'apt-get update' to enable 'apt-get source'
     3 ##deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
     4 
     5 deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main contrib $
     6 deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main cont$
     7 
     8 deb http://mirror.devunt.kr/raspbian/raspbian/ jessie main contrib non-free rpi
     9 deb ftp://ftp.kaist.ac.kr/raspbian/ jessie main contrib non-free rpi
    10 deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib $
    11 deb http://mirror.nus.edu.sg/raspbian/raspbian/ jessie main contrib non-free rpi
    1 apt-get update
    2 apt-get upgrade
    3 apt-get dist-upgrade

    2.卸载epiphany-browser

    突然发现自带epiphany-browser闪退,重装无效,可能在升级jessie之前卸载,升级后再安装可以解决。

    1 apt-get purge epiphany-browser
    2 apt-get autoremove epiphany-browser

    3.安装输入法


    1.不如ibug在右上角有切换图标 卸载

    给树莓派安装中文输入法Fcitx及Google拼音输入法
    2.注意同时添加Chinese pinyin和英文us,重启生效

    Raspberry Pi安装中文字库和输入法

    #安装ibus 输入法引擎 和 ibus 拼音输入法
    sudo apt-get install ibus ibus-pinyin

    安装完毕后重新启动lxde,可以在屏幕右下角看到ibus的图标.
    右键选择preference ,然后在input method选项卡的select a input method 里面选择Chinese ,然后选pinyin.
    点击add添加拼音输入法,同时添加英文us然后点击Close关闭窗口.
    再次点击ibus的图标 可以发现列表里面有拼音输入法可供选择,到这里拼音输入就安装完毕.

    3.不知道有没有必要性

    树莓派(raspberry pi)学习4: 更改键盘布局

    安装chromium和flash插件

    参考资料

    基础编辑策略--树莓派raspberry安装flash(firefox版本)

    如何在raspberry pi2上使用flash

     1 sudo apt-get install chromium
     2 #到自己百度网盘找PepperFlash-12.0.0.77-armv7h.tar.gz
     3 tar -xzf PepperFlash-12.0.0.77-armv7h.tar.gz
     4 cd PepperFlash
     5 chmod +x *
     6 sudo cp * /usr/lib/chromium/plugins
     7 
     8 sudo nano /etc/chromium/default
     9 #modify
    10 CHROMIUM_FLAGS="--ppapi-flash-path=/usr/lib/chromium/plugins/libpepflashplayer.so --ppapi-flash-version=12.0.0.77 -password-store=detect -user-data-dir"

    安装firefox和flash插件

    1 apt-get install iceweasel
    2 apt-get install lightspark browser-plugin-lightspark

    安装shadowsocks

    参考资料

    Ubuntu下shadowsocks配置说明

    科学上网之ubuntu下shadowsocks配置说明

    Ubuntu下 shadowsocks配置说明

    1.安装

    1 apt-get install python-pip
    2 pip install shadowsocks

    2.配置shadowsocks账号信息

    nano /home/pi/Documents/shadowsocks.json
    {
        "server":"xxxxxxxx",
        "server_port":xxxxxxxx,
        "local_address": "127.0.0.1",
        "local_port":1080,
        "password":"xxxxxxxx",
        "timeout":600,
        "method":"aes-256-cfb",
        "fast_open": false,
        "workers": 1
    }

    3.手动启动

    sslocal -c /home/pi/Documents/shadowsocks.json

    4.脚本启动

    nano /home/pi/Documents/shadowsocks.sh

    脚本内容

    1 #!/bin/sh
    2 sslocal -c /home/pi/Documents/shadowsocks.json &

    通过脚本启动

    sh /home/pi/Documents/shadowsocks.sh

    开机启动

    sudo nano /etc/rc.local
    #add
    nohup bash /home/pi/Documents/shadowsocks.sh

    firefox配置代理

    1.http://firefoxfan.cc/firefox-gaogent/firefox-shadowsocks-autoproxy.html  autoproxy总是订阅失败,改用下面的foxyproxy

    1.到https://addons.mozilla.org/zh-CN/firefox/addon/foxyproxy-standard/安装扩展;

    2.订阅网址填“https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt”

     http://firefoxfan.cc/firefox-gaogent/firefox-with-foxyproxy-goagent.html

    https://www.librehat.com/hello-foxyproxy-goodbye-autoproxy/

    a.右键选择option,proxies标签页选择add new proxy,勾选manual proxy configuration,127.0.0.1:1080,注意选择下方socks v5

    b.关闭后选择use proxy 127.0.0.1:1080 for all urls

    c.option选择pattern sub,go,输入https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt,format选择autoproxy,obfuscation选择base64

    chromium配置代理

    暂时无解

    perl错误提示,貌似没有根治

    pi@raspberrypi ~ $ sudo raspi-config
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_TIME = "zh_CN.UTF-8",
        LC_MONETARY = "zh_CN.UTF-8",
        LC_ADDRESS = "zh_CN.UTF-8",
        LC_TELEPHONE = "zh_CN.UTF-8",
        LC_NAME = "zh_CN.UTF-8",
        LC_MEASUREMENT = "zh_CN.UTF-8",
        LC_IDENTIFICATION = "zh_CN.UTF-8",
        LC_NUMERIC = "zh_CN.UTF-8",
        LC_PAPER = "zh_CN.UTF-8",
        LANG = "en_GB.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").

    解决办法

    Perl warning Setting locale failed in Debian

    1 export LANGUAGE=en_GB.UTF-8
    2 export LC_ALL=en_GB.UTF-8
    3 locale-gen en_US.UTF-8
    4 dpkg-reconfigure locales

     Privoxy实现终端代理

    参考资料

     Ubuntu 14.04 配置Shadowsocks和Privoxy实现浏览器和终端代理

    www.liuzong.net/wordpress/index.php/category/pi/  打不开,用bing预览:

    树莓派使用shadowsocks和privoxy搭建http代理

    1.安装

    sudo apt-get install privoxy

    2.配置

    sudo nano /etc/privoxy/config

    在4.2. toggle前面几行找到listen-address  localhost:8118
    确认监听端口号。ubuntu不用修改。

    #        listen-address [::1]:8118
    #
    listen-address  localhost:8118
    #
    #  4.2. toggle
    #  ============

    注意raspberry pi参考第二个链接要将localhost显式修改为0.0.0.0。

    #        listen-address [::1]:8118
    #
    #listen-address  localhost:8118
    listen-address 0.0.0.0:8118
    #
    #  4.2. toggle
    #  ============

    在5.3. forwarded-connect-retries前面几行添加forward-socks5 / 127.0.0.1:1080 .注意最后带小数点

    #       forward           localhost/     .
    forward-socks5 / 127.0.0.1:1080 .
    #
    #  5.3. forwarded-connect-retries
    #  ===============================

    3.重启Privoxy

    sudo /etc/init.d/privoxy restart

    4.配置终端环境

    export http_proxy="127.0.0.1:8118"
    export https_proxy="127.0.0.1:8118"

    5.测试生效性

    wget http://www.baidu.com
    wget https://www.google.com

    6.开机自启动

    sudo nano /etc/rc.local

    add:

    sudo /etc/init.d/privoxy start
    sudo nano /etc/profile

    add:

    export http_proxy="127.0.0.1:8118"
    export https_proxy="127.0.0.1:8118"

    CSI摄像头挂载到video0

    1.raspi-config启用camera

    2.raspistill测试ok

    3.ls /dev没有看到video0设备,导致第三方拍照库找不到设备

    4.有效办法http://pimachine.blogspot.com/2013/11/video4linux2-v4l2-driver-for-raspberry.html

     1 wget http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc && sudo apt-key add ./lrkey.asc
     2 nano /etc/apt/sources.list
     3 #add:
     4 deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ wheezy main
     5 sudo apt-get update
     6 sudo apt-get install uv4l uv4l-raspicam
     7 #optional:
     8 sudo rpi-update
     9 #usage:
    10 uv4l --driver raspicam --auto-video_nr --width 640 --height 480 --encoding jpeg

    开机自启动

    #for auto start
    sudo nano /etc/rc.local
    #add
    uv4l --driver raspicam --auto-video_nr

    测试可用性

    1 sudo reboot
    2 ls -l /dev/video0 
    3 sudo apt-get install fswebcam
    4 sudo fswebcam -d /dev/video0 -r 320x240 --bottom-banner --title "test" --no-timestamp /home/pi/test.jpg
  • 相关阅读:
    《面向对象编程》c++ primer 第15章
    extern的作用(综合网络)
    C程序内存区域分配(5个段作用)
    鼓舞自己的名言
    快速指数算法 和 求逆元算法
    HP Xeon 55xx上GPU的带宽问题
    Ubuntu12.04 安装ibusfbterm0.9.1
    Win7下读写Ext2/Ext3/Ext4文件系统
    fbv安装 为console添加背景图片
    CentOS6/7安装fcitx4.2.5
  • 原文地址:https://www.cnblogs.com/my8100/p/5184732.html
Copyright © 2011-2022 走看看