Top / CentOSにっき

もくじ

Cent OS7 でおえかきマシンを構築するよ. なるべく参考にしたページのアドレスを併記するようにしたいと思いますが, 漏れがあったらごめんなさい.

部品選定

お予算は10万円前後で.

CPUi7-479084w35151LGA1150
i7-4790s65w36480
motherGA-H97-HD3H979028
DDR3x4
PCIe x16 x2
PCIe x4 x1
PCIe x1 x2
PCI x2
SPDIF out
GA-H97-D3HH97
DDR3x4
PCIe x16 x1
PCIe x4 x1
PCIe x1 x2
PCI x3
SPDIF out
GA-Z97X-SLIZ9711556限定数完売
DDR3x4
SPDIF out
PCIe x16 x1
PCIe x8 x1
PCIe x1 x3
PCI x2
GA-Z97X-UD3H Z9715223
memAD3U1600W8G11-2DDR313871
1600 8Gx2
SSDIntel SSD 730 SSDSC2BP240G4R5240G19426
Intel SSD 530 SSDSC2BW240A401240G20352
casecoolmaster横置き8480tsukumo
Elite 361 RC-361-KKN1-JP
幅 150mm x
奥行き 368mm x
高さ 464mm
CPU クーラーの高さ:122mm まで
ビデオカードの長さ:
227mm まで(HDD ケージ搭載時)
312mm まで(HDD ケージ取り外し時)
前部:80mm ファン x 1(オプション)
後部:80mm ファン x 2(オプション)
上部:120mm ファン x 1
(90mm ファン x 1または
80mm ファン x 1 に換装可能)
左側面:120mm ファン x 1
または 90mm ファン x 1または
80mm ファン x 1(オプション)
SilverStone SST-GD10B横置き13912
Grandia SST-GD08B横置き21060
powerSF-500P14FGファンレス11556
500W
cpu coolerCoolMaster Xdream i1172297
CoolMaster Vortex PlusH83.5mm2993
RR-VTPS-28PK-R2
case fanDEEPCOOL Xfan 80 191
case fanDEEPCOOL Xfan 80 191
snd
合計103142

備考(選定基準とか):

selinux

  /etc/sysconfig/selinux

xfce

  yum install epel-release.noarch
  /etc/yum.conf
  group_package_types=default,mandatory
  yum --enablerepo=epel groups install Xfce
  yum groups install "X Window System"
  $ startxfce4

で起動確認

  yum install gdm

ランレベル変更

  $ sudo systemctl set-default graphical.target

theme

  http://xfce-look.org/content/show.php/Win3x?content=169112
  169112-win3x.tar.gz
  /usr/share/themes

にコピー

  settings -> window manager

で変更

ログアウト時にセッションを保存しない

  settings -> セッションと起動

これだけだったか自信がない...

英字配列

  /etc/vconsole.conf
  KEYPAM="us"

wget

  $ sudo yum install wget

vivaldi

  wget https://vivaldi.com/download/Vivaldi_TP3.1.0.162.9-1.x86_64.rpm
  $ sudo yum install lsb

あと,XcreenSaverかなにかを依存関係で追加したけど,忘れてしまいました.. 不足ファイルについては

yum provides "*.so" 

のようにして,提供パッケージを確認.

terminal

  xfce4-terminal

cifs

動作確認

  sudo mount.cifs \\\\10.0.0.1\\storage \
  /mnt/storage -o user=kosame

オートマウント

  fstab:
  //10.0.0.1/storage /mnt/storage/ cifs username=user,password=*  0 0

unzip

  $ sudo yum install unzip

uim

uimのskkが使いたいのです

yum localinstall で以下をインストール

  uim-1.8.6-6.fc22.x86_64.rpm
  uim-gtk2-1.8.6-6.fc22.x86_64.rpm
  eb-4.4.3-3.fc22.i686.rpm
  uim-gtk2-1.8.6-6.fc22.x86_64.rpm
  libskk-1.0.2-1.fc22.x86_64.rpm
  sudo yum install gtk2*
  sudo yum install gtk3*

uim設定

settings -> セッションと起動 -> 自動開始アプリケーションで, 以下を追加

  name: uim
  desc: uim
  command:
  /usr/bin/imsettings-switch uim.conf

もひとつ追加

  name: uim-toolbar
  desc: uim-toolbar
  command: /usr/bin/uim-toolbar-gtk

"入力メソッドのスターター"は無効にしておく.

caps->ctrl

settings -> セッションと起動 -> 自動開始アプリケーション で以下を追加

  name: CapsLock2Ctrl
  desc: CapsLock2Ctrl
  command: /usr/bin/setxkbmap -option -option 'ctrl:nocaps'

しかし,上記だとemacsでshiftも押されたみたいになっちゃう(表現しにくい..)& コンソールで有効でないので以下をためしてみる.

  http://lambdalisue.hatenablog.com/entry/2013/09/27/212118
  sudo mkdir -p /usr/share/keymaps
  sudo dumpkeys | head -1 | sudo tee /usr/share/keymaps/Caps2Ctrl.map

以下を追加する

  keycode 58    = Control      # CapsLock act as Ctrl
  ## keycode 29 = Caps_Lock    # Ctrl act as CapsLock
  ## alt_is_meta               # Fix the Alt key
  /etc/systemd/system
  sudo touch caps2ctrl.service
  [Unit]
  Type=simple
  Description=Caps2Ctrl
  After=network.target
  [Service]
  ExecStart=/usr/bin/loadkeys /usr/share/keymaps/Caps2Ctrl.map
  [Install]
  WantedBy=multi-user.target
  http://tire-retire.blogspot.jp/2014/12/centos7rclocal.html

有効化

  # systemctl enable caps2ctrl.service

開始

  # systemctl start caps2ctrl.service

上記に加えて,xでの対応が必要なのですが, ~/.xmodmaprc などを 使用した手法が,どうもうまくいかないのです.. スクリプトの起動はしているようなので,そのあとにuimが起動した際, 設定がちゃらになっていると予想しました.

そこで実験として,自動開始アプリケーションに,uim関連のプロセスが起動しきるのを 待ったあとで,xmodmapを実行するスクリプトを追加してみました.

結果として,期待どおりCapsLock->Ctrlが実現できました.

とりあえず所望のことが実現できたので,あまり考察はしてませんが...

なお,以下のスクリプトの ps で grep した結果の数の確認を, 3より大きいかどうかで判定しているのは,uim関連のプロセスと思われるものがが3つあったからです. (起動後にps aux | grep -i uim で調べただけですが..)

ついでに,GUIログイン直後にCapcLockを連打していると Capsが有効になった瞬間にコマンドが実行されて, ひどい目にあったりします(CapsLockが解除できなくなる..)

以下を作って,Settings -> セッションと起動にスクリプトを登録しました. chmod +x もわすれずに.

http://www.yukun.info/blog/2008/01/shell-script-kill-process.html

  ~/xmodmapAfterUim.sh
  #!/usr/bin/sh
  inter=2 #
  wait=5  #
  while true
  do
    isAliveSev=`ps aux | grep "uim" |
                grep -v grep | wc -l`
    if [ $isAliveSev -gt 3 ]; then
      echo "uim alive"
      xmodmap ~/.xmodmap
      exit
    else
      echo "no uim"
    fi
    sleep $inter
  done

emacs

  emacs-24.5.tar.xz
  patch-bgex_20150515_0-emacs-24.5.tar.xz

特に問題なくパッチがあたりました.

  ./configure --prefix=/opt/emacs-24.5
  make
  sudo make install

リポジトリ追加_nux-dextop,rpmforge

 sudo yum localinstall http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
 sudo yum localinstall http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

optsndout

  $ sudo yum install pulseaudio
  $ sudo yum install alsa-plugins-pulseaudio

mixer

  xfce4-mixer

SPDIFから出力したいと思います. まず,cat /proc/asound/cardsでカード番号を確認

次に,/etc/asound.confに以下を追記.

  pcm.!default {
       type hw
       card 1
       device 0
  }

参考 http://alsa.opensrc.org/DigitalOut

   aplay -L

の出力を眺めるのも楽しいです.

flash install, vlc

http://ufuso.jp/wp/?p=15419

yum -y --enablerepo=rpmforge install flash-plugin

vlc

ツール -> 設定 -> オーディオで,出力モジュール : ALSAオーディオ出力 を選択します. 使用可能な場合,S/PDIFを使用を有効化します. デバイスは,S/PDIFを選択します.

global

  global-6.2.12-4.fc21.x86_64.rpm

mewインストール

どっとこんふぃぎゃー

  ./configure --prefix=/opt/emacs-24.5/                 \
  --with-emacs=/opt/emacs-24.5/bin/emacs                \
  --with-elispdir=/opt/emacs-24.5/share/emacs/site-lisp \
  --with-etcdir=/opt/emacs-24.5/share/emacs/24.5/etc    \
  --localstatedir=/opt/emacs-24.5/var                   \
  --infodir=/opt/emacs-24.5/share/info                  \
  --mandir=/opt/emacs-24.5/share/man

けっか

 ***************************
  Mew configuration results
 ***************************
 
 use emacs             : /opt/emacs-24.5/bin/emacs
 elisp files should go : /opt/emacs-24.5/share/emacs/site-lisp/
 etc files should go   : /opt/emacs-24.5/share/emacs/24.5/etc
 exec files should go  : /opt/emacs-24.5/bin
 info files should go  : /opt/emacs-24.5/share/info
 man files should go   : /opt/emacs-24.5/share/man/man1
 

xclock

  yum install xclock
  xclock -bg gray -fg white -hd white -padding 0 -render -geometry 80x80+1920-0

コマンドでディスプレイをスタンバイにしたい

 http://www.xmisao.com/2014/02/17/how-to-pub-screen-into-standby-on-linux.html
 sleep 2; xset dpms force standby

ターミナルで実行する場合sleepを入れないと,(おそらく)xsetを入力したときの キー入力(RET)に反応してしまって,ディスプレイがOFF->ONとなってしまいました.

ThinkPad USB トラックポイントキーボード

http://www.mazn.net/blog/2012/07/01/778.html

スキャナ(GT-S630)

https://wiki.archlinuxjp.org/index.php/Sane

 sudo yum install xsane xsane-common xsane-gimp
 sudo yum install sane-backends-drivers-scanners

http://download.ebz.epson.net/dsc/search/01/search/searchModule

 iscan-2.30.1-1.usb0.1.ltdl7.x86_64.rpm
 iscan-data-1.36.0-1.noarch.rpm
 esci-interpreter-perfection-v330-0.2.0-1.x86_64.rpm
 $ scanimage -L
 device `epkowa:interpreter:003:007' is a Epson (unknown model) flatbed scanner

モデル名が"unknown model"となっていますが, sudo scanimage -Lしたら正しく表示されました.

 $ sudo scanimage -L
 device `epkowa:interpreter:003:007' is a Epson GT-S630 flatbed scanner

USBを挿抜したところ,一般ユーザーでもモデル名が表示されるようになりました. その状態で'xsane'コマンドを実行したところ,期待通り動作しました.

Intuos 4

Intuos4のホイールは誤爆しやすいわりに使う機会が少ないので無効にします.

# xsetwacom --version
0.23.0
# xsetwacom set "Wacom Intuos4 6x9 pad" AbsWheelDown  "0"
# xsetwacom set "Wacom Intuos4 6x9 pad" AbsWheelUp    "0"
# xsetwacom set "Wacom Intuos4 6x9 pad" AbsWheel2Down "0"
# xsetwacom set "Wacom Intuos4 6x9 pad" AbsWheel2Up   "0"

動作確認して意図通り動作したら,下記で自動化

# cat /etc/X11/xorg.conf.d/52-wacom-options.conf 

Section "InputClass"
    Identifier "Wacom Intuos4 6x9 pad options"
    MatchDriver "wacom"
    MatchProduct "pad"
    
    # Setting up buttons
    Option "AbsWheelUp"    "+0 "
    Option "AbsWheelDown"  "+0 "
    Option "AbsWheel2Up"   "+0 "
    Option "AbsWheel2Down" "+0 "
EndSection

その他

Fedoraにっき

Site admin: kam1610, PukiWiki 1.4.7 Copyright © 2001-2006 PukiWiki Developers Team. License is GPL.
Based on "PukiWiki" 1.3 by yu-ji. Powered by PHP 5.2.17.