2012年11月28日 星期三

Linux Mint 14 安裝筆記 - VAIO VPCYA16FW 無線網卡問題排除

在安裝 Linux Mint 14 後發現在 VAIO VPCYA16FW 之前開機捉不到無線網卡的問題已經被修復,安裝完已經可以正常捉到網路卡了,但仍有一個問題,當在 Panel 上的 Network Manager 關閉無線網卡的開關後會發現無線網卡再也不能開啟,從網路上的資料發現這個問題能用 sudo rfkill unblock wlan 這個命令解決,為了不用每次都下命令所以在 /usr/share/cinnamon/applets/network@cinnamon.org/applet.js 加入 + 號後的命令:

    setEnabled: function(enabled) {
        if (enabled) {
+          Util.spawnCommandLine("rfkill unblock wlan");
            this.statusItem.actor.show();
            this.section.actor.show();
        } else {
            this.statusItem.actor.hide();
            this.section.actor.hide();
        }
    },

2012年8月4日 星期六

Linux Mint 13 安裝筆記 - 嘸蝦米的 .deb 檔包裝

前陣子因為公司會查核盜版軟體所以想說自備正版輸入法這種每個人都不一樣公司不可能提供的軟體,因此可下載正版的 IBus 的嘸蝦米輸入法,不過行易所提供的是命令列的安裝方式使用上不太方便,因為這個緣故所以我決定了自製無蝦米的 .deb 檔。

1. 檢查並安裝這些套件。
           dpkg
           dpkg-deb
           dh-make
           debhelper
           devscripts
           fakeroot
           lintian

2. 建立 ~/ibus-boshiamy-1.0.0 資料夾 (命名需為name-version這樣的格式)。

3. 在 ~/ibus-boshiamy-1.0.0 資料夾中執行 dh_make 產生 ~/ibus-boshiamy-1.0.0/debian 資料夾。

4. ~/ibus-boshiamy-1.0.0/debian 資料夾中只留下底下這些檔案其餘刪除(有些由去除 .ex 副檔名產生)。
           control
           changlog
           rules
           preinst
           postinst
           prerm
           postrm

5. control 內容如下。
           Source: ibus-boshiamy
           Section: utils
           Priority: extra
           Maintainer: elvis <hero.elvis@gmail.com>
           Build-Depends: debhelper (>= 8.0.0)
           Standards-Version: 1.0.0
           #Vcs-Git: git://git.debian.org/collab-maint/ibus-boshiamy.git
           #Vcs-Browser: http://git.debian.org/?p=collab-maint/ibus-boshiamy.git;a=summary

           Package: ibus-boshiamy
           Architecture: any
           Depends: ibus (>= 1.0.0)
           Description: Boshiamy, Chinese Input Method For IBus.
           IBus is an Intelligent Input Bus. It is a new input framework for Linux OS. It  provides full featured and user friendly input method user interface. It also may help developers to develop input method easily.
           IBus-Boshiamyis a IBus based IM Engine for Traditional Chinese

6. changelog 內容如下。
           ibus-boshiamy (1.0.0) unstable; urgency=low

               * Initial Release.

           -- elvis <hero.elvis@gmail.com>  Sat, 04 Aug 2012 07:29:25 +0800

7.  postinst 內容如下。
           #!/bin/sh
           # postinst script for ibus-boshiamy
           #
           # see: dh_installdeb(1)

           set -e

           IBUSDAEMON=/usr/bin/ibus-daemon

           # summary of how this script can be called:
           #        * <postinst> `configure' <most-recently-configured-version>
           #        * <old-postinst> `abort-upgrade' <new version>
           #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
           #          <new-version>
           #        * <postinst> `abort-remove'
           #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
           #          <failed-install-package> <version> `removing'
           #          <conflicting-package> <version>
           # for details, see http://www.debian.org/doc/debian-policy/ or
           # the debian-policy package


           case "$1" in
               configure)
               $IBUSDAEMON -r -d
               ;;

               abort-upgrade|abort-remove|abort-deconfigure)
               ;;

               *)
                   echo "postinst called with unknown argument \`$1'" >&2
                   exit 1
               ;;
           esac

           # dh_installdeb will replace this with shell code automatically
           # generated by other debhelper scripts.

           #DEBHELPER#

           exit 0

8. postrm 內容如下。
           #!/bin/sh
           # postrm script for ibus-boshiamy
           #
           # see: dh_installdeb(1)

           set -e

           IBUSDAEMON=/usr/bin/ibus-daemon

           # summary of how this script can be called:
           #        * <postrm> `remove'
           #        * <postrm> `purge'
           #        * <old-postrm> `upgrade' <new-version>
           #        * <new-postrm> `failed-upgrade' <old-version>
           #        * <new-postrm> `abort-install'
           #        * <new-postrm> `abort-install' <old-version>
           #        * <new-postrm> `abort-upgrade' <old-version>
           #        * <disappearer's-postrm> `disappear' <overwriter>
           #          <overwriter-version>
           # for details, see http://www.debian.org/doc/debian-policy/ or
           # the debian-policy package


           case "$1" in
               purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
               $IBUSDAEMON -r -d
               ;;

               *)
                   echo "postrm called with unknown argument \`$1'" >&2
                   exit 1
               ;;
           esac

           # dh_installdeb will replace this with shell code automatically
           # generated by other debhelper scripts.

           #DEBHELPER#

           exit 0

9. 在 ~/ibus-boshiamy-1.0.0 執行 dpkg-buildpackage -rfakeroot 。

10. 建立 ~/boshiamy 資料夾並複製 ~/ibus-boshiamy-1.0.0/debian/temp/ 資料夾下的所有東西至 ~/boshiamy/ 底下。

11.  建立 ~/bushiamy/usr/share/ibus-table/tables 以及 ~/bushiamy/usr/share/ibus-table/icons 將行易的嘸蝦米 IBus 版底下的所有 .png 檔 複製至  ~/bushiamy/usr/share/ibus-table/icons/ 並且將行易的嘸蝦米 IBus 版底下的所有 .db 檔 複製至  ~/bushiamy/usr/share/ibus-table/tables/。

12. 在 ~/ 底下執行  dpkg -b boshiamy ibus-boshiamy_1.0.0_amd64.deb,boshiamy ibus-boshiamy_1.0.0_amd64.deb 即是所需要的安裝檔。