2012年10月19日金曜日

Operaで日本語入力(iBusから)

● FreeBSD native opera(www/opera)での方法
○ 環境変数LANGにja_JP.UTF-8を設定する。
○他にiBUS用の環境変数の設定
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
○ibusの起動
ibus-daemon -dx
○operaの起動
/usr/local/bin/opera

● Linux版opera(www/linux-opera)をFreeBSD上で使う場合

○前準備(一度実施すればOK、現状のpackages/portsで入れるlinux環境のlocaleにja_JP.UTF-8がないため作成)
/usr/compat/linux/usr/bin/localedef -f UTF-8 -i ja_JP ja_JP.UTF-8

○あとは、FreeBSD native版と同じ環境変数とibusの設定

○ operaの起動
/usr/local/bin/linux-opera

●注意
上記は、2012/10/19頃のFreeBSD-10-current/i386とports環境で確認しました。
他のFreeBSDの環境でNGな場合には情報をいただければ時間があればフォローします。
Linux版operaは、www/linux-opera/Makefileを手動で変更して opera 12.02を用いています。

● Linux環境の場合
○ localedef実行部分を以下のようにすれば幸せになるかもしれません。
/usr/bin/localedef -f UTF-8 -i ja_JP ja_JP.UTF-8

2012年10月16日火曜日

x11/mltermが環境変数LANGをja_JP.SJISと設定しないと一部の文字が■になる

なぜかx11/mltermが環境変数LANGをja_JP.SJISと設定しないと
あるキャラクターコードを表示した以降漢字がすべて■になります。

■現在の状態
 詳細調査できておらず、とりあえずmltermは環境変数ja_JP.SJISを設定して
使っています。
 原因情報をお持ちの方は連絡いただけると幸いです。

環境変数LANGを(少なくともja_JP.SJISと)設定するとsegmentation faultで落ちる

FreeBSD-10-current(2012/10頃)では、原因は調査しきれていませんが、以下のコマンドが実行中にsegmentation faultで落ちます。

■原因設定
環境変数LANGに少なくともja_JP.SJISと設定する

■問題が発生するコマンド
- textproc/ibusのibus-setup(の内部で実行されているpython)
- x11-wm/fvwm2
- xtermで使われているluit

■エラー内容
 exited on signal 11 (core dumped)

■解決策
環境変数LANGの設定を削除する

unsetenv LANG
ないしは
setenv LANGを削除かコメントアウト

how to use FTDI chip TTL-232R-3V3, USB to TTL Serial Cable(3.3V)

I can use FTDI chip TTL-232R-3V3, USB to TTL Serial Cable(3.3V) with FreeBSD(FreeBSD-10-current)

1. load uftdi driver(SEE man uftdi)
  add below line into /boot/loader.conf
 uftdi_load="YES"

2. use cu command
 cu -l /dev/ttyU0 -s 115200

2012年8月10日金曜日

Serial Console for Raspberry PI

I created Serial Console for Raspberry PI without soldering.

1.  USB serial cables and jumper wire.
  1.  FTDI chip TTL-232R-3V3, USB to TTL Serial Cable(3.3V)-1.8m (for example, http://akizukidenshi.com/catalog/g/gM-05840/)
  2.  bread board jumper wire (female/male cables)(for example, http://akizukidenshi.com/catalog/g/gP-03471/)
  3. Raspberry PI

2. pin assigment
   If you use another USB serial cable, please check your data sheet of your USB serial cable.






3. cabling sample




I use this Serial cable for FreeBSD/RaspberryPI project.

2012年8月6日月曜日

FreeBSD on Raspberry PI

- Create image file
  - related link http://kernelnomicon.org/ and latest build information(2012/Aug/6)
http://kernelnomicon.org/?p=164

  - I changed build script to
[NEW]
tar -x -v -z –uname root -C /mnt -f freebsd-uboot-sd.tar.gz

  - you need to run build script on root account.

- how to setup serial console(sorry in Japanese):
  http://chicklab.blog84.fc2.com/blog-entry-46.html
and  The layout of the Raspberry Pi GPIOs
 http://elinux.org/RPi_Low-level_peripherals

- TTL level converter
  USB <--> 3.3v RS-232C(in Japanese)
  TTL-232R-3V3 FTDI USB
  http://akizukidenshi.com/catalog/g/gM-05840/
  But pin assign is different from Raspberry PI. you need excange lines.
  I use bread board cable.


2012年5月12日土曜日

change display coding system to UTF-8 on FreeBSD

Now I use Prompt(ssh client for iPhone/iPad). However this ssh client software only support UTF-8
(not support SJIS and EUC).

I had to change terminal coding system to UTF-8.

I changed below configuration

1. .screenrc for GNU screen
encoding utf8
defencoding utf8
kanji utf8 utf8
defkanji utf8
terminfo xterm KJ=UTF-8
terminfo screen KJ=UTF-8

2. I execute screen with -U option

% screen -U

3. .cshrc for environment variable

now I removed LANG(noset LANG environment variable

4. use lv from jless(Because jless does not support UTF-8, I think)

alias less lv -Ou8


mlterm on FreeBSD 10-current(2012/5/9)

I upgraded FreeBSD 10-current(2012/5/9).
After upgrade, I could not execute mlterm(ports/x11/mlterm) on it.

Does some one have same problem?

error message is :(.mlterm/msg.log )
 Unable to start - open_screen_intern() failed.

June/4
I updated ports tree. I could solved this issue with latest mlterm(Updated to 3.1.2)
Thank you > nobutaka-san

2012年5月1日火曜日

プレスポ(プレシジョンスポーツ)のプロスケット交換

プロスケットを交換しました。
交換前の構成(標準品)
CS-HG30-8 11T-30T 368g

交換後
CS-HG50-9 12T-23T 215g

最初はチェーンを変更せずにCS-HG50-8 12-23 278gでも良いと考えていましたが、お店に行って持って比べたら軽さでCS-HG50-9を選んでしまいました!!

チェーン
Dura-Ace 9速用チェーンCN7701(9S 114)

設置方法情報
以下のページを参考にして交換しました。
9速プロスケット関連
CS-HG50-9R 12-23の装着例(FP2とプレスポ等のブログだお)
CS-HG50-9R 12-25の装着例(カワセミ自転車記[クロスバイク プレシジョンスポーツ編])
リアディレーラ調製例(FP2とプレスポ等のブログだお)
リアディレーラ調製例(こちらの方が9速プロスケット時のより詳しい調製例/カワセミ自転車記[クロスバイク プレシジョンスポーツ編])

8速プロスケット交換関連
CS-HG50-8s(13-23t)への交換(いつまでたっても未完成~プレスポゆるポタ日記~)
CS-HG50-8s(13T-23T)への交換(●つれづれ雑記●)


交換に使った機材
Dura ace グリス(お店で特に他のグリスが売っていなかったのでDura ace)
PARK TOOL FR-5G クロスケット外し用(SHIMANO製が売り切れで同等品)
SHIMANO TL-CN27 チェーンカッター (もっと安い物の予定が売り切れでSHIMANO純正)
YC-501A プロスケット外し(チェーンがついているもの、同種類ならば可)

買ったけど使っていない機材
MISSING LINK

自宅の機材
モンキースパナー(プロスケット外し時に利用)

今後の改造予定:
リアディレーラ(RD)をTIAGRA RD4600へ(装着例 http://kawa.naturum.ne.jp/e748215.html)、そしてタイヤ交換時により軽いホイールに交換しようと考えています。

2012年4月15日日曜日

ahci driver for FreeBSD

I bought HP ML110 G7 for my home server(FreeBSD-8.2-RELEASE). However I had two problems.
And finally I solved these problems with 8.3-RELEASE.

[PROBLEM1]
- FreeBSD-8.2-RELEASE and ahci driver could not probe Seagate ST3320620NS Barracuda ES SATA 3.0Gb/s 320-GB Hard Drive with ahci driver.

and finally I can use with FreeBSD-8.3-RELEASE.
ada1 at ahcich1 bus 0 scbus1 target 0 lun 0
ada1: ATA-7 SATA 2.x device
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 305245MB (625142448 512 byte sectors: 16H 63S/T 16383C)

[PROBLEM2]
- FreeBSD-8.2-RELEASE and ahci driver could probe but some time hang-up with SAMSUNG HD154UI 1AG01113.

and finally I can use with FreeBSD-8.3-RELEASE.
ada2 at ahcich3 bus 0 scbus3 target 0 lun 0
ada2: ATA-7 SATA 2.x device
ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada2: Command Queueing enabled
ada2: 1430799MB (2930277168 512 byte sectors: 16H 63S/T 16383C)

ahci0: port 0x1400-0x1407,0x1408-0x140b,0x1410-0x1417,0x1418-0x141b,0x1420-0x143f mem 0xfaca0000-0xfaca07ff irq 17 at device 31.2 on pci0
ahci0: [ITHREAD]
ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier supported
ahcich0: at channel 0 on ahci0
ahcich0: [ITHREAD]

error message
ahcich3: is 00000000 cs 00000008 ss 00000000 rs 00000008 tfd c0 serr 00000000
ahcich3: Timeout on slot 3
ahcich3: is 00000000 cs 00000fe0 ss 00000ff8 rs 00000ff8 tfd c0 serr 00000000
ahcich3: Timeout on slot 20
ahcich3: is 00000000 cs 3fe00000 ss 3ff00000 rs 3ff00000 tfd c0 serr 00000000
ahcich3: Timeout on slot 6
ahcich3: is 00000000 cs 0000ff00 ss 0000ffc0 rs 0000ffc0 tfd c0 serr 00000000
ahcich3: Timeout on slot 24
ahcich3: is 00000000 cs fc000003 ss ff000003 rs ff000003 tfd c0 serr 00000000

2012年3月22日木曜日

remote desktop client from FreeBSD to Windows 8

Finally I can connect remote desktop from FreeBSD to Windows8.

- Windows 8 consumer preview
- FreeRDP (latest version from git repository)
git clone git://github.com/FreeRDP/FreeRDP.git
and compile infomation
https://github.com/FreeRDP/FreeRDP/wiki/Compilation
cmake option is cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_SSE2=OFF -DWITH_ALSA=OFF
and make
- connect with --no-nla option
./client/X11/xfreerdp --no-nla [IP address for your windows 8 machine]

2012年1月3日火曜日

[icecast/vlc]vlc setting for BB shout

Below configuration is for BB shout(http://bb-shout.tristate.ne.jp/)

rtmpdump {rtmpdump config} | ffmpeg -y -i - -vn -acodec copy -f adts /dev/stdout | \
vlc --intf=dummy /dev/stdin vlc://quit --sout '#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=48000}:duplicate{dst=std{access=shout,mux=raw,dst=source:{password}@{ice-cast server hostname}:{port number}/test.mp3}' --sout-shout-mp3 --sout-shout-name="test" --sout-shout-description="test" --sout-transcode-ab=128 --loop -V dummy --sout-shout-bitrate=128

Especially, We need bitrate information(--sout-shout-bitrate=128).
If we did not add bit rate information, BB shout could not connect ice cast server with ICY:-98 error in LCD and web interface.

And if samplerate of original stream is 48000Hz(48KHz), we also transcode 48KHz(samplerate=48000). I think this is limitation for vlc.

2012年1月2日月曜日

[FreeBSD] disable password authentication

you need below configuration on /etc/ssh/sshd_config

especially, you need comment 'UsePAM no'

@@ -62,8 +62,8 @@
#IgnoreRhosts yes

# Change to yes to enable built-in password authentication.
-#PasswordAuthentication no
-#PermitEmptyPasswords no
+PasswordAuthentication no
+PermitEmptyPasswords no

# Change to no to disable PAM authentication
#ChallengeResponseAuthentication yes
@@ -87,7 +87,7 @@
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
-#UsePAM yes
+UsePAM no

#AllowAgentForwarding yes
#AllowTcpForwarding yes

[FreeBSD] setting for xpdf kanji pdf file

1. defaultの/usr/local/share/xpdf/japanese/dot.xpdfrcのcMapDirにはaj16/CMapが足りないので
(2012/1/1時点現在)以下のように変更する

cMapDir Adobe-Japan1 /usr/local/share/fonts/adobe-cmaps/aj16/CMap
toUnicodeDir /usr/local/share/fonts/adobe-cmaps/aj16/CMap

2.それでも以下のようなフォントが足りない旨のエラーが出る場合には

Error: Couldn't find a font for 'Ryumin-Light-90ms-RKSJ-H'
Error: Couldn't find a font for 'Ryumin-Light-90ms-RKSJ-H'

dot.xpdfrcに以下の行を追加(漢字コードはSJISで)(まだ暫定なので、明朝系フォントもゴシックにマップしています)


displayNamedCIDFontTT MSGothic "/usr/local/share/fonts/
std.ja_JP/GothicBBB-Medium"
displayNamedCIDFontTT MSPGothic "/usr/local/share/fonts/
std.ja_JP/GothicBBB-Medium"
displayNamedCIDFontTT HGGothicEPRO "/usr/local/share/fonts/
std.ja_JP/GothicBBB-Medium"
displayNamedCIDFontTT MSゴシック "/usr/local/share/fonts/std.ja_JP/Go
thicBBB-Medium"
displayNamedCIDFontTT MSゴシック,Bold "/usr/local/share/fonts/std.ja_JP/Go
thicBBB-Medium"
displayNamedCIDFontTT MSPゴシック "/usr/local/share/fonts/std.ja_JP/Go
thicBBB-Medium"
displayNamedCIDFontTT MSPゴシック,Bold "/usr/local/share/fonts/std.ja_JP/Go
thicBBB-Medium"
displayNamedCIDFontTT MS明朝 "/usr/local/share/fonts/std.ja_JP/Go
thicBBB-Medium"
displayNamedCIDFontTT MS明朝,Bold "/usr/local/share/fonts/std.ja_JP/Go
thicBBB-Medium"
displayNamedCIDFontTT MSP明朝 "/usr/local/share/fonts/std.ja_JP/Go
thicBBB-Medium"
displayNamedCIDFontTT MSP明朝,Bold "/usr/local/share/fonts/std.ja_JP/Go
thicBBB-Medium"
displayNamedCIDFontTT @MSゴシック "/usr/local/share/fonts/std.ja_JP/G
othicBBB-Medium"
displayNamedCIDFontTT @MSゴシック,Bold "/usr/local/share/fonts/std.ja_JP/G
othicBBB-Medium"
displayNamedCIDFontTT @MSPゴシック "/usr/local/share/fonts/std.ja_JP/G
othicBBB-Medium"
displayNamedCIDFontTT @MSPゴシック,Bold "/usr/local/share/fonts/std.ja_JP/G
othicBBB-Medium"
displayNamedCIDFontTT @MS明朝 "/usr/local/share/fonts/std.ja_JP/G
othicBBB-Medium"
displayNamedCIDFontTT @MS明朝,Bold "/usr/local/share/fonts/std.ja_JP/G
othicBBB-Medium"
displayNamedCIDFontTT @MSP明朝 "/usr/local/share/fonts/std.ja_JP/G
othicBBB-Medium"
displayNamedCIDFontTT @MSP明朝,Bold "/usr/local/share/fonts/std.ja_JP/G
othicBBB-Medium"
displayNamedCIDFontTT MS-PMincho "/usr/local/share/fonts/
std.ja_JP/Ryumin-Light"
displayNamedCIDFontTT Ryumin-Light-90ms-RKSJ-H "/usr/local/shar
e/fonts/std.ja_JP/GothicBBB-Medium"
displayNamedCIDFontTT GothicBBB-Medium-90ms-RKSJ-H "/usr/lo
cal/share/fonts/std.ja_JP/GothicBBB-Medium"