2011年10月26日水曜日

Lubuntu 11.10 起動時 NumLock をONにする

Ubuntu manuals のlxdm - LXDE Display Manager (Login screen)から
http://manpages.ubuntu.com/manpages/oneiric/en/man1/lxdm.1.html

CONFIGURATION FILE

       The configuration file is /etc/lxdm/default.conf, which is a symlink to
       the real configuration file. (/etc/lxdm/lxdm.conf  for  standard  lxdm,
       /etc/xdg/lubuntu/lxdm/lxdm.conf for Lubuntu).
numlock
       Enable numlock support. Disable by default, you need to  uncomment  the line. 
とあったので

/etc/xdg/lubuntu/lxdm/lxdm.confの13行目の
## uncomment and set to set numlock on your keyboard
# numlock=0 を
numlock=1 に変更します。
次回の起動でNumlockのLEDが点灯してONとなりました。

2011年10月22日土曜日

Lubuntu 11.10 フォントの削除

福島の[福]、送信の[送]など見慣れない漢字になっています。

Synaptic パッケージマネージャにて
ttf-unfonts-core (説明:Un series Korean TrueType fonts)を削除します。

Watir.com Example












2011年10月21日金曜日

Ruby + watir-webdriver + chromedriver.exeでgoogle chromeを操作する

ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

C:\Documents and Settings\takashi>gem install watir-webdriver
Fetching: json_pure-1.6.1.gem (100%)
Fetching: rubyzip-0.9.4.gem (100%)
Fetching: ffi-1.0.9-x86-mingw32.gem (100%)
Fetching: childprocess-0.2.2.gem (100%)
Fetching: selenium-webdriver-2.9.0.gem (100%)
Fetching: watir-webdriver-0.3.5.gem (100%)
Successfully installed json_pure-1.6.1
Successfully installed rubyzip-0.9.4
Successfully installed ffi-1.0.9-x86-mingw32
Successfully installed childprocess-0.2.2
Successfully installed selenium-webdriver-2.9.0
Successfully installed watir-webdriver-0.3.5
6 gems installed
Installing ri documentation for json_pure-1.6.1...
Installing ri documentation for rubyzip-0.9.4...
Installing ri documentation for ffi-1.0.9-x86-mingw32...
Installing ri documentation for childprocess-0.2.2...
Installing ri documentation for selenium-webdriver-2.9.0...
Installing ri documentation for watir-webdriver-0.3.5...
Installing RDoc documentation for json_pure-1.6.1...
Installing RDoc documentation for rubyzip-0.9.4...
Installing RDoc documentation for ffi-1.0.9-x86-mingw32...
Installing RDoc documentation for childprocess-0.2.2...
Installing RDoc documentation for selenium-webdriver-2.9.0...
Installing RDoc documentation for watir-webdriver-0.3.5...
   http://code.google.com/p/chromium/downloads/list から
   chromedriver_win_16.0.902.0.zipをdownloadして展開する。
   chromedriver.exeをc:\ruby\ruby192\bin\の下に入れる。

ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

C:\Documents and Settings\takashi>irb
irb(main):001:0> require 'watir-webdriver'
=> true
irb(main):002:0> browser = Watir::Browser.new(:chrome)
Started ChromeDriver
port=1107
version=16.0.902.0
=> #
irb(main):003:0> browser.goto("http://google.com")
=> "http://www.google.co.jp/"
irb(main):004:0>

ruby1.8.7 ruby1.9.2 ironruby devkit 最新版入替メモ

Ruby 1.9.2-p180>uninstall ruby 1.9.2-p180 の実行
rubyinstaller-1.9.2-p290.exe の実行
Ruby 1.8.7-p334>uninstall ruby 1.8.7-p334 の実行
rubyinstaller-1.8.7-p352.exe の実行
IronRuby 1.1>Uninstall IronRuby
IronRuby.msi の実行
Ruby 1.9.2-p290>Start Command Prompt with Ruby

C:\Documents and Settings\takashi>pik list
112: IronRuby 1.1.2.0 on .NET 4.0.30319.1
187: ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]
* 192: ruby 1.9.2p180 (2011-02-18) [i386-mingw32]

C:\Documents and Settings\takashi>pik rm 192
Are you sure you'd like to remove '192: ruby 1.9.2p180 (2011-02-18) [i386-mingw32]'? |yes|
y
192: ruby 1.9.2p180 (2011-02-18) [i386-mingw32] removed.

C:\Documents and Settings\takashi>pik add c:\ruby\ruby192\bin
** Adding: 192: ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
Located at: C:\ruby\ruby192\bin

C:\Documents and Settings\takashi>pik rm 187
Are you sure you'd like to remove '187: ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]'? |yes|
y
187: ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32] removed.

C:\Documents and Settings\takashi>pik add c:\ruby\ruby187\bin
** Adding: 187: ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-mingw32]
Located at: C:\ruby\ruby187\bin

C:\Documents and Settings\takashi>pik rm 112
Are you sure you'd like to remove '112: IronRuby 1.1.2.0 on .NET 4.0.30319.1'? |yes|
y
112: IronRuby 1.1.2.0 on .NET 4.0.30319.1 removed.

C:\Documents and Settings\takashi>pik add "C:\Program Files\IronRuby 1.1\bin"
** Adding: 113: IronRuby 1.1.3.0 on .NET 4.0.30319.239
Located at: C:\Program Files\IronRuby 1.1\bin

C:\Documents and Settings\takashi>pik list
113: IronRuby 1.1.3.0 on .NET 4.0.30319.239
187: ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-mingw32]
* 192: ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

C:\Documents and Settings\takashi>cd c:\rubyapi

C:\rubyapi>type fib39.rb
class Integer
def fib
return self if self < 2
(self-2).fib + (self-1).fib
end
end

n = 39
start = Time.now
res = n.fib
puts "", res, (Time.now - start).to_s + " sec"

C:\rubyapi>pik bench fib39.rb
IronRuby 1.1.3.0 on .NET 4.0.30319.239

Rehearsal --------------------------------------------------------------
** benchmarking 'fib39.rb'
63245986
219.015625 sec
214.890625 3.640625 218.531250 (219.078125)
--------------------------------------------------- total: 218.531250sec

user system total real
** benchmarking 'fib39.rb'
63245986
230.96875 sec
223.687500 4.234375 227.921875 (230.984375)

ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-mingw32]

Rehearsal --------------------------------------------------------------
** benchmarking 'fib39.rb'
63245986
303.078125 sec
302.157000 0.000000 302.157000 (303.093750)
--------------------------------------------------- total: 302.157000sec

user system total real
** benchmarking 'fib39.rb'
63245986
301.71875 sec
301.031000 0.016000 301.047000 (301.750000)

ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

Rehearsal --------------------------------------------------------------
** benchmarking 'fib39.rb'
63245986
91.28125 sec
91.047000 0.000000 91.047000 ( 91.296875)
---------------------------------------------------- total: 91.047000sec

user system total real
** benchmarking 'fib39.rb'
63245986
91.234375 sec
90.906000 0.015000 90.921000 ( 91.250000)


C:\rubyapi>

c:\ruby\DevKit\ の下をすべて削除する
DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe を実行して
c:\ruby\DevKit\ の下に展開する

C:\rubyapi>cd c:\ruby\devkit

C:\ruby\DevKit>ruby dk.rb init
[INFO] found RubyInstaller v1.8.7 at C:/ruby/Ruby187
[INFO] found RubyInstaller v1.9.2 at C:/ruby/Ruby192

Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.

C:\ruby\DevKit>ruby dk.rb review
Based upon the settings in the 'config.yml' file generated
from running 'ruby dk.rb init' and any of your customizations,
DevKit functionality will be injected into the following Rubies
when you run 'ruby dk.rb install'.

C:/ruby/Ruby187
C:/ruby/Ruby192

C:\ruby\DevKit>ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/ruby/Ruby187'
[WARN] Skipping existing DevKit helper library for 'C:/ruby/Ruby187'
[INFO] Updating convenience notice gem override for 'C:/ruby/Ruby192'
[WARN] Skipping existing DevKit helper library for 'C:/ruby/Ruby192'

C:\ruby\DevKit>gem install rdiscount --platform=ruby
Fetching: rdiscount-1.6.8.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed rdiscount-1.6.8
1 gem installed
Installing ri documentation for rdiscount-1.6.8...
Installing RDoc documentation for rdiscount-1.6.8...

C:\ruby\DevKit>ruby -rubygems -e "require 'rdiscount'; puts RDiscount.new('**Hello RubyInstaller**').to_html"

Hello RubyInstaller


C:\ruby\DevKit>

2011年10月15日土曜日

UbuntuStudio 11.10 インストール









Ubuntu-Studio 11.10 (Oneiric Ocelot)からubuntustudio-11.10-alternate-i386.iso
をダウンロードしてインストールした。
ディスクトップがXFCEになっていた。

旧型PC 3 Lubuntu 11.10 インストール

CPU:Intel(R) Celeron(R) CPU 2.93G
MOTHER:MSI 865G Neo2
MEMORY:1GB PC3200-512MBX2
VIDEO:R9200LE
HDD:SEAGATE ST3120026A (120GB)a

lubuntu-11.10-desktop-i386.iso をダウンロードしてインストールした。

日本語を入力できるようにする
 「言語サポート」-「言語」キーボード入力に使うIMシステム:空白なので
 synapticパッケージマネージャで[ibus]インストールします。
 再起動
 synapticパッケージマネージャで[ibus-mozc]インストールします。
 再起動
 Mozc 手書き文字認識など増えています
Lubuntu 11.10 約0分48秒(bios起動時間10秒含む) shoutdown約15秒

2011年10月4日火曜日

Microsoft Media Server 動画再生

google chromsでMicrosoft Media Serverの動画再生

https://forums.ubuntulinux.jp/viewtopic.php?id=9788
  • Microsoft Media Serverに代わるプラグインを参考に

sudo apt-get install ubuntu-restricted-extras

http://www.jjazz.net/
が再生できました