2014年3月31日月曜日

FreeBSDルーター作成時に参考にさせていただくメモ

 まだしばらく先の話ですが。
http://www.ibm.com/developerworks/jp/linux/library/l-wifiencrypthostapd/index.html
http://sakananohone.servehttp.com/it/it00032/it00032.html



FreeBSDのUSBブートに試用していたフラッシュメモリを壊した

FreeBSDのインストール先としてさんざん酷使した(当時はそんなつもりは一切なかったが)ためか、どうも壊したようです。

・FreeBSD上の他愛ない操作中にフリーズが何度か
・fsckであたかも問題は解消したかも? と見えるもフリーズ再現
・fsckの実行途中でさえ止まるように
・Windowsからフォーマットは可能であったものの
 実際にデータを書き込んでみると途中から"書込み禁止"に
・Windowsのディスクチェックツール程度ではどうにもならず

おそらく完全に壊した(事実上使えない)ものと、"想像" し、この媒体は使用中止。


あるいは、ごくごく一般的な使い方: PCの外部記憶装置として文書や画像の一時保存、他者とのやりとり程度の使い方をしていればそうそう壊すこともなかったことでしょうが。このケースでは、使用者(私)が無知で浅はかであったがために、機器の仕様を無考慮で見当違いな使い方によって破壊に至った、かもしれません。


もとより、バ家電量販店のワゴンで処分品な低価格品。こんな売られ方の商品が、高品質である道理はゼロ以下マイナスです。こんな売られ方の商品が粗悪品である道理はいくらでもありますが。サウジアラビアにこんな諺があります(リーガルハイ出演時の岡田将生ふう)

 安物買いの銭失い

違ったこれは日本だった。

Throwing good money after bad.
Bon marché tire agent de bourse.


尚、NAND型フラッシュメモリの技術的/物理的特性についてはこちらなど。

京都ソフトウェアリサーチさんより
http://www.kyoto-sr.co.jp/products/fugue/techinfo/if-intro.html





lilypond導入直後の重要なお知らせ

=== IMPORTANT NOTICE ===

- You may want to run texconfig(1) to configure teTeX for your
  local environment. You will find teTeX's local documentation
  in /usr/local/share/texmf-dist/doc/.

- Note that if you have environment variables for teTeX in a wrong
  way (such as TEXINPUTS, TEXMF, TEXMFCNF, and so on),
  they may prevent teTeX from working.


この後、LilypondTool について find /usr/ports をかけて、検索が終了した後ほどなくフリーズ、完全停止。止む無く電源断。USB Flashメモリ環境に問題があるのか、あるいは他か。マッタク見当もつかない。







FreeBSD 8.4-Rellease上のWebブラウザでAdobe Flashの組み込み

Youtube の視聴は Adobe Flash を使用せずに Firefox のアドオン

 Video WithOut Flash 1.4

によって実現できていた。が、辞書サイトでの発音確認/単語読み上げ機能がFlash依存だということが判明。どうにか組み込まなくてはならなくなった。

参考にさせていただいたのはこちら様。
http://koseisfreebsd.blogspot.jp/2012/06/flash.html
http://seesaawiki.jp/dreamcraft/d/firefox%A4%C7%A5%D5%A5%E9%A5%C3%A5%B7%A5%E5%A4%F2%B8%AB%A4%E8%A4%A6


導入を試みた結果、どういうわけか!? ウチではシンボリックリンクが無用、というかwrapperの在り処が根本的に先例の方々と異なる。ただ、これを考えてもどうにもならないので放置。


FreeBSDをごく凡庸なPCデスクトップとして使用するにあたっての課題

ipa日本語フォント
FirefoxThunderbird
Libreoffice
CUPS+gutenprint
Adobe Falsh (Linuxエミュレーション上で)
Wireshark

ja-scim-anthy
(機能的には真っ先に必要だが、文字化け修復できない事件が発生し、この対策のためインストールは極力後回しに。)


で、音楽編集系以外は事足りるようになった(個々の機能の細部はまた別)。とりあえず凡庸な家PCとしてなら十分(細かい拘りがあれば別として)使える。

が、どんなに充実しても音楽系だけはどうにもならないのが惜しい、というか、そもそもこんな目的で試用を始めた訳でもないのでお門違いではあるのだが。


とりあえず状況としてはこの通り、ということで。


次は話の腰を折るメモ。


bashの機能の概要について

法政大学情報科学部・情報科学研究科
http://rat.cis.k.hosei.ac.jp/article/linux/bash_intro.html


2014年3月29日土曜日

Subversion

WLANのドライバを得ようとして、カーネルのソースが存在しないことを思い出させられた。そういえばこのインストール時のDistributionは 6-users でカスタム無し。必要十分なだけ、最小限の手順を整理する方針のはずが、皮肉にもここで仇に。

sysinstallであるいはカーネル再構築に必要な部分だけ補完できないか? ソースだけなら問題ないだろう!?と思ったものの、実際に試してみるとNG。CTMやCVSupというツールの案内があったもののハンドブックによればかなり古いツールで非推奨、Subversionに手を出すことに。

https://www.freebsd.org/doc/ja/books/handbook/svn.html

この記述を鵜呑みにSubversionをportsからインストール...を始めたものの、ドハ重い。無知な自分が浅はかにバージョンとライブラリのチェックぐらいのシンプルなアプリケーション・・・などとと思いきやとんだ見当違い、CPU使用率も相応に。


はい、ここに至ってやっとというか、またしてもというか。私はまるで、詐欺犯罪に加担する稚拙で迂闊でボク悪くないバカ市民のように、たいへん浅はかであることを思い知らされた感が。


教訓 : FreeBSD公式Webサイトのハンドブックは何らかの手順を示しているかもしれない、が、閲覧者に不都合でないとは限らない。


しようがないので、公式ハンドブックでない、見ず知らずのマッタクの他人様を頼りに

svn checkout svn://svn.freebsd.org/base/release/8.4.0

と始めたものの、これまた所要時間がとんでもない。そもそも全てをチェックすることは無用であって、今ここで必要であるのは、

Building kernel module... "/usr/share/mk/bsd.kmod.mk", line 12: "can't find kernel source tree"

build failed. Exiting.

この対策、kernel部分のみ。では、どこにカーネルが? 感謝すべきはこちら様。

http://d.hatena.ne.jp/syohex/20110129/1296301046
http://hankakusai.basekernel.co.jp/cgi-bin/adiary/adiary.cgi/0508

これらを拝読して、ナニをどう行うべきかについて察しがつきました。でより具体的なコマンドについても参考になる実例が、


# svn checkout svn://svn.FreeBSD.org/base/releng/9.1 /usr/src

このように。これを私の条件下に合わせて変更すると、

# svn checkout svn://svn.FreeBSD.org/base/release/8.4.0/bin/ /usr/src/bin
# svn checkout svn://svn.FreeBSD.org/base/release/8.4.0/share/ /usr/src/share/


ところで、カーネル再構築にはたしか? sys以下も必要だったような・・・曖昧模糊でふざけた記憶が。sys以下は巨大膨大で、明らかにゴミなデータはディスクスペースとしても時間としても手間としても、わざわざ咥え込みたくはない。ではどうすれば!? 最小限と思われるところを、目隠しでブルートフォースです。このショボイ発想、いじめられた幼い児童の逆ギレと大差ないですね。



とりあえず
# svn checkout svn://svn.FreeBSD.org/base/release/8.4.0/sys/kern/ /usr/src/sys/kern/

これだけではNG。次に


# svn checkout svn://svn.FreeBSD.org/base/release/8.4.0/sys/boot/ /usr/src/sys/boot/
# svn checkout svn://svn.FreeBSD.org/base/release/8.4.0/sys/dev/ /usr/src/sys/dev/

を実行。ただし、boot以下の別CPUはごっそり削除。結果まだ足りない、toolsともうひとつ何かを加えてようやく、ドライバ生成ツールが完了。


で、いそいそとWLANドライバを組み込もうとして今度は完全フリーズ。ブラックアウトこそしないものの微動だにしない状態に。FreeBSDでもクラッシュはあるんだなぁとしみじみ。

というわけで、私がsys以下の何を加えたか忘れてしまったのも、このクラッシュによって書きかけのメモが失われたことと、突発の事態に直前のことなど吹っ飛んだからです。



やれやれ。



2014年3月28日金曜日

プリンタの設定

FreeBSDハンドブックを真に受けてlpdがどうこう...という段階から調べようとしたが、どうも時代はとうに大きく変わっているらしく。

2014年の実情に近いところとして参考にさせていただいのはこちら様。
http://koseisfreebsd.blogspot.jp/2012/07/cupscanon-ip-4200.html


CUPS
http://ja.wikipedia.org/wiki/Common_Unix_Printing_System

とりあえず
# /usr/ports/print/cupsで make install clean

プリンタとの通信にSSL/TLSのオプションがあることに驚く。なるほどIPPはまさしくTheインターネットだと。

CUPSの導入中、ghostscript 9-9.06-5のオプションで、明かに特定機種向けと思われるチェックは外し、EPSONの汎用と思しき部分及び、まるで見当もつかない部分のチェックは残してOK。私の浅はかな解釈では、私の用途では ghostscriptそのものをマッタク使わない ような気がするのだが、そこは無知ゆえの愚かな邪推。無知が発覚することそのものはどうということはないが、無知ゆえの非効率には我ながら落胆するし疲労も重なる。そしてまた、このportsインストールは、私がなんとなーく想像していたよりもはるかに時間を要するらしい。

で、案の定(何が?)

===> cups-base.1.5.4-1
You must select one and only are option to build pdftops.
*** Error Code 1
Stop in /usr/ports/print/cups-base
*** Error Code 1
Stop in /usr/ports/print/cups-base
*** Error Code 1

Stop in /usr/ports/print/cups.
#

ハイ、エラーで終了。なぜこんなことが発生するのか皆目見当がつかないどころか、邪推さえもできません。SSL/TLSのオプションを変更したことがそんなに悪いんか、CanonやNECやHPやごっそり削ったのが悪いんか、そうやオレが悪いんやクサレが状態です。


そこで、pkgで問答無用にinstall。これ自体はエラーを見せず終了、続いてpkgでgutenprintを組み込みいざローカルホストで設定…、あれ? 英語表記のまま? それはともかく Add Printer をクリックしても何も起こらないのは何故!? cups-base、cups-pdfをdeinstallだのpkg removeだの、論理性無視で試すも、状況変わらず。つまり何もわかっていない。で、

Arch Linux のWikiなWebコンテンツさんですが。
https://wiki.archlinux.org/index.php/CUPS_%28%E6%97%A5%E6%9C%AC%E8%AA%9E%29

 これははるか先の話ではあるもののcupsのリモート管理に際してのセキュアな通信。
 http://extstrg.asabiya.net/pukiwiki/index.php?cups%B4%C9%CD%FD%B2%E8%CC%CC%A4%D8%A4%CE%A5%A2%A5%AF%A5%BB%A5%B9%B5%F6%B2%C4%C0%DF%C4%EA


(休憩)


CUPSがうまく動作していないように見える原因は、Firefoxのカスタマイズ(ウチの事情)であったようで自業自得。Operaで

http://localhost:631/

をたたいたところマッタク問題なく。

これで、CUPS+gutenprint。次に、ウチのプリンタのドライバ。これがgutenprintには同梱されていないし、もとよりメーカー純正でFreeBSD向けに提供しているワケがない。浅はかな発想で、「CUPSが広い意味でUNIXな世界の汎用プリンタ管理システムなら、Linuxのドライバがあればどうにか!?」などと思い込んだが、つまりたいへん無知であることを露呈しただけだった。

EPSONのサポートから商品毎で検索し
http://download.ebz.epson.net/dsc/search/01/search/searchModule

ソースからドライバを生成する手順については ongs Inc.さんのこちらから。
http://www.ongs.net/ossan/diary/?date=201203

プリンタをCUPS上に組み込んだ上で、socketでプリンタのIPアドレス直打ちし、テストページを印刷しとりあえず終了。プリンタ本来の機能は何も活用できず、ただ標準的な設定で印刷できるだけだが致し方なし。それから、このプリンタの共有設定も必要だが、とりあえずここまで。



FreeBSD上のFirefoxでの設定変更

標準的なアドオンはWindows環境と変わらず使用可能。Windows環境と異なる点は、プロファイルを引き継がずに新規導入であるので、従来使用していた辞書アドオンが使用できないこと。

この対策として英辞郎アドオンの追加、しかしバーの上の広さが限られるためツールバーのカスタマイズで検索ボックスのみを残して他は撤去。通常の検索ボックスも除外し、URLバーを検索ボックス代わりにするためabout:configでBrowser.urlbar.clickSelectAllをTrueへ。また、browser.search.openintabをTrueへ。

それからURLの直接入力時、新しいTabを開くことなく当該画面で読み込まれてしまうのでこれも直さないと。




2014年3月27日木曜日

20日かかってやっと

当初検討していた類のアプリケーションを全部

 インストールすることが

できた。インストールしただけ、まだ何も使っていない、道具を並べてみただけで手に取ってさえいない状態に至るだけで20日が経過。PC本体とXの設定でバカ正直にログを読みすぎ無視していいエラーを無視せずドハマリ、XとWebブラウザのPortsインストール(にかかる膨大な時間)でドハマリ、日本語入力の設定でドハマ、設定したあとのデスクトップでの文字化けでドハ、オフィススイートやWebブラウザが起動しないことにドハ、ドハドハドハドハ。

とりあえず今回 たまたま インストールを終えた手順は

・PCのBIOSの設定を工場出荷状態へ
・8.4-ReleaseのインストールをStandardで下手にいじらず
 ホスト名とIPv4の設定と管理者パスワードと最低1人のアカウント追加で終え
・pkg install xorg
・/etc/rc.confにhaldとdbusの設定だけ追記
・pkg install ja-font-ipa
・pkg install ja-openoffice
・pkg install firefox
・pkg install xfce
・pkg install ja-scim-anthy
・~/.xinitrcに日本語のためのexport2行と
 scimの起動とstartxをxfce4へ変更する記述を追加

始めた時点で予備知識ほぼゼロ、周囲に「インストールに」関心のある人間が皆無で頼るのはネットだけという背景はありましたが、まさかここまで面倒だとは。

ともあれ、これからやっと「試用」です。



2014年3月26日水曜日

kde+libreoffice導入の問題

pkg install ja-libreoffice
この途中、pangoの導入中にエラーが生じていた問題は、glib20のmake deinstal==>reinstallで解消。もちろん、内部で何がどう変わったことかはサッパリわからない。
  
そして、ja-libreoffceのインストールが終了しても問題は続く。いざkde上で実行しようとすると、ロゴは現れるもウインドウが表示されない。これはscalcでしか確認していないが、Firefox-esrでも同様。これを試行錯誤して安定動作条件を見つけるなど狂気の沙汰。あるいはこれを解決することがスキル!? あまりにも愚か、かどうかはさておくとしても。このPC上では少なくとも、kde4がまったく実用的でないのでこれは当面手をつけない。

2014年3月25日火曜日

kde4 の次に Libreoffice の導入で不具合

id est ラテン語。

i.e.(id est)すなわち
e.g.(exemple gratia)たとえば
et al(et alii)およびその他


さておき、kde4。重い、遅い、ウザイ。慣れの問題!? 起動に3分、シャットダウンに2分半かかるなんて Windows VISTA並みかより酷いのですが。

それでもインストールが終わるだけまだマシで、これがLibreofficeなどはインストールさえできない。Pango のところで

Glib-GObject-CRITICAL


これが以前ならばLibreofficeをportsでインストールでもするところですが、XとFirefoxで既にさんざん痛い目を見たので、pangoだけ試しにやってみるとこれ。


checking for CAIRO... yes
checking which cairo font backends could be used... none
Configure : Disabling cairo suport
Configure : error : *** Could no enable any backends.

***
Must have at least one backend to build Pango
===> Script "Configure" failed unexpectedly.

Please run the gnomelogalyzer, available from
"http://www.freebsd.org/hnome/hnomelogalyzer.sh", which will diagnose the problem and suggest a solution.

If - and only if - the gnomelogalyzer cannot solve the proble, report the build failure to the FreeBSD GNOME team at gnome@freebsd.or, and attach

(a) "/usr/;orts/x11-toolkits/pango/work/pang-1.34/1/config.log",
(b) the output of the failed make command, and
(c) the gnomelogalyzer output.

Also, it might be a good idea to provide an overview of all packages (i.e. an 'ls /var/db/pkg') on your system.

Put your attachment up on any website, copy -a and - paste into http://freebsd-gnome.pastebin.com, or use sed-pr(1) with the attachemet.

Try to avoid sending an attachments to the mailing list (gnome@FreeBSD.org), because attachments set to FreeBSD mailing lists are usually discarded by the mailing list software.

*** Error code 1.

Stop in /usr/p;orts/x11-toolkits/pango.
*** Error code 1.

Stop in /usr/ports/x11-toolkits/pango.


さてさて。誰にでもやさしい構成と手順を目指すツモリは全くないのですが、とはいっても、OS+デスクトップをデフォでインストールして最小限の設定変更(それこそrc.confにhaldとdbus、.xinitrcに1行書いただけ)の状態へオフィススイートをパッケージで突っ込んでエラー、バカかと。これが最新の開発版だというならまだしも、敢えて枯れたところを狙っての2世代前(10でなくて8)、それも最終リリース版(8.4)で。ヒドイを通り越してキモいです。


さて、どうしたものやら。


2014年3月24日月曜日

Samba36の続き

samba.confはデフォルトで、

# /usr/local/etc/rc.d/samba restart
/usr/local/etc/rc.d/samba: WARNING: $samba_enable is not set properly - see rc.conf(5).
Cannot 'restart' samba. Set samba_enable to YES in /etc/rc.conf or use 'onerestart' instead of 'restart'.
#

どうやら onerestart らしい。意味は見当もつかないが。

# /usr/local/etc/rc.d/samba onerestart
/usr/local/etc/rc.d/samba: WARNING: $samba_enable is not set properly - see rc.conf(5).
Performing sanity check on Samba configuration: OK
winbindd not running? (check /var/run/samba/winbindd.pid).
smbd not running? (check /var/run/samba/smbd.pid).
nmbd not running? (check /var/run/samba/nmbd.pid).
Removing stale Samba tdb files: . done
Starting nmbd.
Starting smbd.
Starting winbindd.
#

と、ここで、わざわざSambaの設定を始めなくても、クライアント側で簡易ftpでも立てれば良かったことに気づく。これまで気づかないのだから我ながら恐ろしい。ともあれ、


/usr/local/etc/samba.conf

は、まるっきり手付かずではなく

workgroup =

Windows側のワークグループ名に合わせて設定、

;   hosts allow =
実際のネットワークに合わせて変更、

それからWindows側もけっこう変更が必要でそもそも

NetBIOS over TCP/IP を有効に。
Microsoftネットワークとプリンタ共有も有効に。

というのは、Samba側の設定を終えて onerestart して、Windows側でネットワークコンピュータをF5しまくって見えなくて、しかしブロードキャスト見えてて、あ、オレバカだ、と気づいてからの話です。

Samba機 --> ブロードキャスト/ネットワークブロードキャスト UDP NetBIOS-ns 137-->137
 Registration NB コンピュータ名(Sambaで設定した名前ではない以下同) Server Service
 Registration NB コンピュータ名 Messenger service / Main name
 Registration NB コンピュータ名 Workstation / Redirector
 Registration NB ワークグループ名 Workstation / Redirector
 Registration NB ワークグループ名 Browser Election Service
 Name query NB ワークグループ名 Local Master Browser
 *3セット

Samba機 --> ブロードキャスト/ネットワークブロードキャスト UDP NetBIOS-dgm138-->138
 Browser Election Request  Server name コンピュータ名
 *2秒毎に5セット

(中略)

Windows機 --> ブロードキャスト/ネットワークブロードキャスト UDP NetBIOS-ns 137-->137
 Registration NB コンピュータ名 Server Service
 Registration NB ワークグループ名 Browser Election Service
 *2秒以内に4セット
 UDP NetBIOS-dgm 138-->138 Workstation/Redirector-->Local Master Browser
 Request Anouncement ワークグループ名
 UDP NetBIOS-dgm 138-->138 Server Service-->Local Master Browser
 Domain/Workgroup Announcement MSHOME, NT Workstation, Domain Enum



以下略


で、コンピュータは見えてユーザー認証までは行くがこれがはじかれる。

NT Status: STATUS_LOGON_FAILURE 0x0000006d
http://accelart.jp/blog/NTSTATUSErrMsgJa.html


sambaのユーザとしての登録を確認しても
# pdbedit -L

登録されている。実際sshアクセスをしているユーザ。フルネームで入力してもNG、サーバ名を外してもNG、sambaのサーバストリングに変えてみてもNG。


ユーザ情報を確認・・・ってsshで接続できている時点で問題がないのだが念のため。
しかし一覧を探すのにてこずってコレ

more /etc/passwd

smb.confにおいてゲストアカウントを許可しないために設定したツモリの、nobodyがここに。


2014年3月23日日曜日

サーバのsshd設定修正

最小限のsshd設定
http://e4776m4mg.blogspot.jp/2014/03/84-releasessh.html

設定要素を記述する最初の一行が間違っています。orz
誤: /etc/ssh/sshd_conf
正: /etc/ssh/sshd_config

さておき、現状においてsshd_configの内容が以前と全く違います。おそらく、インストール時に転送ファイル容量を減らすためにdistributionを

 ワケもわからず何となく

変更したことが原因でしょう、ここに異変が生じるような要素は他に考えられません。


というわけで、sysinstallです。そういえばかつては/stand/sysinstallだったんですね。すっかり忘れていましたが他の設定で他所様のコンテンツを拝読しておりまして思い出しました。


とりあえずdistributionの選択で

4 Developer
5 Kern-Developer

を選択して、8 Customでドキュメントの類の選択を外して設定修正。

/etc/ssh/sshd_config

の中身をあらためて、今度は問題なし、というより以前設定したファイルの内容であるように見える。次に以前同様の修正を加えて、

Protocol 2

PermitRootLogin no
PasswordAuthentication yes
PermitEmptyPasswords no
AllowUsers daredare
ps

で見たところsshdが起動していないようなので
/etc/rc.d/sshd start
を叩いてみたところ
sshd already runnni? (pid=581).
あれっ!? でなくて単にpsがマヌケなのか。-a でも -au でもダメで、-auxでないと見えない。
-a は他ユーザも
-u は詳細
-x はシステム全体
 というわけで
/bin/kill -s HUP (PID)




とりあえずアクセス確認・・・NG。

sshアクセス用に作成したユーザアカウントが消えている、adduser。
rootのパスワードも消えている、passwd。忘れまくり。




それから以前はとても手が回らなかった鍵生成。

参考にさせていただくのはこちら様。
http://www.kishiro.com/FreeBSD/ssh.html


まずはこの設定

PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys


ちゃんと読むと


 Pub key Authentication yes
 Authorized KeysFile      .ssh/authorized_keys

公開鍵認証 はい
認証されたキーファイル .ssh以下の atuthorized_keys


この機器のこの状況における修正前は

#RSAAuthentication yes
#PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2

認証されたキーファイルに 2 があるがとりあえずこの状態からコメント#を外して、

/etc/rc.d/sshd restart


次に鍵の生成。


ssh-keygen -t rsa

オプションがたいへん多岐に渡る。-tはタイプ指定でここではRSA。

リベスト&シャミア&エーデルマン共同制作暗号
http://ja.wikipedia.org/wiki/RSA%E6%9A%97%E5%8F%B7

ssh-keygen
http://www.freebsd.org/cgi/man.cgi?query=ssh-keygen&sektion=1


パスフレーズは...

# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa. <--秘密鍵
Your public key has been saved in /root/.ssh/id_rsa.pub. <--公開鍵
The key fingerprint is:
4f:d7:07:af:86:f5:55:c9:5c:20:4f:df:26:89:7c:b8 root@netvista.testdomain
The key's randomart image is:
+--[ RSA 2048]----+
|            . o..|
|           . *oo+|
|            + *+=|
|             + =.|
|        S . E o +|
|         o . o +.|
|          . . o .|
|             .   |
|                 |
+-----------------+
#

生成完了。


次に、流し込み(業界用語)。ユーザ毎の/.sshdで

cat id_rsa.pub >> authorized_keys


で、クライアント側の設定をこちらなどを確認しつつ
http://www.j-oosk.com/teraterm/authorized_keys/306/

...秘密鍵の受け渡し方法がない。ないものは無いのでここで保留。


Samba36


参考にさせていただくのはこちら様。
http://bakuretsu.atso-net.jp/bakuretsu/freebsd/samba36.html

/usr/local/etc

8.4-Releaseだと samba.conf、samba.conf.sampleが生成されているので、

cp smb.conf smb.conf.default

と、いちおうバックアップを取ってから編集。

# vi smb.conf

# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# For a step to step guide on installing, configuring and using samba,
# read the Samba-HOWTO-Collection. This may be obtained from:
#  http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
#
# Many working examples of smb.conf files can be found in the
# Samba-Guide which is generated daily and can be downloaded from:
#  http://www.samba.org/samba/docs/Samba-Guide.pdf
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
   workgroup = MYGROUP

# server string is the equivalent of the NT Description field
   server string = Samba Server

# Security mode. Defines in which mode Samba will operate. Possible
# values are share, user, server, domain and ads. Most people will want
# user level security. See the Samba-HOWTO-Collection for details.
   security = user

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
;   hosts allow = 192.168.1. 192.168.2. 127.

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
   load printers = yes

# you may wish to override the location of the printcap file
;   printcap name = /etc/printcap

# on SystemV system setting printcap name to lpstat should allow
# you to automatically obtain a printer list from the SystemV spool
# system
;   printcap name = lpstat

# It should not be necessary to specify the print system type unless
# it is non-standard. Currently supported print systems include:
# bsd, cups, sysv, plp, lprng, aix, hpux, qnx
;   printing = cups

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
;  guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).
   max log size = 50

# Use password server option only with security = server
# The argument list may include:
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
#   password server = *
;   password server = <NT-Server-Name>

# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
;   realm = MY_REALM

# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
;   passdb backend = tdbsam

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting.
# Note: Consider carefully the location in the configuration file of
#       this line.  The included file is read at that point.
;   include = /usr/local/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See the chapter 'Samba performance issues' in the Samba HOWTO Collection
# and the manual pages for details.
# You may want to add the following on a Linux system:
;   socket options = SO_RCVBUF=8192 SO_SNDBUF=8192

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
;   interfaces = 192.168.12.2/24 192.168.13.2/24

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
;   local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
;   os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
;   domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
;   preferred master = yes

# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
;   domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
;   logon script = %m.bat
# run a specific logon batch file per username
;   logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
#        %L substitutes for this servers netbios name, %U is username
#        You must uncomment the [Profiles] share below
;   logon path = \\%L\Profiles\%U

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
;   wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
#       Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one  WINS Server on the network. The default is NO.
;   wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The default is NO.
   dns proxy = no

# Charset settings
;   display charset = koi8-r
;   unix charset = koi8-r
;   dos charset = cp866

# Use extended attributes to store file modes
;    store dos attributes = yes
;    map hidden = no
;    map system = no
;    map archive = no

# Use inherited ACLs for directories
;    nt acl support = yes
;    inherit acls = yes
;    map acl inherit = yes

# These scripts are used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
;  add user script = /usr/sbin/useradd %u
;  add group script = /usr/sbin/groupadd %g
;  add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
;  delete user script = /usr/sbin/userdel %u
;  delete user from group script = /usr/sbin/deluser %u %g
;  delete group script = /usr/sbin/groupdel %g


#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
;   comment = Network Logon Service
;   path = /usr/local/samba/lib/netlogon
;   guest ok = yes
;   writable = no
;   share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
;    path = /usr/local/samba/profiles
;    browseable = no
;    guest ok = yes


# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
# Set public = yes to allow user 'guest account' to print
   guest ok = no
   writable = no
   printable = yes

# This one is useful for people to share files
;[tmp]
;   comment = Temporary file space
;   path = /tmp
;   read only = no
;   public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
;   comment = Public Stuff
;   path = /home/samba
;   public = yes
;   writable = yes
;   printable = no
;   write list = @staff

# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
;   comment = Fred's Printer
;   valid users = fred
;   path = /homes/fred
;   printer = freds_printer
;   public = no
;   writable = no
;   printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
;   comment = Fred's Service
;   path = /usr/somewhere/private
;   valid users = fred
;   public = no
;   writable = yes
;   printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
;  comment = PC Directories
;  path = /usr/pc/%m
;  public = no
;  writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
;   path = /usr/somewhere/else/public
;   public = yes
;   only guest = yes
;   writable = yes
;   printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
;   comment = Mary's and Fred's stuff
;   path = /usr/somewhere/shared
;   valid users = mary fred
;   public = no
;   writable = yes
;   printable = no
;   create mask = 0765
;

# This is a DRAFT sample configuration for the ACLs on the ZFS partition.
#
;    nt acl support = yes
;    inherit acls = no
;    map acl inherit = yes
;
;[zpool]
;    path = /tank/zpool
;    unix extensions = no
;    vfs objects = zfsacl
;    nfs4:mode = special
;    nfs4:acedup = merge
;    nfs4:chown = yes
:q
#

何のこっちゃなのでこれもあわせて。
http://www.samba.gr.jp/project/translation/3.5/htmldocs/manpages-3/smb.conf.5.html


先ずは、何もしてないのに

# testparm

次に、

# smbpasswd -a daredare
New SMB password:
Retype new SMB password:
Added user daredare.
#

/etc/rc.confに追加
samba_enalbe="YES"
winbindd_enable="YES"

後者はWindowsのコンピュータブラウズのためか!?





NUC

NUC    DN2820FYKH    17980
http://www.intel.co.jp/content/www/jp/ja/nuc/nuc-board-dn2820fykh.html   
http://akiba-pc.watch.impress.co.jp/hotline/20140201/ni_cdn2820.html   
       
Intelの動作検証済みメモリ8GB    M471B1G73QH0    10800
http://www.amazon.co.jp/s/ref=nb_sb_noss?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&url=search-alias%3Dcomputers&field-keywords=M471B1G73QH0   
http://www.intel.com/support/motherboards/desktop/dk-dn2820fyk/sb/CS-034588.htm   
       
インテルSSD80GB    335 Series SSDSC2CT080A4K5    10780
http://kakaku.com/item/K0000498024/   
       
       
マウス    Sculpt Touch Mouse 6PL-00007    3400
http://www.microsoft.com/hardware/ja-jp/p/sculpt-touch-mouse   
       
キーボード    Wedge Mobile Keyboard for Business     5400
http://www.microsoft.com/hardware/ja-jp/p/wedge-mobile-keyboard   
       

合計48,360YEN、マウスとキーボードで贅沢をしているのでまぁ実質4万2千円。この額で、轟音でない、四六時中HDDスワップしまくりでない、ふつうに稼動するPC/しかも小さくてちょっとカワイイPCが入手できる。Atom系CPUなのでコンパイルや動画には他の選択/検討も...ということはあっても何はともあれお手軽、か!?


HPはメモリを4GBまでしか増設できず4万円台

http://h20547.www2.hp.com/is-bin/INTERSHOP.enfinity/WFS/Directplus-Customer-Site/ja_JP/-/JPY/DisplayProductInformationForBusiness-Frame?CategoryName=SERI:3389&ProductSKU=BASE:12295

DELLもメモリは4GBまでで約4万円
http://configure.apj.dell.com/dellstore/config.aspx?oc=cad0110w23sc04an2ojp&model_id=optiplex-3020-desktop&c=jp&l=ja&s=bsd&cs=jpbsd1&


今回のNUCプランはWindowsの価格を含んでいない(今回は不要)、なのでそもそも比較にはならない。が、少々微妙な価格差。


...投資不要の、既存資産の活用というテーマを根こそぎぶち壊す発想だなコレは、我ながら。また、古い機材では電力対効果という問題も。





PC環境更改の要件修正

御仁の要件が終了したので、XP環境を残さねばならない必然性が減少した。あとは、音楽アプリケーションソフトウェアのひとつをどうにかすれば......

いや、どうにもならんか。まだXP環境は残さざるをえない=内蔵HDDのクローンが必要、確固たるバックアップを望むならば。



前回の整理

> ・現行PCでクローンHDDを作る
>  <--HDD障害は回避可能だが本体障害はどうにもならん
> ・壊れてからXPの中古機器を買う・XPのOSメディアを入手する
>   <--中古機の中身を先に買っておくだけのことか
> -->クローンHDDは保険として対象が限定的。
> 中古機器は壊れてからでもいい、OSメディアは何を今更なので
> 今後の入手は困難かも、他の機器のメモリを買う機会があれば探すか。
 

今回の整理

XPを残すためにコストをかける必然性は低下。よって、OSメディアはもとより中古機器の購入そのものも保留にしてしまう、という考え方もアリか。 下手な中古よりも、この機器が故障する前に新機器に移行して、この機器を冷暗所に保存しておくのがコスト的にはベスト。


って、故障リスクは減るかもしれないが

 本番機の故障リスクそのもの

はヘッジできてないし。


何ともまー、たったひとつの音楽ソフトが仕事用でさえなければ。これが私の目先の使い勝手どうこうだったらいくらでも変えるんだが、お客さん向けにサービスレベルが落ちるでは・・・。

いいソフトが改悪され

十分使用に耐えるOSが改悪され

ユーザは無駄なコストと手間をかけさせられ、


って、もとより別に個人に限らず、BtoBや企業内のIT投資でもあらかた詐欺みたいなものか。




先のイミフな投稿2つ 外付けHDDブートと日本語入力環境について

まず、二つ前のイミフ投稿について。

あれは、USBブートのFreeBSD環境を作ろうとして失敗した当時の書きなぐりでした。実験に活用していた古いPCにおいて、Firefoxがあまりに重い-->じゃあ現用のPCで、余りHDDを利用してUSBブートにしてしまえ-->失敗、という段での錯綜でした。

当時何が失敗したかといえば、インストール中のファイル転送。ノートPCからUSB給電で外付けDVDと外付けHDD装置の2台を動かしたためかと思われます。

致し方なくUSB経由外付けHDDを諦め、次にUSBメモリにトライしたのですが。これはこれで問題が発生、と言いますのはインストールそのものは問題ないものの、動作中の微妙なフリーズがしばしば発生しまして。

あるいは低品質なNANDチップのメモリであるからか!?

などとも邪推しましたが、こんなん開けてみたってわかりませんし分かったところでどうにもなりません。結局、外付けHDDブートにリトライ。インストール作業中のDVDドライブの電源を別に供給することで問題解消。


次にひとつ前のイミフ投稿について。

これは日本語入力環境の設定中、公式ハンドブックはもとより諸方面の設定例を散々探したのですがなかなかうまくいかず錯綜した際のものです。

バージョン&デスクトップが同じ例は見つからなかったため、他のバージョン/デスクトップ/導入経緯の設定を参考にしたことが根本的に間違っている、ということはさておいても、何しろ使う人間が無知で迂闊で思考が根本的に弱いので四苦八苦。まぁ経過はともかく結果は、

8.4-Release
+
Xorg(パッケージでインストール)
+
Xcfe4(同上)
+
ja-font-ipa(同上)
+
ja-scmi-anthy(同上)
+
~/.xinitrcを新規作成
export LANG=ja_JP.UTF-8
export XMODIFIERS=@im=SCIM
scim -d
exec startxfce4 (日本語入力の設定とは関係無し)

で、中身も経過もワカラナイが結果的に、日本語入力が可能になりました。尚、ここでは元が英語キーボードであるので、日本語キーボードにおけるキー割り付けの変更は一切何もしていません。




Smart Common Input Method platform

はじめての「日本語入力の設定」中。

例によって手当たり次第+衝動で scim-anthy を組み込みましたが、自分でもイミフです。

SCIMとは、Smart Common Input Method platform とのこと。別に日本語のためのそふと、ではないですよと。

参考にさせていただいたのはこちら様
http://deppari783.blog7.fc2.com/blog-entry-13.html

pkgで入れてしまったものの、そもそも何をしてよいのかさっぱり分からない。




中途半端なインストールからの修復作業

そもそもrootのパスワードから空
passwd

ユーザ追加
adduser

sysinstallでできるのねそうだよね。が、つまるところ修復インストールであって設定ツールではなかった。カーネルから入れ直している。







2014年3月19日水曜日

USB-FreeBSDドライブの作成未完/終了かも

PCの外付けCDドライブからインストールメディアを起動、USB-HDDに導入を試みたがうまくいかず。導入の基本設定の後にファイル転送が始まり、ひと通り転送を終えたらしいあたりでリブートがかかる現象が2度。

当然、何の手順で何が不具合(単に私にとっての不都合であっておよそ不具合ではないかもしれない)が生じているかはまったくわからないので、軽く思考がブラックアウトする。次にこのようなネタを見つけるも、
http://ror.hj.to/s/content/issei/entry/201201/5433-1829f5eb715813a58d9c4db7a0991525

ddコマンドからうまくいかず。マウントの問題? とxfce4からは/と/usrが自動マウントされていて/varと/tmpがマウント不可という意味不明。いっそパーティションをすべて削除しようにもコマンドを知らずfdsikで-dは利かず。sysinstallで切り直し…sysinstallでそもそもいけるんじゃないか!? などと魔が差したがNG、やはりファイル転送の後で画面がブラックアウト。おそらくは、ファイル転送終了-->転送先の何かを使ってインストールの最終段階に入るところで何かしら!?!の問題(私にとって)が。

ここで、おそらくブラックアウトの裏でダイアログが・・・などと邪推してNキーを連打してしまってrootのパスワードが無くなる事態に。

いや、いっそここから修復作業をすれば、それはそれでいい勉強だったのだろうが、軽く思考が途切れて再インストールをしてしまった。二重にミスで、

・修復をする
・クリーンでぶちこむならいっそUSB-HDDにぶちこむ

を試せば良かったものの、現在既に画面は

Congratulations!

ハイOK、いや、abortか。後者を試しても、このUSB-HDDは別機器の外付けブートにしようとしているので無駄といえばムダの極みなのだが。

と、この機器ではdisk:ad0しか認識しなかった


前途が多難かどうかも見えやしない。






PC環境と周辺機材の整理

目的:
1. 私用OSをFreeBSDへ変更
2. テストPCの性能を改善

条件:
・あの方の御用があるのでXP環境を残すことは必須
・さらに音楽系の16ビットアプリがある
<--XPは絶対残さねばならないし、残すどころかクローンディスクがほしいぐらい。
・機材はできるだけ捨てない


適否:

2.について
機材を捨てるほかない
・メモリ増設は可能だが古い技術へのコストがかさむ上に上限512MBかえって無駄
・もとよりHDD容量も足りないし2.5インチの余りを転用するにもさらにコストが

<--機材を捨てないためには使い方を見直す以外にない

1.について

IP10のHDDにおけるメーカーリカバリ領域を温存したままデュアルブートが可能か?
あるいはUSB-UNIXでどこまで使える?
 ともの技術メモさん
 http://tomono.eleho.net/2011/01/31/434/
 USBメモリで十分使えてしまいそうだが、容量が必要、セキュリティロックは必須。
 http://kakaku.com/item/J0000009682/
-->使える-->使い勝手は!?

使い勝手
profileの類をUSBに残す
USB内をUFSとFAT32でパーティション2つ
USBブートのOSからUSB内の別パーティション・・・は最初から設定できるか?
となるとUSBフラッシュメモリはますます容量が必要か、HDDは4分の1さえ使っておらず100GBはゆうに空いているのに、わざわざ別にUSBフラッシュメモリにコストをかけなくてはならないなんて、何ともバカげている。


個々の目的毎に整理

XPを温存するには(故障した際にどうする)
・現行PCでクローンHDDを作る
 <--HDD障害は回避可能だが本体障害はどうにもならん
・壊れてからXPの中古機器を買う・XPのOSメディアを入手する
  <--中古機の中身を先に買っておくだけのことか

 -->クローンHDDは保険として対象が限定的。中古機器は壊れてからでもいい、OSメディアは何を今更なので今後の入手は困難かも、他の機器のメモリを買う機会があれば探すか。


パーソナルFreeBSDに移行する
・USBで運用する
  <--新PCを用意するまでもなく試して当然/後のことは試してから
  <--FreeBSDは

サーバの性能を劇的に改善する
・買い換える
・重い処理はPC1のUSB-FreeBSDに担わせる
 <--試してみるのはオモシロイ!?


はて。
USBでブートするなら、USB経由のHDDという手段が。



手順

1.現行環境のバックアップをK箱経由でHDD(I)へ
 HDD(I)は裸で保管/K箱はHDD(S)に戻す
2.新箱でHDD(T)をつなぎUSB-UNIX環境を作る

 -->OKならばPC2は低負荷なじっけんサーバに
 -->NGならばPC2は買い換え



2014年3月16日日曜日

古いPCだからとも限らないがメモリ増設の制限事項

Firefox17(ESR)のビルドは結局8-9時間コース。

ただしこれは、古いPCの当時なりの仕様であってのこと。具体的には

・Pentium3 677
・SDRAM(PC133) 192MB

Firefoxも起動はさせてみたが、この環境ではあまりにも重過ぎて使い物にならない。もとより既存資産を使いまわした低負荷サーバにいちおう入れて置く「困ったときの検索ブラウザ」。使い物にならなくても大きな支障ではない。

が、SDRAMなんて今時分には相当安価に入手できるのでは!?

という発想はぬる過ぎでした。256MBで数千円、この機器の最大512MBを備えようとすると5-6千円は必要です。しかもこのPCでは、メモリチップの搭載方法についての制限もあるようで。


感謝
http://www.geocities.jp/moja0305/netvista.html


メモリの調達にあたっては要、現物確認と。これでは友人知人のPC廃品をあたった方がよさそうな。必然的に、他のPCを当たるに際してはメモリ512MB以上、Pentium3-667以上、5千円以内(お礼の品または飲食込み)ということに。廃品にはPCリサイクル費の3千円がさらに加わるので、実質タダでもらうでなければ、メモリを買った方がマシだということになる。

あるメモリ販売企業の適合検索結果
http://www.green-house.co.jp/searchmem/detailmem.php?Maker=IBM&Product=NetVista+A40&ProductNo=6881-S5J
http://jp.transcend-info.com/
GH-SVM133/256M

Transcendは適合商品をもう販売していないっぽい。
http://jp.transcend-info.com/Support/Search/Compatibility.asp?out=
NetVista A40 (6648, 6568, 6578, 6830, 6831, 6840, 6881-xxx) (Desktop)

- Standard Memory : 64/128MB(R)
- Maximum Memory : 512MB
- Slots : 2

Memory Modules   

Transcend P/N    |     Picture     |     Description     |     Rank    
TS256MIB3075         [[transcend.com.tw]]         256MB MEMORY MODULE FOR IBM DESKTOP.         Dual Rank    
TS128MIB3073         [[transcend.com.tw]]         128MB MEMORY MODULE FOR IBM DESKTOP.         Dual Rank



----------------------------------------


Would you please send up the details by email
to  avoid any misunderstanding.

クルマで富士山、だから by email は aでもtheでも複数形でもないemail


I hate to rush you.


it seems
it appers

の違い。



 To avoid any misunderstanging, let me repeat.

Forward me those files to may computer right away.
I'm sorry to  bother you,
but we can't find any attachments on your email.

Would you mind resending it?


ポイントはwe
あなたが付けてないではなく私たちでは見つからない
協力的な姿勢で
ご協力ください、テキナ。



祝着至極


Unfortunately



Visual C++ 2005 Express で初めてのCのメモ

New Project (Ctrl+Shift+N)
Visual C++ --> Visual Studio installed templates / Win32 Console Application
(Project) Name & Location
& Solution Name :Create directory for solution

Your project requires need a unique name.
Please enter a unique name in the Name field.

 



Cのコメントは/*~*/
C++は//から行末まで(行末に専用記号無し)

#で始まるコマンドはプリプロセッサ/コンパイラに渡されない

 Cのキホン ソース--(プリプロセッサ)-->コンパイラ-->中間言語
includeはincludeの主体そのものの中に取り込む/取り込まれること

 stdio=Standard Input/Output キホンはキーボード入力・ディスプレイ(テキスト出力)

しかしVisual C++では単純にキーボード-->プログラム(C)-->ディスプレイではなく、キーボード-->Winデバイスドライバ-->Windows一式-->プログラム(VC++)・・・と単純ではないのでstdioではくstdafxのhである、ということ、とのこと。

 リターン命令はプログラムの終了コード

はぁ。



2014年3月15日土曜日

X Window を動作させることができない地獄から脱出

そもそもFreeBSDの導入から基本的な設定でさんざんやらかした上での地獄ながら、決定的にかけていたのはハードウェアの設定の確認というボロさ。織田先生の華麗なしくじりっぷり(*)を全く笑えない。

共有メモリ 1MB から 無し へ
パレットスヌープ しない から する へ


* 当然、番組のオモシロ煽り担当スタッフが仕込んだものではありますが、織田くんオモシロ過ぎです。ぜひ、佐野実に代わって今後メディア露出は彼に。


さておき今後の取り組み。

どうせ今後もイロイロやらかすので(やらかすつもりは一切無いが再インストールの機会は必ず来るので)、正しいインストール手順のまとめは後回し。先に進む。


/usr/ports/x11/xorg # make config-recursive

make install 時のオプションについて再設定できる。前回はアプリケーションの大半を省いたので入れなおし。

...clockやxtermを選択した画面が出てこない。

ひとまずここはfirefox、esr-18i。


をportsからぶちこんでから後悔する。後先を考える、思いつきバカ者の浅はかさ。Firefox本体だけでざっと86MB分のコンパイル&ビルドにどんな時間が、、

Firefox本体に至るまでに約3時間、










2014年3月14日金曜日

ALGIXをそもそもインストールしないという手段はあるのか



minimal-customでインストール
sshdとdevice.hintsだけ設定

sshアクセスから、これでだいたい入ると思われるたぶんおそらくきっと当社比。<---大失敗


以下大失敗の記録
pkg_add -r  unzip
pkg_add -r  bison
pkg_add -r  cmake
pkg_add -r  dbus-glib
pkg_add -r  glib20
pkg_add -r  gmake
pkg_add -r  gobject-introspection
pkg_add -r  libcheck
pkg_add -r  libpciaccess
pkg_add -r  libpthread-stubs
pkg_add -r  libtool
pkg_add -r  libvolume_id
pkg_add -r  makedepend
pkg_add -r  pkgconf
pkg_add -r  cairo
pkg_add -r  libdrm
pkg_add -r  libGL
pkg_add -r  perl5.14
pkg_add -r  python27
pkg_add -r  gnomehier
pkg_add -r  v4l_compat
pkg_add -r  libgcrypt
pkg_add -r  consolekit
pkg_add -r  dmidecode
pkg_add -r  hal
pkg_add -r  libutempter
pkg_add -r  policykit
pkg_add -r  polkit
pkg_add -r  docbook
pkg_add -r  docbook-sk
pkg_add -r  docbook-xsl
pkg_add -r  intltool
pkg_add -r  libxslt
pkg_add -r  py-libxml2
pkg_add -r  bigreqsproto
pkg_add -r  compositeproto
pkg_add -r  dmxproto
pkg_add -r  evieext
pkg_add -r  glproto
pkg_add -r  inputproto
pkg_add -r  libdmx
pkg_add -r  liboldX
pkg_add -r  libXcomposite
pkg_add -r  libXcursor
pkg_add -r  libXevie
pkg_add -r  libXinerama
pkg_add -r  libxkbfile
pkg_add -r  libxkbui
pkg_add -r  libXrandr
pkg_add -r  libXres
pkg_add -r  libXScrnSaver
pkg_add -r  libXTrap
pkg_add -r  libXtst
pkg_add -r  libXv
pkg_add -r  libXvMC
pkg_add -r  libXxf86dga
pkg_add -r  libXxf86misc
pkg_add -r  luit
pkg_add -r  recordproto
pkg_add -r  resourceproto
pkg_add -r  bdftopcf
pkg_add -r  bitstream-vera
pkg_add -r  encodings
pkg_add -r  font-adobe-100dpi
pkg_add -r  font-adobe-75dpi
pkg_add -r  font-adobe-utopia-100dpi
pkg_add -r  font-adobe-utopia-75dpi
pkg_add -r  font-adobe-utopia-type1
pkg_add -r  font-alias
pkg_add -r  font-arabic-misc
pkg_add -r  font-bh-100dpi
pkg_add -r  font-bh-75dpi
pkg_add -r  font-bh-lucidatypewriter-100dpi
pkg_add -r  font-bh-lucidatypewriter-75dpi
pkg_add -r  font-bh-ttf
pkg_add -r  font-bh-type1
pkg_add -r  font-bitstream-100dpi
pkg_add -r  font-bitstream-75dpi
pkg_add -r  font-bitstream-type1
pkg_add -r  font-cronyx-cyrillic
pkg_add -r  font-cursor-misc
pkg_add -r  font-daewoo-misc
pkg_add -r  font-dec-misc
pkg_add -r  font-ibm-type1
pkg_add -r  font-isas-misc
pkg_add -r  font-jis-misc
pkg_add -r  font-micro-misc
pkg_add -r  font-misc-cyrillic
pkg_add -r  font-misc-ethiopic
pkg_add -r  font-misc-meltho
pkg_add -r  font-misc-misc
pkg_add -r  font-mutt-misc
pkg_add -r  font-schumacher-misc
pkg_add -r  font-screen-cyrillic
pkg_add -r  font-sony-misc
pkg_add -r  font-sun-misc
pkg_add -r  font-util
pkg_add -r  font-winitzki-cyrillic
pkg_add -r  font-xfree86-type1
pkg_add -r  fontcacheproto
pkg_add -r  fontconfig
pkg_add -r  fontsproto
pkg_add -r  libFS
pkg_add -r  libXfont
pkg_add -r  libXfontcache
pkg_add -r  xf86bigfontproto
pkg_add -r  xorg-fonts
pkg_add -r  xorg-fonts-cyrillic
pkg_add -r  xcursor-themes


minimal-customなのでports無し、そこで、

 /var/db/portsnapに落として/usr/portsに展開
portsnap fetch
portsnap extrac

と思ったものの、ディスク/メモリ媒体からにしないと、extractでえらい時間がかかって本末転倒。


まず、でふぉなマニュアルさえインストールしないのは make install にあたり害っぽい。それから先に突っ込んでおくにしても

cmake
gmake
python
perl

とフォントあたりにとどめたほうがいい鴨

minimalを選択した後にcustomで変更を加える

base
kernels
man
src
ports
のみ

srcは
base
lib
libexec
bin
sbin
sys

pkg_add -r  pkgconf
pkg_add -r  makedepend

pkg_add -r  unzip
pkg_add -r  hal

pkg_add -r  cmake
pkg_add -r  gmake

pkg_add -r  bison
pkg_add -r  perl5.14
pkg_add -r  python27

pkg_add -r  dbus-glib
pkg_add -r  glib20
pkg_add -r  gobject-introspection
pkg_add -r  libcheck
pkg_add -r  libpciaccess
pkg_add -r  libpthread-stubs
pkg_add -r  libtool
pkg_add -r  libvolume_id
pkg_add -r  libdrm
pkg_add -r  libGL


pkg_add -r  cairo

pkg_add -r  gnomehier

pkg_add -r  v4l_compat

pkg_add -r  libgcrypt

pkg_add -r  consolekit
pkg_add -r  dmidecode

pkg_add -r  libutempter
pkg_add -r  policykit
pkg_add -r  polkit
pkg_add -r  docbook
pkg_add -r  docbook-sk
pkg_add -r  docbook-xsl

pkg_add -r  intltool
pkg_add -r  libxslt
pkg_add -r  py-libxml2
pkg_add -r  bdftopcf
pkg_add -r  bitstream-vera
pkg_add -r  encodings
pkg_add -r  font-adobe-100dpi
pkg_add -r  font-adobe-75dpi
pkg_add -r  font-adobe-utopia-100dpi
pkg_add -r  font-adobe-utopia-75dpi
pkg_add -r  font-adobe-utopia-type1
pkg_add -r  font-alias
pkg_add -r  font-arabic-misc
pkg_add -r  font-bh-100dpi
pkg_add -r  font-bh-75dpi
pkg_add -r  font-bh-lucidatypewriter-100dpi
pkg_add -r  font-bh-lucidatypewriter-75dpi
pkg_add -r  font-bh-ttf
pkg_add -r  font-bh-type1
pkg_add -r  font-bitstream-100dpi
pkg_add -r  font-bitstream-75dpi
pkg_add -r  font-bitstream-type1
pkg_add -r  font-cronyx-cyrillic
pkg_add -r  font-cursor-misc
pkg_add -r  font-daewoo-misc
pkg_add -r  font-dec-misc
pkg_add -r  font-ibm-type1
pkg_add -r  font-isas-misc
pkg_add -r  font-jis-misc
pkg_add -r  font-micro-misc
pkg_add -r  font-misc-cyrillic
pkg_add -r  font-misc-ethiopic
pkg_add -r  font-misc-meltho
pkg_add -r  font-misc-misc
pkg_add -r  font-mutt-misc
pkg_add -r  font-schumacher-misc
pkg_add -r  font-screen-cyrillic
pkg_add -r  font-sony-misc
pkg_add -r  font-sun-misc
pkg_add -r  font-util
pkg_add -r  font-winitzki-cyrillic
pkg_add -r  font-xfree86-type1
pkg_add -r  fontcacheproto
pkg_add -r  fontconfig
pkg_add -r  fontsproto

pkg_add -r  libFS
pkg_add -r  libXfont
pkg_add -r  libXfontcache



pkg_add -r  xf86bigfontproto
pkg_add -r  xorg-fonts


pkg_add -r  xorg-fonts-cyrillic




懲りてなーい。

# pkg_add -r  pkgconf
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/Latest/pkgconf.tbz... Done.

# pkg_add -r  makedepend
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/Latest/makedepend.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/xproto-7.0.22.tbz... Done.

# pkg_add -r  unzip
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/Latest/unzip.tbz... Done.

# pkg_add -r  hal
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/Latest/hal.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/kbproto-1.0.5.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/expat-2.0.1_2.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/gnome_subr-1.0.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/dmidecode-2.11.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/pciids-20130327.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/gnomehier-3.0.tbz... Done.
./etc/CORBA missing (created)
./etc/CORBA/servers missing (created)
./etc/X11 missing (created)
./etc/X11/serverconfig missing (created)
./etc/X11/starthere missing (created)
./etc/X11/sysconfig missing (created)
./etc/dconf missing (created)
./etc/dconf/db missing (created)
./etc/dconf/profile missing (created)
./etc/gconf missing (created)
./etc/gconf/gconf.xml.defaults missing (created)
./etc/gconf/gconf.xml.mandatory missing (created)
./etc/gconf/gconf.xml.system missing (created)
./etc/gconf/schemas missing (created)
./etc/gnome missing (created)
./etc/gnome/config missing (created)
./etc/gnome-vfs-2.0 missing (created)
./etc/gnome-vfs-2.0/modules missing (created)
./etc/mateconf missing (created)
./etc/mateconf/mateconf.xml.defaults missing (created)
./etc/mateconf/mateconf.xml.mandatory missing (created)
./etc/mateconf/mateconf.xml.system missing (created)
./etc/mateconf/schemas missing (created)
./etc/sound missing (created)
./etc/sound/events missing (created)
./etc/vfs missing (created)
./etc/vfs/modules missing (created)
./etc/xdg missing (created)
./etc/xdg/autostart missing (created)
./include/gconf missing (created)
./include/gdkcardimage missing (created)
./include/gnome-1.0 missing (created)
./lib/GConf missing (created)
./lib/bonobo missing (created)
./lib/bonobo/monikers missing (created)
./lib/bonobo/plugin missing (created)
./lib/girepository-1.0 missing (created)
./lib/gnome-vfs-2.0 missing (created)
./lib/gnome-vfs-2.0/modules missing (created)
./lib/mate-vfs-2.0 missing (created)
./lib/mate-vfs-2.0/modules missing (created)
./lib/matecomponent missing (created)
./lib/matecomponent/monikers missing (created)
./lib/matecomponent-2.0 missing (created)
./lib/matecomponent-2.0/samples missing (created)
./lib/vfs missing (created)
./lib/vfs/modules missing (created)
./libdata/bonobo missing (created)
./libdata/bonobo/servers missing (created)
./libdata/matecomponent missing (created)
./libdata/matecomponent/servers missing (created)
./share/MateConf missing (created)
./share/MateConf/gsettings missing (created)
./share/applets missing (created)
./share/applets/Amusements missing (created)
./share/applets/Clocks missing (created)
./share/applets/Monitors missing (created)
./share/applets/Multimedia missing (created)
./share/applets/Network missing (created)
./share/applets/Utility missing (created)
./share/application-registry missing (created)
./share/capplets missing (created)
./share/control-center missing (created)
./share/control-center/Desktop missing (created)
./share/control-center/Documents missing (created)
./share/control-center/Peripherals missing (created)
./share/control-center/Session missing (created)
./share/control-center/capplets missing (created)
./share/control-center/keybindings missing (created)
./share/control-center/keybindings/gtk-modules missing (created)
./share/control-center-2.0 missing (created)
./share/control-center-2.0/capplets missing (created)
./share/doc/libgda missing (created)
./share/gir-1.0 missing (created)
./share/gnome missing (created)
./share/gnome/apps missing (created)
./share/gnome/apps/Applications missing (created)
./share/gnome/apps/Audio missing (created)
./share/gnome/apps/Development missing (created)
./share/gnome/apps/Games missing (created)
./share/gnome/apps/Graphics missing (created)
./share/gnome/apps/Internet missing (created)
./share/gnome/apps/Multimedia missing (created)
./share/gnome/apps/Settings missing (created)
./share/gnome/apps/Settings/Desktop missing (created)
./share/gnome/apps/Settings/Documents missing (created)
./share/gnome/apps/Settings/Peripherals missing (created)
./share/gnome/apps/Settings/Session missing (created)
./share/gnome/apps/System missing (created)
./share/gnome/apps/Utilities missing (created)
./share/gnome/autostart missing (created)
./share/gnome/help missing (created)
./share/gnome/help/fdl missing (created)
./share/gnome/help/fdl/C missing (created)
./share/gnome/help/gpl missing (created)
./share/gnome/help/gpl/C missing (created)
./share/gnome/help/lgpl missing (created)
./share/gnome/help/lgpl/C missing (created)
./share/gnome/panel missing (created)
./share/gnome/ui missing (created)
./share/gnome/wm-properties missing (created)
./share/gnome-2.0 missing (created)
./share/gnome-2.0/ui missing (created)
./share/gnome-about missing (created)
./share/gnome-control-center missing (created)
./share/gnome-control-center/keybindings missing (created)
./share/gnome-settings-daemon-3.0 missing (created)
./share/images missing (created)
./share/mate missing (created)
./share/mate/help missing (created)
./share/mate-2.0 missing (created)
./share/mate-2.0/ui missing (created)
./share/mate-control-center missing (created)
./share/mate-control-center/keybindings missing (created)
./share/mc missing (created)
./share/mc/templates missing (created)
./share/mime-info missing (created)
./share/oaf missing (created)
./share/omf missing (created)
./share/pixmaps/document-icons missing (created)
./share/pixmaps/splash missing (created)
./share/sgml/docbook missing (created)
./share/sgml/docbook/gnome-customization-0.1 missing (created)
./share/sounds missing (created)
./share/vala missing (created)
./share/vala/vapi missing (created)
./share/vfolders missing (created)
./share/xmodmap missing (created)
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/perl-5.14.2_3.tbz... Done.
Removing stale symlinks from /usr/bin...
    Skipping /usr/bin/perl
    Skipping /usr/bin/perl5
Done.
Creating various symlinks in /usr/bin...
    Symlinking /usr/local/bin/perl5.14.2 to /usr/bin/perl
    Symlinking /usr/local/bin/perl5.14.2 to /usr/bin/perl5
Done.
Cleaning up /etc/make.conf... Done.
Spamming /etc/make.conf... Done.
Cleaning up /etc/manpath.config... Done.
Spamming /etc/manpath.config... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libXau-1.0.6.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libXdmcp-1.1.0.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libICE-1.0.7,1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libSM-1.2.0,1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/pcre-8.32.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libvolume_id-0.81.1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libpthread-stubs-0.3_3.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libxcb-1.7.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libX11-1.4.4,1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libffi-3.0.13.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libiconv-1.14_1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libxml2-2.8.0_1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/dbus-1.6.8.tbz... Done.
===> Creating users and/or groups.
Creating group 'messagebus' with gid '556'.
Creating user 'messagebus' with uid '556'.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/gettext-0.18.1.1_1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/python27-2.7.3_6.tbz... Done.

====
Note that some of the standard modules are provided as separate
ports since they require extra dependencies:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter

Install them as needed.
====

Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/glib-2.34.3.tbz... Done.
No schema files found: doing nothing.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/gamin-0.1.10_5.tbz... Done.

===============================================================================

Gamin will only provide realtime notification of changes for at most n files,
where n is the minimum value between (kern.maxfiles * 0.7) and
(kern.maxfilesperproc - 200). Beyond that limit, files will be polled.

If you often open several large folders with Nautilus, you might want to
increase the kern.maxfiles tunable (you do not need to set
kern.maxfilesperproc, since it is computed at boot time from kern.maxfiles).

For a typical desktop, add the following line to /boot/loader.conf, then
reboot the system:

    kern.maxfiles="25000"

The behavior of gamin can be controlled via the various gaminrc files.
See http://www.gnome.org/~veillard/gamin/config.html on how to create
these files.  In particular, if you find gam_server is taking up too much
CPU time polling for changes, something like the following may help
in one of the gaminrc files:

# reduce polling frequency to once per 10 seconds
# for UFS file systems in order to lower CPU load
fsset ufs poll 10

===============================================================================

Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/gio-fam-backend-2.34.3.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/dbus-glib-0.100.1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/policykit-0.9_6.tbz... Done.
===> Creating users and/or groups.
Creating group 'polkit' with gid '562'.
Creating user 'polkit' with uid '562'.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/gobject-introspection-1.34.2.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/polkit-0.105_1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/consolekit-0.4.3.tbz... Done.
===> Creating users and/or groups.
Creating group 'haldaemon' with gid '560'.
Creating user 'haldaemon' with uid '560'.
#


halで相当引っ張ってこれる。

# pkg_add -r  gmake
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/Latest/gmake.tbz... Done.

# pkg_add -r  cmake
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/Latest/cmake.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/cmake-modules-2.8.10.2.tbz... Done.

# pkg_add -r  bison
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/Latest/bison.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/m4-1.4.16_1,1.tbz... Done.


# pkg_add -r  cairo
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/Latest/cairo.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/renderproto-0.11.1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/freetype2-2.4.11.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/fontconfig-2.9.0,1.tbz... Done.
Running fc-cache to build fontconfig cache...
/usr/local/share/fonts: skipping, no such directory
/usr/local/lib/X11/fonts: caching, new cache contents: 0 fonts, 1 dirs
/usr/local/lib/X11/fonts/local: caching, new cache contents: 0 fonts, 0 dirs
/root/.fonts: skipping, no such directory
/var/db/fontconfig: cleaning cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/png-1.5.14.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/pixman-0.24.2.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/xcb-util-0.3.9_1,1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/xcb-util-renderutil-0.3.8.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libXrender-0.9.6.tbz... Done.

# pkg_add -r  xf86bigfontproto
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/Latest/xf86bigfontproto.tbz... Done.

# pkg_add -r  xorg-fonts
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/Latest/xorg-fonts.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/encodings-1.0.4,1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/bitstream-vera-1.10_5.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/xorg-fonts-cyrillic-7.5.1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/xorg-fonts-truetype-7.5.1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/xorg-fonts-miscbitmaps-7.5.1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/xorg-fonts-type1-7.5.1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/xorg-fonts-75dpi-7.5.1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/xorg-fonts-100dpi-7.5.1.tbz... Done.



投入ここまで以下様子見

pkg_add -r  dbus-glib
pkg_add -r  glib20
pkg_add -r  gobject-introspection
pkg_add -r  libcheck
pkg_add -r  libpciaccess
pkg_add -r  libpthread-stubs
pkg_add -r  libtool
pkg_add -r  libvolume_id
pkg_add -r  libdrm
pkg_add -r  libGL

pkg_add -r  gnomehier

pkg_add -r  v4l_compat

pkg_add -r  libgcrypt

pkg_add -r  consolekit
pkg_add -r  dmidecode

pkg_add -r  libutempter
pkg_add -r  policykit
pkg_add -r  polkit

pkg_add -r  intltool
pkg_add -r  libxslt
pkg_add -r  py-libxml2
pkg_add -r  bdftopcf
pkg_add -r  bitstream-vera
pkg_add -r  encodings

pkg_add -r  libFS
pkg_add -r  libXfont
pkg_add -r  libXfontcache


xorg
make install cleanまで約1時間
















2014年3月13日木曜日

外付けビデオカードがやっとcard0へ


外付けがcard0


これはOK

今度はfbdevhwがロードされないと。とりあえずsshdで採り直す。

suが利かない。ユーザー設定を誤ったらしい。要反省は次郎君の程度ではない。はるかに下だ。

pw
http://www.freebsd.org/cgi/man.cgi?query=pw&sektion=8

今回はとりあえず
pw usermod -n "ユーザ名" -g "変更対象のグループ名"
pw groupshow -n "ユーザ名"

で修復、確認。


(EE) LoadModule: Module fbdevhw does not have a fbdevhwModuleData data object.
(EE) Failed to load module "fbdevhw" (invalid module, 0)
(EE) RADEON(0): [dri] RADEONDRIGetVersion failed to open the DRM
[dri] Disabling DRI.
  XRANDR name: VGA-0
  Connector: VGA
  CRT1: INTERNAL_DAC1
  DDC reg: 0x60
finished output detect: 0
finished all detect
disable primary dac
disable primary dac
disable primary dac
init memmap
init common
init crtc1
init pll1
freq: 202500000
best_freq: 202500000
best_feedback_div: 495
best_frac_feedback_div: 0
best_ref_div: 66
best_post_div: 1
restore memmap
restore common
restore crtc1
restore pll1
finished PLL1
set RMX
set primary dac
enable primary dac
(EE) AIGLX error: dlopen of /usr/local/lib/dri/swrast_dri.so failed (Cannot open "/usr/local/lib/dri/swrast_dri.so")
(EE) GLX: could not load software renderer


やれやれ。/var/log/Xorg.0.log で見ると



ひとしきりドライバのリストが並んだ後から
(II) FBDEV: driver for framebuffer: fbdev
(II) Primary Device is:
(II) Loading sub module "fbdevhw"
(II) LoadModule: "fbdevhw"
(II) Loading /usr/local/lib/xorg/modules/linux/libfbdevhw.so
(EE) LoadModule: Module fbdevhw does not have a fbdevhwModuleData data object.
(II) UnloadModule: "fbdevhw"
(II) Unloading /usr/local/lib/xorg/modules/linux/libfbdevhw.so
(EE) Failed to load module "fbdevhw" (invalid module, 0)
(WW) Falling back to old probe method for fbdev
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
(II) RADEON(0): TOTO SAYS 00000000fea80000
(II) RADEON(0): MMIO registers at 0x00000000fea80000: size 512KB
(II) RADEON(0): PCI bus 1 card 13 func 0
(==) RADEON(0): Depth 24, (--) framebuffer bpp 32
(II) RADEON(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
(==) RADEON(0): Default visual is TrueColor
(II) Loading sub module "vgahw"
(II) LoadModule: "vgahw"
(II) Loading /usr/local/lib/xorg/modules/libvgahw.so
(II) Module vgahw: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 0.1.0
       ABI class: X.Org Video Driver, version 6.0
(II) RADEON(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000
(==) RADEON(0): RGB weight 888
(II) RADEON(0): Using 8 bits per RGB (8 bit DAC)
(--) RADEON(0): Chipset: "ATI Radeon QD (AGP)" (ChipID = 0x5144)
(--) RADEON(0): Linear framebuffer at 0x00000000f0000000
(II) RADEON(0): PCI card detected
(II) Loading sub module "int10"
(II) LoadModule: "int10"
(II) Loading /usr/local/lib/xorg/modules/libint10.so
(II) Module int10: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 1.0.0
        ABI class: X.Org Video Driver, version 6.0
(II) RADEON(0): initializing int10
(==) RADEON(0): Write-combining range (0xa0000,0x20000) was already clear
(==) RADEON(0): Write-combining range (0xc0000,0x40000) was already clear
(II) RADEON(0): Legacy BIOS detected
drmOpenDevice: node name is /dev/dri/card0
Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
drmOpenDevice: open result is -1, (No such file or directory)
Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
[drm] failed to load kernel module "radeon"
(EE) RADEON(0): [dri] RADEONDRIGetVersion failed to open the DRM
[dri] Disabling DRI.
(II) RADEON(0): Detected total video RAM=32768K, accessible=65536K (PCI BAR=131072K)
(--) RADEON(0): Mapped VideoRAM: 32768 kByte (64 bit SDR SDRAM)
(II) RADEON(0): Color tiling enabled by default
(II) Loading sub module "ddc"
(II) LoadModule: "ddc"
(II) Module "ddc" already built-in
(II) Loading sub module "i2c"
(II) LoadModule: "i2c"
(II) Module "i2c" already built-in
(II) RADEON(0): ref_freq: 2700, min_out_pll: 12000, max_out_pll: 35000, min_in_pll: 40, max_in_pll: 500, xclk: 16600, sclk: 166.000000, mclk: 166.000000
(II) RADEON(0): PLL parameters: rf=2700 rd=60 min=12000 max=35000; xclk=16600
(WW) RADEON(0): No Connector Info Table found!
(II) RADEON(0): Output VGA-0 using monitor section Monitor0
(II) RADEON(0): I2C bus "VGA-0" initialized.
(II) RADEON(0): Port0:
  XRANDR name: VGA-0
  Connector: VGA
  CRT1: INTERNAL_DAC1
  DDC reg: 0x60
II) RADEON(0): I2C device "VGA-0:ddc2" registered at address 0xA0.
(II) RADEON(0): EDID vendor "ENC", prod id 5653
(II) RADEON(0): Using EDID range info for horizontal sync
(II) RADEON(0): Using EDID range info for vertical refresh
(II) RADEON(0): Printing DDC gathered Modelines:
(II) RADEON(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz)

(以下しばらく解像度)

(II) RADEON(0): Modeline "1600x1200"x0.0  202.50  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync (93.8 kHz)
(II) RADEON(0): Output: VGA-0, Detected Monitor Type: 1
(II) RADEON(0): EDID data from the display on output: VGA-0 ----------------------
(II) RADEON(0): Manufacturer: ENC  Model: 1615  Serial#: 1886715969
(II) RADEON(0): Year: 2001  Week: 15
(II) RADEON(0): EDID Version: 1.1
(II) RADEON(0): Analog Display Input,  Input Voltage Level: 0.700/0.300 V
(II) RADEON(0): Sync:  Separate  Composite  SyncOnGreen
(II) RADEON(0): Max Image Size [cm]: horiz.: 32  vert.: 24
(II) RADEON(0): Gamma: 1.80
(II) RADEON(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display
(II) RADEON(0): redX: 0.625 redY: 0.338   greenX: 0.281 greenY: 0.602
(II) RADEON(0): blueX: 0.149 blueY: 0.073   whiteX: 0.283 whiteY: 0.297
(II) RADEON(0): Supported established timings:
(II) RADEON(0): 720x400@70Hz
(II) RADEON(0): 720x400@88Hz
(II) RADEON(0): 640x480@60Hz
(II) RADEON(0): 640x480@67Hz
(II) RADEON(0): 640x480@72Hz
(II) RADEON(0): 640x480@75Hz
(II) RADEON(0): 800x600@56Hz
(II) RADEON(0): 800x600@60Hz
(II) RADEON(0): 800x600@72Hz
(II) RADEON(0): 800x600@75Hz
(II) RADEON(0): 832x624@75Hz
(II) RADEON(0): 1024x768@87Hz (interlaced)
(II) RADEON(0): 1024x768@60Hz
(II) RADEON(0): 1024x768@70Hz
(II) RADEON(0): 1024x768@75Hz
(II) RADEON(0): 1280x1024@75Hz
(II) RADEON(0): 1152x864@75Hz
(II) RADEON(0): Manufacturer's mask: 0
(II) RADEON(0): Supported standard timings:
(II) RADEON(0): #0: hsize: 800  vsize 600  refresh: 85  vid: 22853

(以下しばらく画面サイズ)

(II) RADEON(0): #7: hsize: 1600  vsize 1200  refresh: 75  vid: 20393
(II) RADEON(0): Serial No: 70750041
(II) RADEON(0): Ranges: V min: 50 V max: 160 Hz, H min: 30 H max: 96 kHz, PixClock max 210 MHz
(II) RADEON(0): Monitor name: T561
(II) RADEON(0):
(II) RADEON(0): EDID (in hex):
(II) RADEON(0):         00ffffffffffff0015c3151641007570
(II) RADEON(0):         0f0b01010e201850e82078a056489a26
(II) RADEON(0):         12484cffff80455961596168714f7159
(II) RADEON(0):         8199a945a94f000000ff003730373530
(II) RADEON(0):         3034310a20202020000000fd0032a01e
(II) RADEON(0):         6015000a202020202020000000fc0054
(II) RADEON(0):         3536310a2020202020202020000000fe
(II) RADEON(0):         000a2020202020202020202020200013
finished output detect: 0
finished all detect
(II) RADEON(0): EDID vendor "ENC", prod id 5653
(II) RADEON(0): Using hsync ranges from config file
(II) RADEON(0): Using vrefresh ranges from config file
(II) RADEON(0): Printing DDC gathered Modelines:
(II) RADEON(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz)

(略)

(II) RADEON(0): Modeline "1600x1200"x0.0  202.50  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync (93.8 kHz)
(II) RADEON(0): Output: VGA-0, Detected Monitor Type: 1
(II) RADEON(0): EDID data from the display on output: VGA-0 ----------------------
(II) RADEON(0): Manufacturer: ENC  Model: 1615  Serial#: 1886715969
(II) RADEON(0): Year: 2001  Week: 15
(II) RADEON(0): EDID Version: 1.1
(II) RADEON(0): Analog Display Input,  Input Voltage Level: 0.700/0.300 V
(II) RADEON(0): Sync:  Separate  Composite  SyncOnGreen
(II) RADEON(0): Max Image Size [cm]: horiz.: 32  vert.: 24
(II) RADEON(0): Gamma: 1.80
(II) RADEON(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display
(II) RADEON(0): redX: 0.625 redY: 0.338   greenX: 0.281 greenY: 0.602
(II) RADEON(0): blueX: 0.149 blueY: 0.073   whiteX: 0.283 whiteY: 0.297
(II) RADEON(0): Supported established timings:
(II) RADEON(0): 720x400@70Hz
(II) RADEON(0): 1152x864@75Hz
(II) RADEON(0): Manufacturer's mask: 0
(II) RADEON(0): Supported standard timings:
(II) RADEON(0): #0: hsize: 800  vsize 600  refresh: 85  vid: 22853


(略)

(II) RADEON(0): #7: hsize: 1600  vsize 1200  refresh: 75  vid: 20393
(II) RADEON(0): Serial No: ごにょごにょ
(II) RADEON(0): Ranges: V min: 50 V max: 160 Hz, H min: 30 H max: 96 kHz, PixClock max 210 MHz
(II) RADEON(0): Monitor name: T561


Visual C++ 2005 Express (いまさら)

You must register your software within 30 days.


プロジェクト
ソリューションのディレクトリ作成

Win32 コンソールモード で練習

プリコンパイル済みヘッダーのチェックをON

C言語 main関数から Visual C++では _tmain関数からで{}内にソースを記述
Cのコメントは/*~*/で囲んで記述、改行可
C++はコメント行の先頭に//記号を記述し行末(改行)まで/1行単位
C++の処理系でCのソースを使う場合に//形式のC++コメントを使用可


プリプロセッサ指令/ディレクティブ
#記号で始まる命令はコンパイラに渡されるCの命令ではない。コンパイラ以前にソースコードを処理するプリプロセッサへの命令
https://www.grapecity.com/tools/support/powernews/column/clang/002/page03.htm




A heated argument

It is beyond argument that ...

知識も技術も欠落している...ということは議論の余地が無い、とでも書いた方がいいかもしれない。

device.hint の編集の後のportsからのインストール中で、WDMとgetty。iUNBOUNDとLDNS、pfw、Xfce、ZFS ... 全て欠落しているということは議論の余地が無い。


この機材で X Windows が使用できない場合、まぁ相応の機材として使うほかないか。


デフォルトコンパイラがGCC-->LLVM Clang は10.0の話

NetMap

以上、分相応でないどころか妄言にも近いザマの元ネタは後藤氏。
http://news.mynavi.jp/special/2013/bsd/005.html



It took only two days to suppress the rebellion.鎮圧、発禁、廃止、かみ殺し(す)、抑制。


Cairo
http://ja.wikipedia.org/wiki/Cairo

ぐぬーむ
http://ja.wikipedia.org/wiki/GNOME


NetMapとInfiniBand




2014年3月12日水曜日

device.hintsを編集してX導入の試み

カーネルではvgapci0を無かったことにできないので、/boot/device.hintsでvgapci.0.disable="1"とagp.0.disable="1"を追記。 あるいは、vgapci.0.disable="0" を明示的に書き込んでおけばよかったか。でもビデオカードを2つ使用している状態はサポートしていないのは明らかで、何を設定したところで正しいも誤っているもないのだが。


今度はループ

 X11で make install clean の後、 libxmlの1.6.7(?)をインストールする過程で1.8.0(?)を検出した後、ループ。

? メモをしないバカ者

Ctrl+cで中断、/usr/ports/textpro/libxmlで make install cleanを叩いてみるも***なので


 *** メモどころかろくに読みさえしなかった大ウツケ者

 make install

としたところ動いたので、この終了後に再びx11でmake install clean を叩いたところ、次のエラー。



gmake[1]: Entering directory '/usr/ports/textproc/libxslt/work/libxslt-1.1.28/libxslt'
gmake[1]: *** No rule to make target 'install'. Stop.
gmake[1]: Leaving directory '/usr/ports/textproc/libxslt/work/libxslt-1.1.28/libxslt'
gmake[1]: *** [install-recursive] Error 1
*** Error code 2

Stop in /usr/ports/textproc/libxslt.
*** Error code 1

Stop in /usr/ports/textproc/libxslt.
*** Error code 1

Stop in /usr/ports/x11/libxcb.
*** Error code 1

Stop in /usr/ports/x11/libX11.
*** Error code 1

Stop in /usr/ports/x11-toolkits/libXt.
*** Error code 1

Stop in /usr/ports/trapproto.
*** Error code 1

Stop in /usr/ports/x11-servers/xorg-vfbserver.
*** Error code 1

Stop in /usr/ports/x11-servers/xorg-vfbserver.
*** Error code 1

Stop in /usr/ports/accessibility/accerciser.
*** Error code 1

Stop in /usr/ports/accessibility.
*** Error code 1

Stop in /usr/ports/.

#


性懲りも無く再度x11からmake install cleanを叩くと今度は少し内容が変わって

gmake[1]: Entering directory '/usr/ports/textproc/libxslt/work/libxslt-1.1.28/libxslt'
gmake[1]: *** No rule to make target 'install'. Stop.
gmake[1]: Leaving directory '/usr/ports/textproc/libxslt/work/libxslt-1.1.28/libxslt'
gmake[1]: *** [install-recursive] Error 1
*** Error code 2

Stop in /usr/ports/textproc/libxslt.
*** Error code 1

Stop in /usr/ports/textproc/libxslt.
*** Error code 1

Stop in /usr/ports/x11/libxcb.
*** Error code 1

Stop in /usr/ports/x11/libX11.
*** Error code 1

Stop in /usr/ports/graphics/imlib2.
*** Error code 1

Stop in /usr/ports/graphics/imlib2.
*** Error code 1

Stop in /usr/ports/x11/3ddesktop.
*** Error code 1

Stop in /usr/ports/x11.

#

ハードやソフトがループでなくて、私が見当違いにループ。






2014年3月11日火曜日

何度目だナウシカ

くりーんいんすとーる、かれこれ5回、いや6回か。

結局、i810EのMTRRのエラーを解消できそうにないので、ATIでこれを試す。

カーネルでAGPを殺し、device.hintsでvgapci0.0と0.1をdisableに、loder.confでload=no。何がどこまで有効かそうでないかはサッパリわからないが、これでxをportsから突っ込んでcard0の問題が解消しない場合、次はちょっとどうしたものか。

UNIXの正規表現

ド素人がWikipediaを読んで、学び始める前の曖昧なきっかけをつかむかもしれない程度。

正規表現とは、ギョーカイ用語で文字列の省略表記とこの解釈、ということのようで。

Basic Regular Expression
grepやsedなどの、UNIXのユーティリティのデフォルトらしい。

リテラルとメタ

リテラルは見たそのまま 文字は文字 文字以外の機能を示さない扱い
メタは何らかの機能を意味する 言葉としては高次の(ナニナニ) 他の文字のための何らかの別の意味を持つ



. 任意の一文字
 .at hat、cat、bat


[ ] 括弧内に含まれる一文字

 [abc] a、b、c
 [hc]at hat、cat


- 括弧内の最初か最後にあるときはリテラル
  そうでないときはメタ

 リテラル扱い
 [abc-]  a、b 、c 、-
 [-abc] 同じ

 メタ扱い
 [a-z] 全ての小文字
 [abcq-z] a、b、c、q、r、s、t、u、v、w、x、y、z
 [a-cq-z] 同様


尚 [ の記号そのもの、]の記号そのものについては、囲んでいる括弧内で  [ 記号、 ] 記号を先に書く。

 [][ab] と書けば  ]の記号、[の記号、a、b の4つの文字のうち1文字

 敢えて不正確に書くなら [ ],[,a,b, ] ということ


[^ ] 括弧内に含まれない一文字

 [^abc] a、b、c 以外の任意の一文字
    [^b]at bat 以外の .at でマッチする全ての文字列
 [^a-z]  小文字以外の任意の一文字
 混用可能


^ 行の最初にマッチ
$ 行の最後にマッチ

    ^[hc]at 行の冒頭である場合のみ hat と cat にマッチ
    [hc]at$ 行の末尾である場合のみ hat と cat にマッチ


\( \) 後に呼び出し重複利用するための記号

\n  1から9までの数をメタとして利用
   \( \) で囲まれた部分の0回以上の繰り返し

独自解釈: 0回ではそもそも書く意味がないので実質1回以上、ただし無視してもいい、ということか!?

*   直前の文字を0回以上の繰り返し
 []と組み合わせると複雑な表現に
 [xyz]* x、y、zx、zyx ・・・など

さらにこれらを組み合わせると

 \(a.\)c\1* abcab、abcabab ・・・様々な可能性がある一方で abcac ではない

 これを1文字ずつ改行して並べると
 1文字目はa
 2文字目は.なので任意の一文字
 3文字目はc

 そして4文字目に相当する正規表現は\1なので
 a.を1回繰り返す
 必然的に4文字目のみならず5文字目を記述することになる

 6文字目は*
 これは直前の文字の繰り返しだが
 *の直前の文字に相当する正規表現は\1なので
 a. の0回以上の繰り返しになる


尚、\(* と \)* という表現がもしあったとしても、*は無効。



POSIX


MTRRのエラーの解消(になるはず)


IBMのこちら
http://www-01.ibm.com/support/docview.wss?uid=pcd1migr-39442

これでもエラーが消えないのでどうにも困ったもの。

DRIは明示的に "False" にすれば、エラーは消える。(logにはdisableと明示される)

ところがMTRRは、offでもfalseでもFalseでも変わらない。~/.xinitrc を介せば問題を回避できそうな記述も見かけたが、この構成には /X11以下はconfひとつしかないのでcpもできない。そもそも、まだこのファイルの意味さえ理解していない。Xorgの再インストールを考え、packageで繰り返すのも難なので ports の利用を考えたが、ここでさらに落とし穴が。


Portsnap

sysinstall で コレクションをぶちこんだ方がマシ。



千里の道は千里なりに。


尚、i810Eを捨てるという解決策は、考えないでもない。





ビデオボードの構成変更後のやり直し

ビデオボードを外すついでにシリアルポート、パラレルポートをBIOS上で非動作とする。

Stadardで導入開始、ディスクの設定はSWAPを約1GB、/varを約3G、/tmpを約800MB、残り8Gほどを/usrへ。

ディストリビューションはカーネルとソースはチェックするも、ほかは・・・カーネル再構築にソース全てを要求されたことは覚えているが他の条件はなんだったか、記憶が定かでない。メモを取らないからだ。とりあえず英語版以外のドキュメントとmanのチェックは外した。このPCの画面を通じて読んでもしかたがない。

ネットワークの最低限の設定、ネットワーク関連のサービスはsshdのみ。

/etc/rc.conf

sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"

dmesg を見ると、

vgapci0: <VGA-compatible display> mem 0x80000000-0xfbffffff,0xfe980000-0xfe9fffff at device 1.0 on pci0

そして

agp0: <Intel 810E (i810E GMCH) SVGA controller> on vgapci0
agp0: aperture size is 64M

と、見えている。on vgapci0。

カーネルの再構築前に dmesg の出力を整理したいので、sshdのアクセスを設定。

/etc/ssh/sshd_config

Port22
Protocol 2
PermitRootLogin no
PasswordAuthentication yes
PermitEmptyPasswords no
AllowUsers daredare
sshdサービスの再起動

ps -a | grep sshd

/bin/kill -s HUP (PID)



dmesg

cd /usr/src/sys/i386/conf 
cp GENERIC MYKERNEL



ハンドブックの6.4.3に記されている agp
http://www.freebsd.org/doc/ja/books/handbook/x-config.html

このカーネルには記述がある。目的からは脱線するがSCSI関連ほかの明らかに無用な要素をコメントアウトしてカーネルを再構築する。
 
cd /usr/src
make buildkernel KERNCONF=MYKERNEL



umassのscbus依存のコメントアウトを忘れた。やり直し。orz

やり直して、
make installkernel KERNCONF=MYKERNEL

dmesg

本題とは関係の無い作業は終了。

# cat /var/log/Xorg.0.log

X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 8.4-RELEASE i386
Current Operating System: FreeBSD netvista 8.4-RELEASE FreeBSD 8.4-RELEASE #0 r251259: Mon Jun  3 01:14:28 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386
Build Date: 17 April 2013  03:34:39PM

Current version of pixman: 0.24.2
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Mar 11 00:38:25 2014
(++) Using config file: "xorg.conf.new"
(==) ServerLayout "X.org Configured"
(**) |-->Screen "Screen0" (0)
(**) |   |-->Monitor "Monitor0"
(**) |   |-->Device "Card0"
(**) |-->Input Device "Mouse0"
(**) |-->Input Device "Keyboard0"
(==) Automatically adding devices
(==) Automatically enabling devices
(**) FontPath set to:
        /usr/local/lib/X11/fonts/misc/,
        /usr/local/lib/X11/fonts/TTF/,
        /usr/local/lib/X11/fonts/OTF,
        /usr/local/lib/X11/fonts/Type1/,
        /usr/local/lib/X11/fonts/100dpi/,
        /usr/local/lib/X11/fonts/75dpi/,
        /usr/local/lib/X11/fonts/misc/,
        /usr/local/lib/X11/fonts/TTF/,
        /usr/local/lib/X11/fonts/OTF,
        /usr/local/lib/X11/fonts/Type1/,
        /usr/local/lib/X11/fonts/100dpi/,
        /usr/local/lib/X11/fonts/75dpi/
(**) ModulePath set to "/usr/local/lib/xorg/modules"
(WW) AllowEmptyInput is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
(WW) Disabling Mouse0
(WW) Disabling Keyboard0
(II) Loader magic: 0x81dfd00
(II) Module ABI versions:
        X.Org ANSI C Emulation: 0.4
        X.Org Video Driver: 6.0
        X.Org XInput driver : 7.0
        X.Org Server Extension : 2.0
(--) Using syscons driver with X support (version 2.0)
(--) using VT number 9

(--) PCI:*(0:0:1:0) 8086:7125:1014:01b0 Intel Corporation 82810E DC-133 (CGC) Chipset Graphics Controller rev 3, Mem @ 0xf8000000/67108864, 0xfe980000/524288, BIOS @ 0x????????/65536
(II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
(II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
(II) "glx" will be loaded. This was enabled by default and also specified in the config file.
(II) "record" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri" will be loaded by default.
(II) "dri2" will be loaded by default.
(II) LoadModule: "dbe"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdbe.so
(II) Module dbe: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 1.0.0
        Module class: X.Org Server Extension
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "extmod"
(II) Loading /usr/local/lib/xorg/modules/extensions/libextmod.so
(II) Module extmod: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 1.0.0
        Module class: X.Org Server Extension
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-DGA
(II) Loading extension DPMS
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "record"
(II) Loading /usr/local/lib/xorg/modules/extensions/librecord.so
(II) Module record: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 1.13.0
        Module class: X.Org Server Extension
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension RECORD
(II) LoadModule: "glx"
(II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 1.0.0
        ABI class: X.Org Server Extension, version 2.0
(==) AIGLX disabled
(II) Loading extension GLX
(II) LoadModule: "dri"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri.so
(II) Module dri: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 1.0.0
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension XFree86-DRI
(II) LoadModule: "dri2"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri2.so
(II) Module dri2: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 1.1.0
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DRI2
(II) LoadModule: "intel"
(II) Loading /usr/local/lib/xorg/modules/drivers/intel_drv.so
(II) Module intel: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 2.7.1
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 6.0
(II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
        i810-dc100, i810e, i815, i830M, 845G, 852GM/855GM, 865G, 915G,
        E7221 (i915), 915GM, 945G, 945GM, 945GME, IGD_GM, IGD_G, 965G, G35,
        965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
        Mobile Intelツョ GM45 Express Chipset,
        Intel Integrated Graphics Device, G45/G43, Q45/Q43, G41
(II) Primary Device is: PCI 00@00:01:0
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
(II) Loading sub module "vgahw"
(II) LoadModule: "vgahw"
(II) Loading /usr/local/lib/xorg/modules/libvgahw.so
(II) Module vgahw: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 0.1.0
        ABI class: X.Org Video Driver, version 6.0
(II) intel(0): Creating default Display subsection in Screen section
        "Screen0" for depth/fbbpp 16/16
(==) intel(0): Depth 16, (==) framebuffer bpp 16
(==) intel(0): RGB weight 565
(==) intel(0): Default visual is TrueColor
(**) intel(0): Option "DRI" "True"
(II) Loading sub module "xaa"
(II) LoadModule: "xaa"
(II) Loading /usr/local/lib/xorg/modules/libxaa.so
(II) Module xaa: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 1.2.1
        ABI class: X.Org Video Driver, version 6.0
(II) Loading sub module "vbe"
(II) LoadModule: "vbe"
(II) Loading /usr/local/lib/xorg/modules/libvbe.so
(II) Module vbe: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 1.1.0
        ABI class: X.Org Video Driver, version 6.0
(II) Loading sub module "int10"
(II) LoadModule: "int10"
(II) Loading /usr/local/lib/xorg/modules/libint10.so
(II) Module int10: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 1.0.0
        ABI class: X.Org Video Driver, version 6.0
(II) intel(0): initializing int10
(==) intel(0): Write-combining range (0xa0000,0x20000) was already clear
(==) intel(0): Write-combining range (0xc0000,0x40000) was already clear
(II) intel(0): Primary V_BIOS segment is: 0xc000
(==) intel(0): Write-combining range (0x0,0x1000) was already clear
(II) intel(0): VESA BIOS detected
(II) intel(0): VESA VBE Version 2.0
(II) intel(0): VESA VBE Total Mem: 1024 kB
(II) intel(0): VESA VBE OEM: Intel810(TM) Graphics Chip Accelerated VGA BIOS
(II) intel(0): VESA VBE OEM Software Rev: 3.1
(II) intel(0): VESA VBE OEM Vendor: Intel Corporation
(II) intel(0): VESA VBE OEM Product: i810 Graphics Controller
(II) intel(0): VESA VBE OEM Product Rev: Hardware Version 0.0
(II) Loading sub module "ddc"
(II) LoadModule: "ddc"
(II) Module "ddc" already built-in
(II) intel(0): VESA VBE DDC supported
(II) intel(0): VESA VBE DDC Level 2
(II) intel(0): VESA VBE DDC transfer in appr. 1 sec.
(II) intel(0): VESA VBE DDC read successfully
(II) intel(0): Manufacturer: ENC  Model: 1615  Serial#: 1886715969
(II) intel(0): Year: 2001  Week: 15
(II) intel(0): EDID Version: 1.1
(II) intel(0): Analog Display Input,  Input Voltage Level: 0.700/0.300 V
(II) intel(0): Sync:  Separate  Composite  SyncOnGreen
(II) intel(0): Max Image Size [cm]: horiz.: 32  vert.: 24
(II) intel(0): Gamma: 1.80
(II) intel(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display
(II) intel(0): redX: 0.625 redY: 0.338   greenX: 0.281 greenY: 0.602
(II) intel(0): blueX: 0.149 blueY: 0.073   whiteX: 0.283 whiteY: 0.297
(II) intel(0): Supported established timings:
(II) intel(0): 720x400@70Hz
(II) intel(0): 720x400@88Hz
(II) intel(0): 640x480@60Hz
(II) intel(0): 640x480@67Hz
(II) intel(0): 640x480@72Hz
(II) intel(0): 640x480@75Hz
(II) intel(0): 800x600@56Hz
(II) intel(0): 800x600@60Hz
(II) intel(0): 800x600@72Hz
(II) intel(0): 800x600@75Hz
(II) intel(0): 832x624@75Hz
(II) intel(0): 1024x768@87Hz (interlaced)
(II) intel(0): 1024x768@60Hz
(II) intel(0): 1024x768@70Hz
(II) intel(0): 1024x768@75Hz
(II) intel(0): 1280x1024@75Hz
(II) intel(0): 1152x864@75Hz
(II) intel(0): Manufacturer's mask: 0
(II) intel(0): Supported standard timings:
(II) intel(0): #0: hsize: 800  vsize 600  refresh: 85  vid: 22853
(II) intel(0): #1: hsize: 1024  vsize 768  refresh: 85  vid: 22881
(II) intel(0): #2: hsize: 1024  vsize 768  refresh: 100  vid: 26721
(II) intel(0): #3: hsize: 1152  vsize 864  refresh: 75  vid: 20337
(II) intel(0): #4: hsize: 1152  vsize 864  refresh: 85  vid: 22897
(II) intel(0): #5: hsize: 1280  vsize 1024  refresh: 85  vid: 39297
(II) intel(0): #6: hsize: 1600  vsize 1200  refresh: 65  vid: 17833
(II) intel(0): #7: hsize: 1600  vsize 1200  refresh: 75  vid: 20393
(II) intel(0): Serial No: 70750041
(II) intel(0): Ranges: V min: 50 V max: 160 Hz, H min: 30 H max: 96 kHz, PixClock max 210 MHz
(II) intel(0): Monitor name: T561
(II) intel(0):
(II) intel(0): EDID (in hex):
(II) intel(0):  00ffffffffffff0015c3151641007570
(II) intel(0):  0f0b01010e201850e82078a056489a26
(II) intel(0):  12484cffff80455961596168714f7159
(II) intel(0):  8199a945a94f000000ff003730373530
(II) intel(0):  3034310a20202020000000fd0032a01e
(II) intel(0):  6015000a202020202020000000fc0054
(II) intel(0):  3536310a2020202020202020000000fe
(II) intel(0):  000a2020202020202020202020200013
(II) intel(0): EDID vendor "ENC", prod id 5653
(II) intel(0): Using hsync ranges from config file
(II) intel(0): Using vrefresh ranges from config file
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz)
(II) intel(0): Modeline "800x600"x0.0   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz)
以下同じようなが延々と続くので中略です。
(II) intel(0): Modeline "1600x1200"x0.0  202.50  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync (93.8 kHz)
(==) intel(0): Write-combining range (0x0,0x1000) was already clear
(--) intel(0): Chipset: "i810e"
(--) intel(0): Linear framebuffer at 0xF8000000
(--) intel(0): IO registers at addr 0xFE980000
(II) intel(0): Kernel reported 52224 total, 0 used
(II) intel(0): I810CheckAvailableMemory: 208896k available
(==) intel(0): Will alloc AGP framebuffer: 24576 kByte
(==) intel(0): Using gamma correction (1.0, 1.0, 1.0)
(II) intel(0): Monitor0: Using hsync range of 30.00-96.00 kHz
(II) intel(0): Monitor0: Using vrefresh range of 50.00-160.00 Hz
(II) intel(0): Monitor0: Using maximum pixel clock of 210.00 MHz
(II) intel(0): Estimated virtual size for aspect ratio 1.3333 is 1600x1200
(II) intel(0): Clock range:   9.50 to 163.00 MHz
(II) intel(0): Not using default mode "320x175" (bad mode clock/interlace/doublescan)
以下も同じような記述が延々と続くので(中略)
(II) intel(0): Not using driver mode "1600x1200" (bad mode clock/interlace/doublescan)
(--) intel(0): Virtual size is 1600x1200 (pitch 1600)
(**) intel(0): *Default mode "1600x1200": 162.0 MHz, 75.0 kHz, 60.0 Hz
(II) intel(0): Modeline "1600x1200"x60.0  162.00  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync (75.0 kHz)
以下またしても同じような記述が(中略)
(**) intel(0): *Default mode "640x350": 31.5 MHz, 37.9 kHz, 85.1 Hz
(II) intel(0): Modeline "640x350"x85.1   31.50  640 672 736 832  350 382 385 445 +hsync -vsync (37.9 kHz)
(**) intel(0): Display dimensions: (320, 240) mm
(**) intel(0): DPI set to (127, 127)
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/local/lib/xorg/modules/libfb.so
(II) Module fb: vendor="X.Org Foundation"
        compiled for 1.7.7, module version = 1.0.0
        ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "ramdac"
(II) LoadModule: "ramdac"
(II) Module "ramdac" already built-in
(**) intel(0): page flipping disabled
(II) intel(0): XvMC is Disabled: use XvMCSurfaces config option to enable.
(II) Loading sub module "dri"
(II) LoadModule: "dri"
(II) Reloading /usr/local/lib/xorg/modules/extensions/libdri.so
drmOpenDevice: node name is /dev/dri/card0
Failed to change owner or group for file /dev/dri! 2: No such file or directory
Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
drmOpenDevice: open result is -1, (No such file or directory)
Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
drmOpenDevice: node name is /dev/dri/card0
Failed to change owner or group for file /dev/dri! 2: No such file or directory
Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
drmOpenDevice: open result is -1, (No such file or directory)
Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
[drm] failed to load kernel module "i810"
(EE) [drm] drmOpen failed.
(EE) intel(0): [dri] DRIScreenInit failed.  Disabling DRI.
(II) intel(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000
(==) intel(0): Write-combining range (0xa0000,0x10000) was already clear
(II) intel(0): Setting dot clock to 162.0 MHz [ 0x19 0x6 0x10 ] [ 27 8 1 ]
(II) intel(0): chose watermark 0x22416000: (tab.freq 162.0)
(II) intel(0): xf86BindGARTMemory: bind key 21 at 0x00000000 (pgoffset 0)
(II) intel(0): xf86BindGARTMemory: bind key 22 at 0x01800000 (pgoffset 6144)
(II) intel(0): xf86BindGARTMemory: bind key 23 at 0x01c00000 (pgoffset 7168)
(II) intel(0): Allocated of 4096 bytes for HW cursor
(II) intel(0): xf86BindGARTMemory: bind key 24 at 0x01c01000 (pgoffset 7169)
(II) intel(0): Allocated of 16384 bytes for ARGB HW cursor
(II) intel(0): Adding 384 scanlines for pixmap caching
(II) intel(0): Allocated Scratch Memory
(II) intel(0): Using XFree86 Acceleration Architecture (XAA)
        Screen to screen bit blits
        Solid filled rectangles
        8x8 mono pattern filled rectangles
        Indirect CPU to Screen color expansion
        Solid Horizontal and Vertical Lines
        Setting up tile and stipple cache:
                20 128x128 slots
                4 256x256 slots
(==) intel(0): Backing store disabled
(==) intel(0): Silken mouse enabled
(**) intel(0): DPMS enabled
(WW) intel(0): Direct rendering disabled(==) RandR enabled
(II) Initializing built-in extension Generic Event Extension
(II) Initializing built-in extension SHAPE
(II) Initializing built-in extension MIT-SHM
(II) Initializing built-in extension XInputExtension
(II) Initializing built-in extension XTEST
(II) Initializing built-in extension BIG-REQUESTS
(II) Initializing built-in extension SYNC
(II) Initializing built-in extension XKEYBOARD
(II) Initializing built-in extension XC-MISC
(II) Initializing built-in extension XINERAMA
(II) Initializing built-in extension XFIXES
(II) Initializing built-in extension RENDER
(II) Initializing built-in extension RANDR
(II) Initializing built-in extension COMPOSITE
(II) Initializing built-in extension DAMAGE
(II) AIGLX: Loaded and initialized /usr/local/lib/dri/swrast_dri.so
(II) GLX: Initialized DRISWRAST GL provider for screen 0
(II) intel(0): xf86UnbindGARTMemory: unbind key 21
(II) intel(0): xf86UnbindGARTMemory: unbind key 22
(II) intel(0): xf86UnbindGARTMemory: unbind key 23
(II) intel(0): xf86UnbindGARTMemory: unbind key 24
#


奇策としてこんな方法も拝見し、

https://forums.freebsd.org/viewtopic.php?&t=30004

助言を受けた人のこの様子が

Well, that's embarrassing.
It really did not look "right" but obviously I didn't know what "right" was supposed to look like!

I installed Xfce and all is right with the world.



ある意味たいへんごもっともなので、Xfce4のインストールに踏み切って(踏み外して)みたが、私は当惑しっぱなしです。


あるいは、エラーメッセージを超短絡的に解釈して、ファイルの属性変更でもしてみるか。
文字をろくに読んでいないことがまたしても露呈する。

 No such file or directory

そもそも存在しないので、属性を変更しようがない。はて!? OSから入れなおす前にはあったような記憶が?? そういう問題ではない。文字を読んでいるかいないかだ。