Vine Linux


DELL PC への Vine Linux のインストール

インストールの際、ドライバが見付からないと怒られたら、ブート時に以下のオプションを指定する。

boot:linux acpi=off

英字キーボードの設定になっているため、"="は"へ"のキーにて入力する。また、インストールの際、linux acpi=off とカーネルに渡す設定となるので、これを外す。

FAT32 のマウント

/etc/fstab に以下の行を追加(FAT32のパーテションが/dev/sda5の場合)

/dev/sda5 /mnt/data vfat noauto,user,codepage=932,iocharset=euc-jp 0 0

これにより、mount /mnt/data でマウント、umonut /mnt/data でアンマウントできる。

5ボタンマウス

/etc/X11/xorg.conf のマウスの設定部分を以下のように変更

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "ExplorerPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
        Option      "Emulate3Buttons" "no"
        Option      "Buttons" "9"
EndSection

その後 /etc/X11/xinit/Xmodmap.jp の最後に以下の行を追加。

pointer = 1 2 3 4 5 9 8 6 7 10 11 12 13

なお、各ボタンの返す値はxevにて確認できる。

Intel Fortran Compiler

展開されたディレクトリの中にあるdataディレクトリ以下のスクリプトinstall_fc.shの1456行め付近を以下のように編集する(Vine 3.2で,ifort 9.1.036以下のバージョンでは,この編集が必須であった)。

CMD=`type -pP $c 2>&1` ;

インストール直後には,コンパイラを利用することができません。利用前に設定スクリプトを実行する必要があります。ログイン時に,スクリプトを自動実行するには,設定ファイルを修正する必要があります。ホームディレクトリにある .bashrc というファイルの末尾に,以下の1文を追加します。

source /opt/intel/fc/9.1.037/bin/ifortvars.sh

これでコンパイラが利用可能になりました。なお,デバッガを使用する場合は,さらに別のスクリプトを実行します。

source /opt/intel/fc/9.1.037/bin/idbvars.sh

Intel® Math Kernel Library

インストール時には unset which, unset ls をしておく。これは昨今の Intel アプリケーションを Vine にインストールするときにいえることらしい。

インストール後は、Intel Fortran Compiler 同様、.bashrc というファイルの末尾に,以下の1文を追加します。

source /opt/intel/mkl/9.0/tools/environment/mklvars32.sh

lapack を使ったときのコンパイル例

ifort aho.f90 -L/opt/intel/mkl/9.0/lib/32 -lmkl -lmkl_lapack

ver.10 以降は

ifort main.o -L/opt/intel/mkl/10.0.1.014/lib/32 -lmkl -lmkl_lapack -lguide -lpthread

以下のような Makefile を作ると便利である

.SUFFIXES: .f90

a.out: e_self.o
	 ifort e_self.o -L/opt/intel/mkl/9.0/lib/32 -lmkl -lmkl_lapack

.f90.o:
	 ifort -c $<

複数ファイルをコンパイルする場合

.SUFFIXES: .f90

a.out: file1.o file2.o file3.o
	 ifort file1.o file2.o file3.o -L/opt/intel/mkl/9.0/lib/32 -lmkl -lmkl_lapack

.f90.o:
	 ifort -c $<

Adobe Reader

Adobe のダウンロードサイトから rpm ファイルをダウンロードします。 インストールします。

$ sudo rpm -Uvh AdobeReader_jpn-8.1.1-1.i486.rpm

起動してみます。

$ acroread &

以下のような、エラーが出ました。

error while loading shared libraries: libstdc++.so.6: cannot handle TLS data

このエラーは、Vine Linux ではおなじみのエラーです。 まず、libstdc++34 がインストールされているか確認します。

    $ rpm -q libstdc++34
    libstdc++34-4.0.2-0vl3

もし、

    $ rpm -q libstdc++34
    パッケージ libstdc++34 はインストールされていません。

なら、パッケージをインストールしましょう。

$ sudo apt-get install libstdc++34

起動ファイルに libstdc++.so.6 をあらかじめ読ませるように、

$ sudo vi /opt/Adobe/Reader8/bin/acroread

で acroread ファイルを開き、最初の方の適当な位置に

export LD_PRELOAD=/usr/lib/libstdc++.so.6

と追加しておきます。

   $ acroread &

今度は起動するはずです。 起動したら、

    HTML レンダリングライブラリ(libgtkembedmoz)が見つかり
    ません。編集/環境設定/インターネットを選択してフォルダの
    場所を指定してください。

と警告がでます。

    $ sudo find / -name "libgtkembedmoz*" -print

    /usr/lib/thunderbird-2.0/libgtkembedmoz.so
    /usr/lib/firefox-2.0/libgtkembedmoz.so
    /usr/lib/kompozer/libgtkembedmoz.so

ということなので、編集/環境設定/インターネットを選択して

/usr/lib/firefox-2.0/

と選択しておきます。

Ngraph

Synaptic のリポジトリの設定でセクションを変更し、以下のように extras を追加。

main plus updates nonfree extras

その後 apt-get でインストール。

このまま使用しても、文字入力がうまくいかない。 Vine はデフォルトで xfs をブート時に起動しないので、以下のコマンドを実行する。

/sbin/chkconfig --level 4 xfs on
/sbin/chkconfig --level 5 xfs on

auctex

apt-get でインストール。

Vine 4.0 の標準設定では、拡張子が .tex のファイルを emacs で開くとやてふが起動するようになっている。これは、Vine 4.0 の標準の .emacs.el で

(setq auto-mode-alist
      (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))

と書かれているためである。 この設定を上書きしてやれば auctex が動作するようになるので、.emacs.my.el を作成し、

;;; AUCTeX用の設定
;;;(load "auctex.el" nil t t)
(load "tex-site.el" nil t t)
(setq auto-mode-alist
      (cons (cons "\\.tex$" 'japanese-latex-mode) auto-mode-alist))
(setq TeX-default-mode 'japanese-latex-mode)
(setq japanese-TeX-command-default "pTeX")
(setq japanese-LaTeX-command-default "pLaTeX")
(setq japanese-LaTeX-default-style "jsarticle")

と記述。上記の設定で、(load "auctex.el" nil t t) がコメント (;) になっているが、これは、もともとは auctex (現段階で)最新版の ver. 11.84 用の設定をコピーしたため。 Vine 4.0 の auctex は auctex.el を持たないので、ちょっと修正してある。

Firefoxプラグイン

AdobeReader?

以下のコマンドで、Firefoxのプラグインディレクトリにプラグインを追加。

$ cd /usr/lib/firefox-2.0/plugins
$ sudo ln -s /usr/local/Adobe/Acrobat7.0/Browser/intellinux/nppdf.so

OpenOffice?

以下のコマンドで、Firefoxのプラグインディレクトリにプラグインを追加。

$ cd /usr/lib/firefox-2.0/plugins
$ sudo ln -s /usr/lib/openoffice.org2.0/program/libnpsoplugin.so

ホームディレクトリに移動し ~/.mozila/firefox にある pluginreg.dat を以下のように編集(Firefoxは閉じておく)

OpenOffice.org Plug-in handles all its documents:$
OpenOffice.org Plug-in:$
33
0:application/vnd.stardivision.calc:StarCalc 3.0 - 5.0:sdc:$
1:application/vnd.stardivision.chart:StarChart 3.0 - 5.0:sds:$
(中略)
28:application/vnd.oasis.opendocument.presentation-template:OpenDocument Presentation Template:otp:$
29:application/vnd.oasis.opendocument.formula:OpenDocument Formula:odf:$
30:application/msword:Microsoft Word Document:doc:$
31:application/vnd.ms-excel:Microsoft Excel Worksheet:xls:$
32:application/vnd.ms-powerpoint:Microsoft PowerPoint Presentation:ppt:$

DHCPクライアントでIPアドレスを再取得

まず以下のコマンドで、IPアドレスを解放する

/sbin/dhcpcd -k

次にdhcpデーモンを実行

/sbin/dhcpcd -n -H eth0

一応、再起動

/sbin/service network restart

ヒストリー補間を賢くする

通常 ~/.inputrc に

"\C-n":history-search-forward
"\C-p":history-search-backward

と記述するらしいがうまくいかないので、~/.bashrc に以下のように記述

bind '"\C-p": history-search-backward'
bind '"\C-n": history-search-forward'

bash_completionによるTAB補完

Working more productively with bash 2.x/3.x ( http://www.caliban.org/bash/ ) からbash-completion-*.noarch.rpm をダウンロードしてインストールする。

$ su
# rpm -Uvh bash-completion-*.noarch.rpm

そして、.bashrc などに以下を追加

if [ -f /etc/profile.d/bash_completion.sh ]; then
    . /etc/profile.d/bash_completion.sh
fi

emacs で日本語検索

まず、C-s とすると以下のように表示される。

I-search:

その後、C-m とすると、以下のように表示が変わる。

Search:

検索する日本語を入力したら、C-s で検索できる。

最新の20件

2021-03-31 2020-06-09 2020-05-30 2019-12-02 2018-10-18 2018-07-05 2018-01-11 2015-12-07 2015-08-03 2015-07-20 2012-07-19 2012-06-30 2012-06-23 2012-01-25 2011-11-09 2011-11-08 2011-10-02

今日の1件

  • Vine Linux(1)

  • counter: 376
  • today: 1
  • yesterday: 0
  • online: 1