FBSD111C-EMACSを作成

 FBSD111Cの新しいクローンとしてFBSD111C-EMACSを作成。

 なるべくシンプルで軽いEmacs環境を作れないか?

 mozc-uim,emax-nox11,uim.elを試してみたい。

 Uim を使って日本語を入力 - ArchWiki を参考にする。

 mozcとemacsをセットでインストールするから、見通しが悪くなる。欲しくもないX関連のモジュールがインストールされてしまう。なるべくXを使わないシンプルなEmacsをインストールして、emacs.elで日本語入力が使えるならそれに越した事はない。

 uimに関しても、枯れた入力システムでサポートは続いており、目的に合っているだろう。

    • /etc/.rc.confを編集してhost名を変更
    • 念のため、pkg update と portsnap fetch update, freebsd-update fetch, 同 installを実行 → そこそこ変更はあるよう。
    • # pkg install ja-uim-mozc
      Updating FreeBSD repository catalogue...
      FreeBSD repository is up to date.
      All repositories are up to date.
      Updating database digests format: 100%
      New version of pkg detected; it needs to be installed first.
      The following 1 package(s) will be affected (of 0 checked):

      Installed packages to be UPGRADED:
      pkg: 1.10.3_1 -> 1.10.5

      Number of packages to be upgraded: 1

      3 MiB to be downloaded.

       

      New packages to be INSTALLED:
      ja-uim-mozc: 2.20.2677.102.02_8
      uim: 1.8.6_3
      pango: 1.42.0
      libXrender: 0.9.10
      xproto: 7.0.31
      renderproto: 0.11.1
      libX11: 1.6.5,1
      libxcb: 1.12_2
      libXdmcp: 1.1.2
      libXau: 1.0.8_3
      libxml2: 2.9.7
      libpthread-stubs: 0.4
      kbproto: 1.0.7
      xorg-fonts-truetype: 7.7_1
      font-misc-meltho: 1.0.3_3
      mkfontscale: 1.1.2
      libfontenc: 1.1.3_1
      freetype2: 2.8_1
      mkfontdir: 1.0.7
      fontconfig: 2.12.1_3,1
      expat: 2.2.5
      font-misc-ethiopic: 1.0.3_3
      font-bh-ttf: 1.0.3_3
      encodings: 1.0.4_4,1
      font-util: 1.3.1
      dejavu: 2.37
      libXft: 2.3.2_1
      harfbuzz: 1.7.6
      graphite2: 1.3.11
      cairo: 1.14.8_1,2
      xcb-util-renderutil: 0.3.9_1
      xcb-util: 0.4.0_2,1
      pixman: 0.34.0
      libXext: 1.3.3_1,1
      xextproto: 7.3.0
      glproto: 1.4.17
      dri2proto: 2.8
      png: 1.6.34
      mesa-libs: 17.3.1
      libxshmfence: 1.2_2
      libXxf86vm: 1.1.4_1
      xf86vidmodeproto: 2.3.1
      libXfixes: 5.0.3
      fixesproto: 5.0
      libXdamage: 1.1.4_3
      damageproto: 1.2.1
      libdrm: 2.4.89,1
      libpciaccess: 0.13.5
      pciids: 20180219
      libunwind: 20170615
      glib: 2.50.3_1,1
      python27: 2.7.14_1
      readline: 7.0.3_1
      indexinfo: 0.3.1
      libffi: 3.2.1_2
      gettext-runtime: 0.19.8.1_1
      gmp: 6.1.2
      libiconv: 1.14_11
      perl5: 5.26.1
      pcre: 8.40_1
      libedit: 3.1.20170329_2,1
      fribidi: 0.19.7
      gtk2: 2.24.32
      libXrandr: 1.5.1
      randrproto: 1.5.0
      libXinerama: 1.1.3_3,1
      xineramaproto: 1.2.1
      libXi: 1.7.9,1
      inputproto: 2.3.2
      libXcursor: 1.1.15
      libXcomposite: 0.4.4_3,1
      compositeproto: 0.4.2
      cups: 2.2.6
      gnutls: 3.5.18
      trousers: 0.3.14_2
      tpm-emulator: 0.7.4_2
      p11-kit: 0.23.10
      libtasn1: 4.13
      ca_root_nss: 3.36
      nettle: 3.4
      libidn2: 2.0.4
      libunistring: 0.9.9
      libpaper: 1.1.24.4
      avahi-app: 0.6.31_6
      gnome_subr: 1.0
      libdaemon: 0.14_1
      gobject-introspection: 1.50.0_1,1
      dbus-glib: 0.108
      dbus: 1.10.16_1
      libSM: 1.2.2_3,1
      libICE: 1.0.9_1,1
      gdbm: 1.13_1
      shared-mime-info: 1.8
      hicolor-icon-theme: 0.15
      gtk-update-icon-cache: 2.24.32
      gdk-pixbuf2: 2.36.11
      libXt: 1.1.5,1
      tiff: 4.0.9_1
      jpeg-turbo: 1.5.3
      jbigkit: 2.1_1
      jasper: 1.900.1_17
      atk: 2.24.0
      ja-zinnia: 0.06_1
      ja-mozc-tool: 2.20.2677.102.02_8
      qt5-widgets: 5.9.4_1
      qt5-gui: 5.9.4_3
      xcb-util-wm: 0.4.1_3
      xcb-util-keysyms: 0.4.0_1
      xcb-util-image: 0.4.0_1
      libxkbcommon: 0.7.1_1
      qt5-network: 5.9.4_2
      qtchooser: 39
      qt5-core: 5.9.4_1
      pcre2: 10.21_1
      icu: 60.2_2,1
      xdg-utils: 1.1.1
      xset: 1.2.3_1
      libXmu: 1.1.2_3,1
      libXfontcache: 1.0.5_3
      fontcacheproto: 0.1.3
      xprop: 1.2.2
      qt5-dbus: 5.9.4_1
      ja-tegaki-zinnia-japanese: 0.3
      qt5-buildtools: 5.9.4_1
      protobuf: 3.5.1.1
      ja-mozc-server: 2.20.2677.102.02_8

      Number of packages to be installed: 126

      The process will require 456 MiB more space.
      108 MiB to be downloaded. 

        なかなかシンプルにというわけにはいかない。

      Message from freetype2-2.8_1:

      The 2.7.x series now uses the new subpixel hinting mode (V40 port's option) as
      the default, emulating a modern version of ClearType. This change inevitably
      leads to different rendering results, and you might change port's options to
      adapt it to your taste (or use the new "FREETYPE_PROPERTIES" environment
      variable).

      The environment variable "FREETYPE_PROPERTIES" can be used to control the
      driver properties. Example:

      FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
      cff:no-stem-darkening=1 \
      autofitter:warping=1

      This allows to select, say, the subpixel hinting mode at runtime for a given
      application.

      The controllable properties are listed in the section "Controlling FreeType
      Modules" in the reference's table of contents
      (/usr/local/share/doc/freetype2/reference/ft2-toc.html, if documentation was installed).
      Message from python27-2.7.14_1:

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

      Note that some standard Python modules are provided as separate ports
      as they require additional dependencies. They are available as:

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

      ===========================================================================
      Message from perl5-5.26.1:

      The /usr/bin/perl symlink has been removed starting with Perl 5.20.
      For shebangs, you should either use:

      #!/usr/local/bin/perl

      or

      #!/usr/bin/env perl

      The first one will only work if you have a /usr/local/bin/perl,
      the second will work as long as perl is in PATH.
      Message from dejavu-2.37:

      Make sure that the freetype module is loaded. If it is not, add the following
      line to the "Modules" section of your X Windows configuration file:

      Load "freetype"

      Add the following line to the "Files" section of X Windows configuration file:

      FontPath "/usr/local/share/fonts/dejavu/"

      Note: your X Windows configuration file is typically /etc/X11/XF86Config
      if you are using XFree86, and /etc/X11/xorg.conf if you are using X.Org.
      Message from ca_root_nss-3.36:

      ********************************* WARNING *********************************

      FreeBSD does not, and can not warrant that the certification authorities
      whose certificates are included in this package have in any way been
      audited for trustworthiness or RFC 3647 compliance.

      Assessment and verification of trust is the complete responsibility of the
      system administrator.

      *********************************** NOTE **********************************

      This package installs symlinks to support root certificates discovery by
      default for software that uses OpenSSL.

      This enables SSL Certificate Verification by client software without manual
      intervention.

      If you prefer to do this manually, replace the following symlinks with
      either an empty file or your site-local certificate bundle.

      * /etc/ssl/cert.pem
      * /usr/local/etc/ssl/cert.pem
      * /usr/local/openssl/cert.pem

      ***************************************************************************
      Message from qtchooser-39:

      qtchooser is a wrapper that allows selecting whether Qt4 or Qt5 binaries for
      qmake, moc and other tools will be run when invoking the binaries in $PATH.

      By default, the Qt5 versions are run. It is possible to change the behavior by
      setting the QT_SELECT environment variable to "qt4". See qtchooser(1) for more
      information.
      Message from trousers-0.3.14_2:

      To run tcsd automatically, add the following line to /etc/rc.conf:

      tcsd_enable="YES"

      You might want to edit /usr/local/etc/tcsd.conf to reflect your setup.

      If you want to use tcsd with software TPM emulator, use the following
      configuration in /etc/rc.conf:

      tcsd_enable="YES"
      tcsd_mode="emulator"
      tpmd_enable="YES"

      To use TPM, add your_account to '_tss' group like following:

      # pw groupmod _tss -m your_account
      Message from ja-uim-mozc-2.20.2677.102.02_8:

      To activate uim-mozc, please add the following into ~/.xinitrc,
      ~/.xsession, or ~/.kde4/env (for KDE4):

      export GTK_IM_MODULE=uim
      export QT_IM_MODULE=uim
      export XMODIFIERS=@im=uim
      export XIM=uim
      /usr/local/bin/mozc start
      uim-xim & 

       

      (閑話休題:CLI・CUIなワークステーションを作る

      状況が似ているので、親近感を覚えた
      今更だが、anthyの開発はDebianが引き継いだようなので、ja-uim-anthyでもいいのでは?)

    • コンソールで日本語入力を可能にしたいのだが、どうすれば?
      とりあえずrebootして、mozcと入力すると、

      % mozc
      /usr/local/bin/mozc [start|stop|restart|forcestart|forcestop|status]

      su しなくても、mozcのsatat/stopはできる。
      mozcが起動していれば、statusで番号を返し、停止していれば何も返さない。
      uimをコンソールに反映させる為にはどうすればいいのか?

      FreeBSD のコンソールで漢字の読み書き:ある nakagami の日記:So-netブログ

      以下はRloginでの確認。
      リンクはuim-anthyの設定例。
      コンソールのプロンプトから'uim-fep'と入力するとコンソール左下に’mozc[mz- RM]’が表示される。('CTRL-J'でFEPのオンオフはできない。)
      suしてexitしたら’mozc[mz- RM]’は消えた。(再現性はない。消える時もあれば、消えない時もある。)
      mozc stopしてから、uim-fepを入力すると、mozcも立ち上がる。
      ’mozc[mz- RM]’の表示がある間は、mozc stopとしても、mozcは停止しない。mozc forcestopとしてもダメ。

      UimFep · uim/uim-doc-ja Wiki · GitHub

 まずは uimについて、しばらく腰を落ち着けて調べてみる。