2014-10-11

Ubuntu 14.04 導入記 (levono G500)

lx6導入記: levono G500 (Mr:2GB, HD:300GB)

2014/09/29:
 Novoボタン→[BIOS Setup]→[ブートモード:Legacy Support]
 Ubuntu 14.04 Trusty Tahr 日本語版Rimix (2019/04まで有効)
2014/09/30: gnome-screensaverを削除 → XScreenSaverをインストール
2014/10/05: Firefox設定、Google設定
 numlockxをインストール → 起動時Onにならない
2014/10/06: ブックマークをインポート
2014/10/07: 漢字辞書のインポート
2014/10/09: インストール
 gThumb
 GIMP
 ImageMagick(display)
 Ruby (erb, gem, irb, rdoc, ri, ruby, testrb)
 有線LAN(固定IP): 設定後電源Off→Onで有効になった
2014/10/10: Thunderbird 設定、アドレス帳のインポート
2014/10/11: プリンタ Canon Pixus MG-7130(LAN接続)
 1.MG-7130のIPアドレスを固定に変更(社内LANに合わせる)→これがキモ
  MG-7130の[LAN設定情報]を印刷
 2.driver Install
  Download(http://cweb.canon.jp/drv-upd/ij-mfp/linux-pd-mg7130-400.html)
  [ホーム]で解凍
  $ cd cnijfilter-mg7100series-4.00-1-deb/packages
  (共通パッケージ)   $ sudo dpkg -iG cnijfilter-common_4.00-1_amd64.deb
  (機種別パッケージ) $ sudo dpkg -iG cnijfilter-mg7100series_4.00-1_amd64.deb
  [システム設定][プリンター][追加][ネットワークプリンタ]
  できたプリンタのプロパティの[製造元とモデル: Canon MG7100 series Ver.4.00]に変更
  3.ScanerDriver Install
  Download(http://cweb.canon.jp/drv-upd/ij-mfp/linux-sd-mg7130-220.html)
  展開して開き、中のpackagesを開く
  scangearmp-common_2.20-1_amd64.debを開くとソフトウェアセンター→インストール
  scangearmp-mg7100series_2.20-1_amd64.debも同様にインストール
  GIMP [ファイル][画像の生成][ScanGear MG...]

2013-10-22

DESTROY-廃棄の前にディスクのデータを抹消

DSTROY 3.21を Vectorでダウンロード
http://www.vector.co.jp/download/file/dos/util/fh612206.html

解凍→中の DESTY321.isoをCDに焼く→CD起動して実行

参考にしたのは「これだからお姉ちゃんは~!」
http://blog.livedoor.jp/mahe_style/archives/4589307.html

2012-03-18

FireFoxをJavaScripで閉じるリンク

Firefoxの設定を変えるだけです。
Firefox -> about:config -> closeで検索
 -> dom.allow_scripts_to_close_windowsをtrueに
リンクは <a href="javascript:window.close()">終了</a>

2012-01-29

2012-01-26

テーブルで<td>が広がらないようにする

CSSでなんとかしようとやってみたが、どうにもならない。
結論として、erbで処理することにした。
文字列を先に適当な大きさにカットしておく。

<td><%= kyak.bik.split(//u)[0, 8] %><td>

2011-12-12

Rails3-環境構築

6号機 TOSHIBA dinabook Satellite J60 146C/5, 1.3GB, HDD80GB
Ubuntu 11.10 Oneiric Ocelot

1.Synapticでインストール
   ruby(ruby1.8.7.352) ruby1.8-dev
   sqlite3, libsqlite3-dev,libsqlite3-ruby
   build-essential, curl, git-core, libssl-dev

2.RubyGems 1.8.12: ソースからインストール
   http://rubygems.org/pages/download (.tgz) → ~/Downloads展開: rubygems-1.8.12/
   $ cd Downloads/rubygems-1.8.12/
   $ sudo ruby setup.rb; gem1.8 -v (1.8.12)
   $ cd /usr/bin; sudo ln -sf gem1.8 gem; gem -v (1.8.10)

3.Node.js のインストール(ソースから)
   最新のバージョン番号を調べる: http://nodejs.org/dist/
   $ cd ~/Downloads
   $ wget http://nodejs.org/dist/node-v0.6.4.tar.gz
   $ tar xzf node-v0.6.4.tar.gz
   $ cd node-v0.6.4
   $ ./configure
   $ make
   $ sudo make install; node -v

4.Rails インストール
   $ gedit ~/.gemrc
     gem: --no-ri --no-rdoc
   $ sudo gem install rails; rails -v (Rails 3.1.3)
   $ sudo gem install sqlite3

5.動作確認
   $ cd ~/rails/; rails new foo --skip-bundle
   $ cd foo/; bundle install
   $ rails g scaffold user name:string email:string
   $ rake db:migrate
   $ rails s
   http://localhost:3000/users

2011-06-25

Canonのスキャナ [CanoScan LiDE 200] が使えるようになった。
OS: Ubuntu 10.04

以下すべて端末での操作。
  1. $ apt-get install libusb-dev build-essential libsane-dev
  2. $ apt-get install git-core
  3. $ git clone git://git.debian.org/sane/sane-backends.git
  4. $ cd sane-backends/
    $ make
    $ sudo make install
  5. $ sudo gedit /lib/udev/rules.d/40-libsane.rules
    一番下に次の2行を追加して保存。
    # Canon CanoScan Lide 200
    ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1905", ENV{libsane_matched}="yes"
  6. $ sudo gedit /etc/sane.d/genesys.conf
    一番下に次の2行を追加して保存。
    # Canon LiDE 200
    usb 0x04a9 0x1905
これで、GIMP、Simple Scan、XSane のどれでもスキャン出来るようになりました。

参考にしたサイトです。
http://kutunn.blogspot.com/2011/04/x-sane.html
http://ubuntuforums.org/showpost.php?p=10080046&postcount=20

2010-11-09

Rails3でプロジェクト作成

Ubuntu 10.04, Rails 3.0.1

1.作業フォルダの作成: Rails
  $ cd Rails

2.プロジェクトの作成: gyou
  $ rails new gyou
  $ cd gyou/

3.scaffoldジェネレータの実行
  $rails g scaffold kyak id:integer nam:string yom:string yub:string juu:string ttm:string tel:string kei:string fax:string eml:string chz:string trk:date bun:string poi:integer bik:string
 
4.テーブル作成
  $ rake db:migrate

5.protect_from_forgery
    app/controllers/application_controller.rbを編集
      protect_from_forgery :only => "index"
 
6.テーブル確認
  $ rails s
   ブラウザで確認 http://localhost:3000/kyaks

2010-10-31

Railsのコマンドが変わった

Rials 3.0.1 になって変わったようだ。

新規プロジェクト: $ rails new プロジェクト名
WEBサーバ起動 : $ rails s(erver)

Railsアップデート

 一部エラーが出てるようだが意味不明、railsは3.0.1になってる。

$ sudo gem update rails
[sudo] password for masou:
Updating installed gems
Updating rails
Successfully installed activesupport-3.0.1
Successfully installed builder-2.1.2
... 略 ...
Successfully installed rails-3.0.1
Gems updated: activesupport, builder, i18n, activemodel, rack, rack-test, rack-mount, tzinfo, abstract, erubis, actionpack, arel, activerecord, activeresource, mime-types, polyglot, treetop, mail, actionmailer, thor, railties, bundler, rails
Installing ri documentation for activesupport-3.0.1...
Installing ri documentation for builder-2.1.2...
ERROR:  While generating documentation for builder-2.1.2
... MESSAGE:   Unhandled special: Special: type=17, text=""
... RDOC args: --ri --op /usr/lib/ruby/gems/1.8/doc/builder-2.1.2/ri --title Builder -- Easy XML Building --main README --line-numbers --quiet lib CHANGES Rakefile README doc/releases/builder-1.2.4.rdoc doc/releases/builder-2.0.0.rdoc doc/releases/builder-2.1.1.rdoc --title builder-2.1.2 Documentation
(continuing with the rest of the installation)
Installing ri documentation for i18n-0.4.2...
Installing ri documentation for activemodel-3.0.1...
... 略 ...
Installing ri documentation for bundler-1.0.3...
Installing ri documentation for rails-3.0.1...
File not found: lib