Read Sean

          Read me, read Sean.
          posts - 508, comments - 655, trackbacks - 9, articles - 4

          2014年4月6日

          不知道從什么時(shí)候開(kāi)始的,tsocks在Mac下面安裝要費(fèi)些周折,brew官方和曾經(jīng)一度存在的第三方tap都不再支持直接brew install,需要手工創(chuàng)建formula。過(guò)程倒也還OK:

          vim /usr/local/Library/Formula/tsocks.rb

          require 'formula'

          class Tsocks < Formula
            # The original is http://tsocks.sourceforge.net/
            # This GitHub repo is a maintained fork with OSX support

            homepage 'http://github.com/pc/tsocks'
            head 'https://github.com/pc/tsocks.git'

            depends_on 'autoconf' => :build if MacOS.xcode_version.to_f >= 4.3

            def install
              system "autoconf""-v"
              system "./configure""--prefix=#{prefix}""--disable-debug""--disable-dependency-tracking""--with-conf=#{config_file}"

              inreplace("tsocks") { |bin| bin.change_make_var! "LIBDIR", lib }

              system "make"
              system "make install"

              etc.install "tsocks.conf.simple.example" => "tsocks.conf" unless config_file.exist?
            end

            def test
              puts 'Your current public ip is:'
              ohai `curl -sS ifconfig.me 2>&1`.chomp
              puts "If your correctly configured #{config_file}, this should show the ip you have trough the proxy"
              puts 'Your ip through the proxy is:'
              ohai `tsocks curl -sS ifconfig.me 2>&1`.chomp
            end

            def config_file
              etc / 'tsocks.conf'
            end
          end

          有了上述formula之后,即可 brew install --HEAD tsocks 。

          posted @ 2014-05-07 23:23 laogao 閱讀(4088) | 評(píng)論 (2)編輯 收藏

          有了RPi當(dāng)然免不了要玩玩XBMC,這里推薦XBian,安裝配置過(guò)程如下:

          1- 下載.img文件 ( http://www.xbian.org/download/ );
          2- 用dd命令將.img(比如XBian_beta_2.img)寫(xiě)入SD卡;
          3- 將中文字體(比如wqy-zenhei.ttc)重命名為arial.ttf,復(fù)制到SD卡的~/.xbmc/media/Fonts目錄(XBian默認(rèn)用戶為xbian,密碼raspberry);
          4- 從 https://code.google.com/p/xbmc-addons-chinese/downloads/detail?name=repository.googlecode.xbmc-addons-chinese-eden.zip 下載資源插件并復(fù)制到SD卡;
          5- 將SD卡插入RPi并連接HDMI到電視機(jī)/顯示器;
          6- RPi開(kāi)機(jī),進(jìn)入XBian的配置頁(yè)面,可以校準(zhǔn)屏幕,配置網(wǎng)絡(luò)連接等;
          7- 在系統(tǒng)設(shè)置中選擇字體為Arial,語(yǔ)言選為中文,此時(shí)應(yīng)該看到界面可正常顯示中文;
          8- 安裝擴(kuò)展程序,選擇之前下載到SD卡的repository.googlecode.xbmc-addons-chinese-eden.zip文件,擴(kuò)展安裝成功后即可在擴(kuò)展程序列表中看到對(duì)應(yīng)的資源條目,逐一安裝即可。

          額外提示:XBMC也可以通過(guò)網(wǎng)絡(luò)共享播放視頻,之前跟大家提到過(guò)XBMC顯示中文字幕有時(shí)出現(xiàn)整行被方塊覆蓋的問(wèn)題,解決方法是在字幕文件中查找并刪除或替換"…"字符。Enjoy!

          posted @ 2014-04-06 17:45 laogao 閱讀(2374) | 評(píng)論 (0)編輯 收藏

          主站蜘蛛池模板: 堆龙德庆县| 岳阳县| 甘南县| 德兴市| 尉氏县| 蒙山县| 德保县| 凤阳县| 黄平县| 连南| 江孜县| 灵石县| 临朐县| 松潘县| 达尔| 湖口县| 珠海市| 潮州市| 元江| 凤阳县| 泰宁县| 信宜市| 防城港市| 安多县| 墨玉县| 海原县| 东乌珠穆沁旗| 武隆县| 天长市| 祁门县| 新晃| 利川市| 东乌珠穆沁旗| 阳高县| 黄大仙区| 固原市| 明溪县| 三穗县| 枣强县| 获嘉县| 冀州市|