LoginSignup
0
2

GPD Pocket3 に Ubuntu MATE 22.04 をインストール(個人的メモ)

Last updated at Posted at 2022-08-03

[システム] 初期インストールされたパッケージのアップグレード

user@host:~$ sudo apt-get update
user@host:~$ sudo apt-get upgrade

以下の223個のパッケージがアップグレードされた。

  accountsservice apparmor apport apport-gtk base-files bind9-dnsutils
  bind9-host bind9-libs cups cups-bsd cups-client cups-common
  cups-core-drivers cups-daemon cups-ipp-utils cups-ppdc cups-server-common
  deja-dup dirmngr distro-info-data dnsmasq-base dpkg dpkg-dev evolution
  evolution-common evolution-data-server evolution-data-server-common
  evolution-plugin-bogofilter evolution-plugin-pstimport evolution-plugins
  ffmpeg firmware-sof-signed fonts-opensymbol gir1.2-gnomedesktop-3.0
  gir1.2-gtk-3.0 gir1.2-harfbuzz-0.0 gir1.2-javascriptcoregtk-4.0
  gir1.2-nm-1.0 gir1.2-webkit2-4.0 gjs gnome-control-center-faces
  gnome-desktop3-data gnome-keyring gnome-keyring-pkcs11 gnome-maps
  gnome-weather gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client
  gpg-wks-server gpgconf gpgsm gpgv gtk-update-icon-cache gvfs gvfs-backends
  gvfs-common gvfs-daemons gvfs-fuse gvfs-libs intel-media-va-driver
  intel-microcode isc-dhcp-client isc-dhcp-common libaccountsservice0
  libapparmor1 libavcodec58 libavdevice58 libavfilter7 libavformat58
  libavutil56 libcamel-1.2-63 libcom-err2 libcups2 libcupsimage2
  libcurl3-gnutls libcurl4 libdpkg-perl libebackend-1.2-10 libebook-1.2-20
  libebook-contacts-1.2-3 libecal-2.0-1 libedata-book-1.2-26
  libedata-cal-2.0-1 libedataserver-1.2-26 libedataserverui-1.2-3 libegl-mesa0
  libevolution libexempi8 libfreetype6 libfribidi0 libgail-3-0 libgbm1
  libgjs0g libgl1-mesa-dri libglapi-mesa libglx-mesa0 libgnome-desktop-3-19
  libgtk-3-0 libgtk-3-bin libgtk-3-common libharfbuzz-icu0 libharfbuzz0b
  libhttp-daemon-perl libinput-bin libinput10 libjavascriptcoregtk-4.0-18
  libjson-c5 libldap-2.5-0 libldap-common liblouis-data liblouis20
  libmozjs-91-0 libnm0 libnss-systemd libnss3 libntfs-3g89
  libpam-gnome-keyring libpam-systemd libpcre3 libpkcs11-helper1 libpostproc55
  libpython3.10 libpython3.10-minimal libpython3.10-stdlib libqt5core5a
  libqt5dbus5 libqt5gui5 libqt5network5 libqt5widgets5 libreoffice-base-core
  libreoffice-calc libreoffice-core libreoffice-draw libreoffice-gnome
  libreoffice-gtk3 libreoffice-impress libreoffice-math libreoffice-ogltrans
  libreoffice-pdfimport libreoffice-style-colibre libreoffice-style-elementary
  libreoffice-style-yaru libreoffice-writer libsdl2-2.0-0 libsmbclient
  libsnmp-base libsnmp40 libss2 libssl3 libswresample3 libswscale5 libsystemd0
  libudev1 libuno-cppu3 libuno-cppuhelpergcc3-3 libuno-purpenvhelpergcc3-3
  libuno-sal3 libuno-salhelpergcc3-3 libusb-1.0-0 libwbclient0
  libwebkit2gtk-4.0-37 libxatracker2 libxml2 lintian linux-firmware
  linux-libc-dev logrotate logsave mesa-va-drivers mesa-vdpau-drivers
  mesa-vulkan-drivers network-manager networkd-dispatcher ntfs-3g openssl orca
  python3-apport python3-distupgrade python3-jwt python3-louis
  python3-problem-report python3-samba python3-software-properties python3-uno
  python3.10 python3.10-minimal qt5-gtk-platformtheme
  qt5-xdgdesktopportal-platformtheme rsyslog samba-common samba-common-bin
  samba-dsdb-modules samba-libs shotwell shotwell-common smbclient snapd
  software-properties-common software-properties-gtk systemd systemd-sysv
  systemd-timesyncd ubuntu-advantage-desktop-daemon ubuntu-advantage-tools
  ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk udev
  uno-libs-private ure wpasupplicant xdg-desktop-portal xdg-utils
  xserver-common xserver-xorg-core xserver-xorg-legacy xserver-xorg-video-ati
  xserver-xorg-video-radeon zenity zenity-common
アップグレード: 223 個、新規インストール: 0 個、削除: 0 個、保留: 0 個。
89 standard security updates
493 MB 中 13.2 kB のアーカイブを取得する必要があります。
この操作後に追加で 2,987 kB のディスク容量が消費されます。

[システム] Pocket3 用の設定を導入

Ubuntu MATE コミュニティが提供する GPD Pocket3 用の設定を導入する。

情報源
https://ubuntu-mate.community/t/gpd-pocket-3-and-ubuntu-mate-22-04-lts/25531

user@host:~$ sudo apt install git
user@host:~$ git clone https://github.com/wimpysworld/umpc-ubuntu.git
user@host:~$ cd umpc-ubuntu
user@host:~/umpc-ubuntu$ sudo ./umpc-ubuntu.sh enable
 - Injecting /usr/share/X11/xorg.conf.d/40-gpd-pocket3-monitor.conf
 - Injecting /var/lib/gdm3/.config/gpd-pocket3-monitors.xml
renamed '/var/lib/gdm3/.config/gpd-pocket3-monitors.xml' -> '/var/lib/gdm3/.config/monitors.xml'
 - Injecting /usr/share/X11/xorg.conf.d/80-gpd-pocket3-trackpoint.conf
 - Injecting /etc/udev/rules.d/99-gpd-pocket3-touch.rules
 - Injecting /etc/modprobe.d/alsa-gpd-pocket3.conf
 - Injecting /usr/share/glib-2.0/schemas/90-gpd-pocket3.gschema.override
 - Injecting /etc/default/grub.d/gpd-pocket3.cfg
 - Injecting /etc/xdg/autostart/umpc-display-rotate.desktop
 - Injecting /etc/udev/hwdb.d/61-gpd-pocket3-sensor-local.hwdb
/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-MXC6655:00/iio:device0
 - Injecting /usr/bin/umpc-display-scaler
 - Injecting /etc/xdg/autostart/umpc-display-scaler.desktop
 - Injecting /usr/share/applications/umpc-display-scaler.desktop
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/gpd-pocket3.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-41-generic
Found initrd image: /boot/initrd.img-5.15.0-41-generic
Found linux image: /boot/vmlinuz-5.15.0-25-generic
Found initrd image: /boot/initrd.img-5.15.0-25-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
UMPC hardware configuration is applied. Please reboot to complete the setup.

[システム] タッチパッドの動作

この状態で

  • 中ボタンを押しながらタッチパッド上で指を動かすとスクロール(マウスホイールの動作)。
  • タッチパッド上で指2本を一緒に動かすとスクロール(ナチュラルスクロール)。
  • これら2つの動作は、指を動かす向きとスクロールする向きとの関係が互いに逆。
    • 上のは、指を上に動かすとウインドウの内容が下に動く(コンテンツを覗く窓を持って動かす感じ)。
    • 下のは、指を上に動かすとウインドウの内容が上に動く(コンテンツそのものを持って動かす感じ)。

この設定はとても使いやすいので、このまま活かす。

この設定と関係のありそうなWeb上の情報は
https://bbs.archlinux.org/viewtopic.php?id=261138
https://www.fixes.pub/linux/317980.html

[システム] ブラウザの画面スクロールを行うと描画が乱れる問題を修正

「GPD Pocket3 用の設定」の中に /usr/share/X11/xorg.conf.d/20-gpd-pocket3-intel.conf というのがある。
これがインストールされれば解消するはずらしいのだが、何故かインストールされていない。
そこで、手動でファイルを置く。

user@host:~$ cd umpc-ubuntu
user@host:~/umpc-ubuntu$ sudo cp data/20-gpd-pocket3-intel.conf /usr/share/X11/xorg.conf.d/

ファイルの中身は以下のとおり。

20-gpd-pocket3-intel.conf
Section "Device"
  Identifier "Device0"
  Driver     "intel"
  Option     "AccelMethod" "sna"
  Option     "TearFree"    "true"
  Option     "DRI"         "1"
EndSection

[システム] タッチスクリーンとスタイラスの座標が正しく認識されるよう画面回転に関する設定をする

libinput に関する設定を /etc/udev/rules.d/99-gpd-pocket3-touch.rules に書いておく。

user@host:~$ cd /etc/udev/rules.d
user@host:/etc/udev/rules.d$ ls
70-snap.firefox.rules                    70-snap.snapd.rules
70-snap.snapd-desktop-integration.rules  99-gpd-pocket3-touch.rules
user@host:/etc/udev/rules.d$ sudo -s
root@host:/etc/udev/rules.d# mv 99-gpd-pocket3-touch.rules 99-gpd-pocket3-touch.rules.ORIGINAL
root@host:/etc/udev/rules.d# cp 99-gpd-pocket3-touch.rules.ORIGINAL 99-gpd-pocket3-touch.rules
root@host:/etc/udev/rules.d# vi 99-gpd-pocket3-touch.rules

書き換え後のファイルの中身は次のとおり。

99-gpd-pocket3-touch.rules
ACTION=="add", KERNEL=="event[0-9]*", ATTRS{name}=="GXTP7380:00 27C6:0113", ENV{LIBINPUT_CALIBRATION_MATRIX}="1 0 0 0 1 0"
ACTION=="add", KERNEL=="event[0-9]*", ATTRS{name}=="GXTP7380:00 27C6:0113 Stylus", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"

元のファイルとの差分は

root@host:/etc/udev/rules.d# diff 99-gpd-pocket3-touch.rules.ORIGINAL 99-gpd-pocket3-touch.rules
1,3c1,3
< ACTION=="add", KERNEL=="event[0-9]*", ATTRS{name}=="GXTP7380:00 27C6:0113", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"
< ACTION=="add", KERNEL=="event[0-9]*", ATTRS{name}=="GXTP7380:00 27C6:0113 Stylus Pen (0)", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"
< ACTION=="add", KERNEL=="event[0-9]*", ATTRS{name}=="GXTP7380:00 27C6:0113 Stylus Eraser (0)", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"
---
> ACTION=="add", KERNEL=="event[0-9]*", ATTRS{name}=="GXTP7380:00 27C6:0113", ENV{LIBINPUT_CALIBRATION_MATRIX}="1 0 0 0 1 0"
> ACTION=="add", KERNEL=="event[0-9]*", ATTRS{name}=="GXTP7380:00 27C6:0113 Stylus", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"
> 

なお、この問題はシステム設定ではなくユーザー設定で解決することもできる。
次のようなスクリプトを用意し、ログイン時に自動的に実行されるようにしておけばよい。
ただし、これを使う場合は、前述の /etc/udev/rules.d/99-gpd-pocket3-touch.rules は最初からあったもの(上で書き換える前のやつ)を使う必要があるので注意。

タッチパネル用

#!/bin/sh

/usr/bin/xinput set-prop 'pointer:GXTP7380:00 27C6:0113' 'Coordinate Transformation Matrix' 1 0 0 0 1 0 0 0 1

スタイラス用

#!/bin/sh

/usr/bin/xinput set-prop 'pointer:GXTP7380:00 27C6:0113 Stylus Pen (0)' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1

スタイラス用の方は、 /etc/udev/rules.d/99-gpd-pocket3-touch.rules で設定する場合と xinput を使って設定する場合とで、デバイス名が違う( Pen (0) が無いか有るか)。

[システム] 一度音を出した後しばらく時間をおいて音を出すと雑音が入る問題を修正

情報源
https://blog.nhiroki.net/2020/07/07/ubuntu-mate-20-04-gpd-pocket-2
https://forums.linuxmint.com/viewtopic.php?t=312445
https://lactoria.web.fc2.com/pro3-1euc.html

上のリンクの1つ目と2つ目に従って設定してみたが、効果がなかった。
上のリンクの3つ目に書いてあることに従ったところ、問題は解消した。

操作は以下のとおり。

user@host:~$ cd /etc/pulse
user@host:/etc/pulse$ ls
client.conf  client.conf.d  daemon.conf  default.pa  default.pa.d  system.pa
user@host:/etc/pulse$ sudo -s
root@host:/etc/pulse$ mv default.pa default.pa.ORIGINAL
root@host:/etc/pulse$ cp default.pa.ORIGINAL default.pa
root@host:/etc/pulse$ vi default.pa
root@host:/etc/pulse# diff default.pa.ORIGINAL default.pa
115c115
< load-module module-suspend-on-idle
---
> #load-module module-suspend-on-idle

[システム] google chrome をインストール

firefox を使って google のサイトから .deb パッケージをダウンロード。
Ubuntu Mate 標準のパッケージインストーラを使ってそれをインストール。

[システム] ownCloud desktop client をインストール

この後インストールするアプリのパッケージやメモ、各種設定ファイルなども ownCloud に置いてあるので、それらを同期するためにインストール。
(近いうちに NextCloud に乗り換えたいが、今はまだ ownCloud のままにしておく。)

user@host:~$ wget -nv https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/Ubuntu_22.04/Release.key -O - | sudo apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
2022-07-24 12:49:49 URL:https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/Ubuntu_22.04/Release.key [1412/1412] -> "-" [1]
OK
user@host:~$ echo 'deb https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/Ubuntu_22.04/ /' | sudo tee -a /etc/apt/sources.list.d/owncloud.list
deb https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/Ubuntu_22.04/ /
user@host:~$ sudo apt update

インストールされたパッケージは以下。

以下の追加パッケージがインストールされます:
  libsecret-tools ocqt51210-libqt5core5a ocqt51210-libqt5dbus5
  ocqt51210-libqt5gui5 ocqt51210-libqt5keychain1 ocqt51210-libqt5network5
  ocqt51210-libqt5sql5 ocqt51210-libqt5sql5-sqlite ocqt51210-libqt5widgets5
  ocqt51210-libqt5xml5 ocqt51210-qtsvg5 ocqt51210-qttranslations5
  ocqt51210-qtwayland5
提案パッケージ:
  ocqt51210-libqt5libqgtk2 owncloud-client-dolphin owncloud-client-nautilus
  owncloud-client-nemo owncloud-client-caja
以下のパッケージが新たにインストールされます:
  libsecret-tools ocqt51210-libqt5core5a ocqt51210-libqt5dbus5
  ocqt51210-libqt5gui5 ocqt51210-libqt5keychain1 ocqt51210-libqt5network5
  ocqt51210-libqt5sql5 ocqt51210-libqt5sql5-sqlite ocqt51210-libqt5widgets5
  ocqt51210-libqt5xml5 ocqt51210-qtsvg5 ocqt51210-qttranslations5
  ocqt51210-qtwayland5 owncloud-client
アップグレード: 0 個、新規インストール: 14 個、削除: 0 個、保留: 0 個。
12.8 MB のアーカイブを取得する必要があります。
この操作後に追加で 45.3 MB のディスク容量が消費されます。

[システム] フォントをインストール

user<host~> % cd /usr/share/fonts/truetype
user<host/usr/share/fonts/truetype> % sudo -s
root@host:/usr/share/fonts/truetype# ls
Gargi             fonts-kalapi      lohit-devanagari       pagul
Gubbi             fonts-orya-extra  lohit-gujarati         samyak
Nakula            fonts-telu-extra  lohit-kannada          samyak-fonts
Navilu            fonts-yrsa-rasa   lohit-malayalam        sinhala
Sahadeva          freefont          lohit-oriya            teluguvijayam
Sarai             kacst             lohit-punjabi          tibetan-machine
abyssinica        kacst-one         lohit-tamil            tiresias
dejavu            lao               lohit-tamil-classical  tlwg
droid             liberation        lohit-telugu           ttf-khmeros-core
fonts-beng-extra  liberation2       malayalam              ubuntu
fonts-deva-extra  libreoffice       noto
fonts-gujr-extra  lohit-assamese    open-sans
fonts-guru-extra  lohit-bengali     padauk
root@host:/usr/share/fonts/truetype# mkdir DynaFont
root@host:/usr/share/fonts/truetype# mkdir BIZ
root@host:/usr/share/fonts/truetype# cp ~user/packages/DynaFontTypeX/DynaFont/TRUETYPE/KIHON/* DynaFont/
root@host:/usr/share/fonts/truetype# cp ~user/packages/BIZ-fonts/* BIZ/
root@host:/usr/share/fonts/truetype# exit
exit
user<host/usr/share/fonts/truetype> % ls DynaFont
DFGOTA.TTC   DFGOTP5.TTC  DFHSM3.TTC  DFMINC.TTC   DFMRG3.TTC  DFMRGE.TTC
DFGOTC.TTC   DFHSG3.TTC   DFHSM5.TTC  DFMINE.TTC   DFMRG5.TTC
DFGOTE.TTC   DFHSG5.TTC   DFHSM7.TTC  DFMINP3.TTC  DFMRG7.TTC
DFGOTP2.TTC  DFHSG7.TTC   DFHSM9.TTC  DFMINP5.TTC  DFMRG9.TTC
DFGOTP3.TTC  DFHSG9.TTC   DFHSR4.TTC  DFMRG2.TTC   DFMRGC.TTC
user<host/usr/share/fonts/truetype> % ls BIZ
BIZ-UDGothicB.ttc  BIZ-UDGothicR.ttc  BIZ-UDMinchoM.ttc

[ユーザー] システム標準のディレクトリ名を日本語から英語にする

個人的な趣味。
なんとなく日本語はどっかでトラブルのもとになりそうで嫌。

user<host~> % LANG=C xdg-user-dirs-gtk-update
Moving DESKTOP directory from デスクトップ to Desktop
Moving DOWNLOAD directory from ダウンロード to Downloads
Moving TEMPLATES directory from テンプレート to Templates
Moving PUBLICSHARE directory from 公開 to Public
Moving DOCUMENTS directory from ドキュメント to Documents
Moving MUSIC directory from ミュージック to Music
Moving PICTURES directory from ピクチャ to Pictures
Moving VIDEOS directory from ビデオ to Videos

[ユーザー] MATEターミナルのプロファイルを作成

スクロールバックのサイズ 無制限にする を ON 。

[ユーザー] ownCloud desktop client の設定を作る

サーバURLを設定。
同期フォルダを設定。
隠しファイルを同期 ON 。

[ユーザー] キーボードの Dvorak 配列を設定

user<host~> % mate-keyboard-properties &

レイアウト
英語(US) English (Dvorak, alt. intl.)
を 追加。

オプション
Ctrl position : use Caps Lock as Ctrl -> ON
Switching to another layout : Both Shift together -> ON

[ユーザー] キーボードの配列に独自の変更を加える

次のスクリプトを用意し、ログイン時に自動的に実行されるようにしておけばよい。

#!/bin/sh

/usr/bin/xmodmap -e 'keycode 36 = s S Return Henkan_Mode'
/usr/bin/xmodmap -e 'keycode 22 = BackSpace Henkan_Mode BackSpace BackSpace'
/usr/bin/xmodmap -e 'keycode 21 = equal plus equal plus dead_tilde'
/usr/bin/xmodmap -e 'keycode 119 = Delete BackSpace Delete'
/usr/bin/xmodmap -e 'keycode 48 = slash question apostrophe quotedbl'
/usr/bin/xmodmap -e 'keycode 47 = Return Henkan_Mode semicolon colon ssharp U1E9E'
/usr/bin/xmodmap -e 'keycode 133 = Super_L Muhenkan Super_L Muhenkan'
  • s をどうしても2段目の右手小指( n の右)にしたい。 Pocket3 のキー配置では Dvorak配列 のレイアウトにするとどう頑張っても2段目には s は入らないので、やむを得ず Enters にするという暴挙に出た。
  • 追い出された Enter は0段目の右手親指に。すなわち ;: が刻印されているキーに。親指Enterは慣れると意外と快適になる。
  • /? を、右手親指 Enter にしたキーの右隣、すなわち '" が刻印されているキーに。
  • Shift+BackSpace変換 を、 Shift+DeleteBackSpace を割り当てているが、特に必要なわけではなく、おまけ的な設定。
  • Shift+(右手親指 Enter にしたキー) を 変換 に、 Shift+Windows無変換 に割り当てた。これは、 Emacs で使うことを目的とした設定。

[ユーザー] mozc の設定

user<host~> % /usr/lib/mozc/mozc_tool --mode=config_dialog &
  • ローマ字入力・かな入力 -> ローマ字入力
  • 句読点 -> 、。
  • 記号 -> 「」・
  • スペースの入力 -> 半角
  • 候補選択ショートカット -> 1-9
  • テンキーからの入力 -> 半角
  • キー設定の選択 -> ことえり を選んで、カスタムする
    • 変換前入力中 IMEを無効化 : Zenkaku/Hankaku -> Ctrl Backspace
    • 変換中 IMEを無効化 : Zenkaku/Hankaku -> Ctrl Backspace
    • 直接入力 IMEを有効化 : Zenkaku/Hankaku -> Ctrl Backspace
    • 入力文字なし 確定取り消し : Ctrl Backspace -> Ctrl Tab
    • 入力文字なし IMEを無効化 : Zenkaku/Hankaku -> Ctrl Backspace

[ユーザー] ホームディレクトリにドットファイルを置く

(ディレクトリ dotfile の中にあるファイルにシンボリックリンクを張る)

.Xresources
.bashenv
.bashrc
.emacs-font.el
.emacs-howm.el
.emacs-pocket3.el
.emacs-vcard.el
.emacs.el
.face
.fonts.conf.hybrid <- シンボリックリンクの名前 .fonts.conf
.gnuplot
.mew.el
.signature

[ユーザー] gpg の鍵をインポート

user<host~> % gpg --import backup_2022-04-06.sec.pgp 
gpg: /home/user/.gnupg/trustdb.gpg: 信用データベースができました
gpg: 鍵37AA844C9741E872: 公開鍵"My Name (名前) <user@host.domain>"をインポートしました
gpg: 鍵37AA844C9741E872:"My Name (名前) <user@host.domain>"変更なし
gpg: 鍵37AA844C9741E872: 秘密鍵をインポートしました
gpg: 処理数の合計: 2
gpg:               インポート: 1
gpg:              変更なし: 1
gpg:       秘密鍵の読み込み: 1
gpg:   秘密鍵のインポート: 1
user<host~> % gpg --edit-key 37AA844C9741E872
gpg (GnuPG) 2.2.27; Copyright (C) 2021 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

秘密鍵が利用できます。

sec  rsa4096/37AA844C9741E872
     作成: 2013-11-05  有効期限: 無期限       利用法: SC  
     信用: 不明の     有効性: 不明の
ssb  rsa4096/CD8AE06ACA8ACE75
     作成: 2013-11-05  有効期限: 無期限       利用法: E   
[  不明  ] (1). My Name (名前) <user@host.domain>

gpg> trust
sec  rsa4096/37AA844C9741E872
     作成: 2013-11-05  有効期限: 無期限       利用法: SC  
     信用: 不明の     有効性: 不明の
ssb  rsa4096/CD8AE06ACA8ACE75
     作成: 2013-11-05  有効期限: 無期限       利用法: E   
[  不明  ] (1). My Name (名前) <user@host.domain>

他のユーザの鍵を正しく検証するために、このユーザの信用度を決めてください
(パスポートを見せてもらったり、他から得たフィンガープリントを検査したり、などなど)

  1 = 知らない、または何とも言えない
  2 = 信用し ない
  3 = まぁまぁ信用する
  4 = 充分に信用する
  5 = 究極的に信用する
  m = メーン・メニューに戻る

あなたの決定は? 5
本当にこの鍵を究極的に信用しますか? (y/N) y

sec  rsa4096/37AA844C9741E872
     作成: 2013-11-05  有効期限: 無期限       利用法: SC  
     信用: 究極        有効性: 不明の
ssb  rsa4096/CD8AE06ACA8ACE75
     作成: 2013-11-05  有効期限: 無期限       利用法: E   
[  不明  ] (1). My Name (名前) <user@host.domain>
プログラムを再起動するまで、表示された鍵の有効性は正しくないかもしれない、
ということを念頭においてください。

gpg> quit

[ユーザー] ssh の鍵をインポート

前のマシンで使ってたファイルをそのまま移動してきて ~/.ssh に入れた。

authorized_keys
id_rsa
id_rsa.pub

の3つ。
パーミッションに注意。

user<host~> % cd .ssh
user<host~/.ssh> % ls -l
合計 24
-rw-rw-r-- 1 user user 6634  1月 25 07:33 authorized_keys
-rw------- 1 user user 3414  1月 23  2022 id_rsa
-rw-r--r-- 1 user user  735  1月 23  2022 id_rsa.pub
-rw------- 1 user user 1456  7月 25 10:32 known_hosts
-rw------- 1 user user 1234  7月 25 10:32 known_hosts.old

[ユーザー] ログイン時に自動起動するプログラムを設定

user<host~> % mate-session-properties &
  • Display Rotator -> ON のまま
  • Display Scaler -> OFF にする
  • /usr/bin/plank を加える -> ON にする
  • /home/user/bin/pocket3-keyboard_mouse を加える -> ON にする
  • /home/user/bin/pocket3-stylus を加える -> OFF にする
  • /home/user/bin/pocket3-touch を加える -> OFF にする

pocket3-keyboard_mouse は、
キーボードの配列を使いやすいように変更する内容。
(ファイル名に 'mouse' と入っているが、マウスの設定は今のところ、ない。)

pocket3-stylus は、スタイラスペンの座標が正しく認識されるよう画面回転に関する設定をする内容。
今回は /etc/udev/rules.d/99-gpd-pocket3-touch.rules でそれを行うことにしたので、結局これは使わない。

pocket3-touch は、タッチスクリーンの座標が正しく認識されるよう画面回転に関する設定をする内容。
今回は /etc/udev/rules.d/99-gpd-pocket3-touch.rules でそれを行うことにしたので、結局これは使わない。

[システム] vim をインストール

user<host~> % sudo -s apt-get install vim
以下の追加パッケージがインストールされます:
  vim-runtime
提案パッケージ:
  ctags vim-doc vim-scripts
以下のパッケージが新たにインストールされます:
  vim vim-runtime
アップグレード: 0 個、新規インストール: 2 個、削除: 0 個、保留: 0 個。
8,548 kB のアーカイブを取得する必要があります。
この操作後に追加で 37.6 MB のディスク容量が消費されます。

[システム] emacs をインストール

user<host~> % sudo apt-get install emacs
以下の追加パッケージがインストールされます:
  emacs-bin-common emacs-common emacs-el emacs-gtk libm17n-0 libotf1 m17n-db
提案パッケージ:
  mailutils emacs-common-non-dfsg ncurses-term m17n-docs gawk
以下のパッケージが新たにインストールされます:
  emacs emacs-bin-common emacs-common emacs-el emacs-gtk libm17n-0 libotf1
  m17n-db
アップグレード: 0 個、新規インストール: 8 個、削除: 0 個、保留: 0 個。
36.4 MB のアーカイブを取得する必要があります。
この操作後に追加で 117 MB のディスク容量が消費されます。

[システム] evince をインストール

user<host~> % sudo apt-get install evince
以下の追加パッケージがインストールされます:
  evince-common libevdocument3-4 libevview3-3 libnautilus-extension1a
提案パッケージ:
  nautilus-sendto unrar
以下のパッケージが新たにインストールされます:
  evince evince-common libevdocument3-4 libevview3-3 libnautilus-extension1a
アップグレード: 0 個、新規インストール: 5 個、削除: 0 個、保留: 0 個。
774 kB のアーカイブを取得する必要があります。
この操作後に追加で 3,929 kB のディスク容量が消費されます。

[システム] howm をインストール

user<host~> % sudo apt-get install howm
以下の追加パッケージがインストールされます:
  dh-elpa-helper
提案パッケージ:
  ruby
以下のパッケージが新たにインストールされます:
  dh-elpa-helper howm
アップグレード: 0 個、新規インストール: 2 個、削除: 0 個、保留: 0 個。
280 kB のアーカイブを取得する必要があります。
この操作後に追加で 1,107 kB のディスク容量が消費されます。

[システム] mew をインストール

user<host~> % sudo apt-get install mew
以下の追加パッケージがインストールされます:
  fonts-lato javascript-common libjs-jquery libruby3.0 mew-bin rake ruby
  ruby-net-telnet ruby-rubygems ruby-sqlite3 ruby-webrick ruby-xmlrpc ruby3.0
  rubygems-integration sqlite3 stunnel4
提案パッケージ:
  apache2 | lighttpd | httpd w3m-el ssh wv xlhtml ppthtml compface x-face-el
  mu-cite mule-ucs hyperestraier namazu2 namazu2-index-tools mhc ri ruby-dev
  bundler sqlite3-doc logcheck-database
以下のパッケージが新たにインストールされます:
  fonts-lato javascript-common libjs-jquery libruby3.0 mew mew-bin rake ruby
  ruby-net-telnet ruby-rubygems ruby-sqlite3 ruby-webrick ruby-xmlrpc ruby3.0
  rubygems-integration sqlite3 stunnel4
アップグレード: 0 個、新規インストール: 17 個、削除: 0 個、保留: 0 個。
10.2 MB のアーカイブを取得する必要があります。
この操作後に追加で 42.9 MB のディスク容量が消費されます。

[システム] migemo-el をインストール

user<host~> % sudo apt-get install migemo-el
以下の追加パッケージがインストールされます:
  cmigemo cmigemo-common elpa-migemo libmigemo1 nkf skkdic
提案パッケージ:
  vim-migemo skktools skkdic-cdb skkdic-extra
以下のパッケージが新たにインストールされます:
  cmigemo cmigemo-common elpa-migemo libmigemo1 migemo-el nkf skkdic
アップグレード: 0 個、新規インストール: 7 個、削除: 0 個、保留: 0 個。
1,657 kB のアーカイブを取得する必要があります。
この操作後に追加で 5,150 kB のディスク容量が消費されます。

[システム] emacs-calfw, emacs-calfw-howm をインストール

user<host~> % sudo apt-get install emacs-calfw
提案パッケージ:
  org-mode emacs-calfw-howm
以下のパッケージが新たにインストールされます:
  emacs-calfw
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
41.5 kB のアーカイブを取得する必要があります。
この操作後に追加で 196 kB のディスク容量が消費されます。
user<host~> % sudo apt-get install emacs-calfw-howm
提案パッケージ:
  elscreen
以下のパッケージが新たにインストールされます:
  emacs-calfw-howm
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
5,892 B のアーカイブを取得する必要があります。
この操作後に追加で 38.9 kB のディスク容量が消費されます。

[システム] org-mode, org-mode-doc をインストール

user<host~> % sudo apt-get install org-mode
以下の追加パッケージがインストールされます:
  elpa-htmlize elpa-org
提案パッケージ:
  org-mode-doc ditaa texlive-latex-extra texlive-fonts-recommended texinfo
以下のパッケージが新たにインストールされます:
  elpa-htmlize elpa-org org-mode
アップグレード: 0 個、新規インストール: 3 個、削除: 0 個、保留: 0 個。
1,007 kB のアーカイブを取得する必要があります。
この操作後に追加で 5,531 kB のディスク容量が消費されます。
user<host~> % sudo apt-get install org-mode-doc
以下のパッケージが新たにインストールされます:
  org-mode-doc
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
2,539 kB のアーカイブを取得する必要があります。
この操作後に追加で 4,597 kB のディスク容量が消費されます。

[システム] tgif をインストール

user<host~> % sudo apt-get install tgif
以下の追加パッケージがインストールされます:
  dvisvgm fonts-lmodern libptexenc1 libteckit0 libtexlua53 libtexluajit2
  libzzip-0-13 lmodern tex-common texlive-base texlive-binaries
  texlive-latex-base xfonts-75dpi
提案パッケージ:
  debhelper perl-tk xzdec texlive-latex-base-doc
以下のパッケージが新たにインストールされます:
  dvisvgm fonts-lmodern libptexenc1 libteckit0 libtexlua53 libtexluajit2
  libzzip-0-13 lmodern tex-common texlive-base texlive-binaries
  texlive-latex-base tgif xfonts-75dpi
アップグレード: 0 個、新規インストール: 14 個、削除: 0 個、保留: 0 個。
52.9 MB のアーカイブを取得する必要があります。
この操作後に追加で 165 MB のディスク容量が消費されます。

tgif はこのままでは起動できない。
フォント関係に問題があるというエラーを出し、立ち上がらない。
以下の処置で起動できるようになる。

user<host~> % sudo apt-get install gsfonts-x11
以下のパッケージが新たにインストールされます:
  gsfonts-x11
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
7,356 B のアーカイブを取得する必要があります。
この操作後に追加で 97.3 kB のディスク容量が消費されます。
user<host~> % xset fp rehash

[システム] gnuplot, gnuplot-doc をインストール

user<host~> % sudo apt-get install gnuplot
以下の追加パッケージがインストールされます:
  aglfn gnuplot-data gnuplot-qt liblua5.4-0 libqt5printsupport5
  libwxbase3.0-0v5 libwxgtk3.0-gtk3-0v5
提案パッケージ:
  gnuplot-doc
以下のパッケージが新たにインストールされます:
  aglfn gnuplot gnuplot-data gnuplot-qt liblua5.4-0 libqt5printsupport5
  libwxbase3.0-0v5 libwxgtk3.0-gtk3-0v5
アップグレード: 0 個、新規インストール: 8 個、削除: 0 個、保留: 0 個。
6,883 kB のアーカイブを取得する必要があります。
この操作後に追加で 23.7 MB のディスク容量が消費されます。
user<host~> % sudo apt-get install gnuplot-doc
以下のパッケージが新たにインストールされます:
  gnuplot-doc
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
3,480 kB のアーカイブを取得する必要があります。
この操作後に追加で 11.9 MB のディスク容量が消費されます。

[システム] w3m-el をインストール

user<host~> % sudo apt-get install w3m-el
以下の追加パッケージがインストールされます:
  apel flim
提案パッケージ:
  xemacs21-bin semi wl | wl-beta wv xlhtml ppthtml libmoe1.5 namazu2 perl-doc
  discount | libtext-markdown-perl | markdown
以下のパッケージが新たにインストールされます:
  apel flim w3m-el
アップグレード: 0 個、新規インストール: 3 個、削除: 0 個、保留: 0 個。
834 kB のアーカイブを取得する必要があります。
この操作後に追加で 3,385 kB のディスク容量が消費されます。

[システム] synaptic をインストール

user<host~> % sudo apt-get install synaptic
以下の追加パッケージがインストールされます:
  libept1.6.0 libxapian30
提案パッケージ:
  xapian-tools dwww menu deborphan apt-xapian-index tasksel
以下のパッケージが新たにインストールされます:
  libept1.6.0 libxapian30 synaptic
アップグレード: 0 個、新規インストール: 3 個、削除: 0 個、保留: 0 個。
1,395 kB のアーカイブを取得する必要があります。
この操作後に追加で 5,604 kB のディスク容量が消費されます。

[システム] net-tools (ifconfig), traceroute をインストール

user<host~> % sudo apt-get install net-tools
以下のパッケージが新たにインストールされます:
  net-tools
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
204 kB のアーカイブを取得する必要があります。
この操作後に追加で 819 kB のディスク容量が消費されます。
user<host~> % sudo apt-get install inetutils-traceroute
以下のパッケージが新たにインストールされます:
  inetutils-traceroute
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
43.0 kB のアーカイブを取得する必要があります。
この操作後に追加で 115 kB のディスク容量が消費されます。

[システム] locate をインストール

user<host~> % sudo apt-get install locate
以下のパッケージが新たにインストールされます:
  locate
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
79.4 kB のアーカイブを取得する必要があります。
この操作後に追加で 230 kB のディスク容量が消費されます。

[システム] texlive-full をインストール

user<host~> % sudo apt-get install texlive-full
以下の追加パッケージがインストールされます:
  asymptote asymptote-doc biber chktex cm-super cm-super-minimal context context-modules dvidvi dvipng feynmf fonts-adf-accanthis fonts-adf-berenis fonts-adf-gillius fonts-adf-universalis fonts-arphic-bkai00mp
  fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp fonts-arphic-gkai00mp fonts-arphic-uming fonts-baekmuk fonts-comfortaa fonts-croscore fonts-crosextra-caladea fonts-crosextra-carlito fonts-dejavu-extra
  fonts-ebgaramond fonts-ebgaramond-extra fonts-font-awesome fonts-freefont-otf fonts-gfs-artemisia fonts-gfs-baskerville fonts-gfs-bodoni-classic fonts-gfs-complutum fonts-gfs-didot fonts-gfs-didot-classic
  fonts-gfs-gazis fonts-gfs-neohellenic fonts-gfs-olga fonts-gfs-porson fonts-gfs-solomos fonts-gfs-theokritos fonts-go fonts-hosny-amiri fonts-ipaexfont-gothic fonts-ipaexfont-mincho fonts-ipafont-gothic
  fonts-ipafont-mincho fonts-junicode fonts-linuxlibertine fonts-lobster fonts-lobstertwo fonts-noto-core fonts-oflb-asana-math fonts-roboto-unhinted fonts-sil-charis fonts-sil-gentium fonts-sil-gentium-basic
  fonts-sil-gentiumplus fonts-sil-gentiumplus-compact fonts-stix fonts-texgyre fonts-tlwg-garuda-otf fonts-tlwg-kinnari-otf fonts-tlwg-laksaman-otf fonts-tlwg-loma-otf fonts-tlwg-mono-otf fonts-tlwg-norasi-otf
  fonts-tlwg-purisa-otf fonts-tlwg-sawasdee-otf fonts-tlwg-typewriter-otf fonts-tlwg-typist-otf fonts-tlwg-typo-otf fonts-tlwg-umpush-otf fonts-tlwg-waree-otf fonts-unfonts-core fonts-unfonts-extra fragmaster
  freeglut3 lacheck latex-cjk-all latex-cjk-chinese latex-cjk-chinese-arphic-bkai00mp latex-cjk-chinese-arphic-bsmi00lp latex-cjk-chinese-arphic-gbsn00lp latex-cjk-chinese-arphic-gkai00mp latex-cjk-common
  latex-cjk-japanese latex-cjk-japanese-wadalab latex-cjk-korean latex-cjk-thai latexdiff latexmk lcdf-typetools libalgorithm-c3-perl libapache-pom-java libautovivification-perl libbtparse2
  libbusiness-isbn-data-perl libbusiness-isbn-perl libbusiness-ismn-perl libbusiness-issn-perl libclass-accessor-perl libclass-c3-perl libclass-c3-xs-perl libclass-inspector-perl libclass-singleton-perl
  libcommon-sense-perl libcommons-logging-java libcommons-parent-java libdata-compare-perl libdata-uniqid-perl libdate-simple-perl libdatetime-calendar-julian-perl libdatetime-format-builder-perl
  libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdevel-caller-perl libdevel-globaldestruction-perl libdevel-lexalias-perl libdist-checkconflicts-perl
  libemail-date-format-perl libemf1 libencode-eucjpms-perl libencode-hanextra-perl libencode-jis2k-perl libencode-perl libeval-closure-perl libfile-homedir-perl libfile-sharedir-perl libfile-slurper-perl
  libfile-which-perl libfontbox-java libipc-shareable-perl libjson-perl libjson-xs-perl liblingua-translit-perl liblist-allutils-perl liblog-dispatch-perl liblog-log4perl-perl libmagick++-6.q16-8
  libmail-sendmail-perl libmime-charset-perl libmime-lite-perl libmime-types-perl libmro-compat-perl libnamespace-autoclean-perl libosp5 libostyle1c2 libpadwalker-perl libparams-validate-perl
  libparams-validationcompiler-perl libparse-recdescent-perl libpdfbox-java libplot2c2 libpoppler-qt5-1 libpstoedit0c2a libqt5xml5 libreadonly-perl libref-util-perl libref-util-xs-perl libregexp-common-perl
  libscalar-list-utils-perl libsigsegv2 libsombok3 libsort-key-perl libspecio-perl libstring-crc32-perl libsys-hostname-long-perl libtext-bibtex-perl libtext-csv-perl libtext-csv-xs-perl libtext-roman-perl
  libtext-unidecode-perl libtie-cycle-perl libtk8.6 libtypes-serialiser-perl libunicode-linebreak-perl libxml-libxml-simple-perl libxml-libxslt-perl libxml-writer-perl libxstring-perl libyaml-tiny-perl
  openjade pfb2t1c2pfb prerex preview-latex-style ps2eps pstoedit psutils purifyeps teckit tex-gyre texinfo texlive-bibtex-extra texlive-extra-utils texlive-font-utils texlive-fonts-extra
  texlive-fonts-extra-doc texlive-fonts-extra-links texlive-fonts-recommended texlive-fonts-recommended-doc texlive-formats-extra texlive-games texlive-humanities texlive-humanities-doc texlive-lang-arabic
  texlive-lang-chinese texlive-lang-cjk texlive-lang-cyrillic texlive-lang-czechslovak texlive-lang-english texlive-lang-european texlive-lang-french texlive-lang-german texlive-lang-greek texlive-lang-italian
  texlive-lang-japanese texlive-lang-korean texlive-lang-other texlive-lang-polish texlive-lang-portuguese texlive-lang-spanish texlive-latex-base-doc texlive-latex-extra texlive-latex-extra-doc
  texlive-latex-recommended texlive-latex-recommended-doc texlive-luatex texlive-metapost texlive-metapost-doc texlive-music texlive-pictures texlive-pictures-doc texlive-plain-generic texlive-pstricks
  texlive-pstricks-doc texlive-publishers texlive-publishers-doc texlive-science texlive-science-doc texlive-xetex tipa tk tk8.6 vprerex
提案パッケージ:
  asymptote-x11 perl-tk fontforge context-nonfree auctex hbf-cns40-b5 hbf-jfs56 hbf-kanji48 libgd-barcode-perl libavalon-framework-java libcommons-logging-java-doc libexcalibur-logkit-java liblog4j1.2-java
  libscalar-properties-perl libdbd-csv-perl liblog-dispatch-filerotate-perl librrds-perl libxml-dom-perl libpod2-base-perl default-mta | mail-transport-agent libmojolicious-perl libtest-fatal-perl doc-base
  default-jre-headless xindy python3-pygments icc-profiles libspreadsheet-parseexcel-perl dot2tex tipa-doc
推奨パッケージ:
  fonts-freefont
以下のパッケージが新たにインストールされます:
  asymptote asymptote-doc biber chktex cm-super cm-super-minimal context context-modules dvidvi dvipng feynmf fonts-adf-accanthis fonts-adf-berenis fonts-adf-gillius fonts-adf-universalis fonts-arphic-bkai00mp
  fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp fonts-arphic-gkai00mp fonts-arphic-uming fonts-baekmuk fonts-comfortaa fonts-croscore fonts-crosextra-caladea fonts-crosextra-carlito fonts-dejavu-extra
  fonts-ebgaramond fonts-ebgaramond-extra fonts-font-awesome fonts-freefont-otf fonts-gfs-artemisia fonts-gfs-baskerville fonts-gfs-bodoni-classic fonts-gfs-complutum fonts-gfs-didot fonts-gfs-didot-classic
  fonts-gfs-gazis fonts-gfs-neohellenic fonts-gfs-olga fonts-gfs-porson fonts-gfs-solomos fonts-gfs-theokritos fonts-go fonts-hosny-amiri fonts-ipaexfont-gothic fonts-ipaexfont-mincho fonts-ipafont-gothic
  fonts-ipafont-mincho fonts-junicode fonts-linuxlibertine fonts-lobster fonts-lobstertwo fonts-noto-core fonts-oflb-asana-math fonts-roboto-unhinted fonts-sil-charis fonts-sil-gentium fonts-sil-gentium-basic
  fonts-sil-gentiumplus fonts-sil-gentiumplus-compact fonts-stix fonts-texgyre fonts-tlwg-garuda-otf fonts-tlwg-kinnari-otf fonts-tlwg-laksaman-otf fonts-tlwg-loma-otf fonts-tlwg-mono-otf fonts-tlwg-norasi-otf
  fonts-tlwg-purisa-otf fonts-tlwg-sawasdee-otf fonts-tlwg-typewriter-otf fonts-tlwg-typist-otf fonts-tlwg-typo-otf fonts-tlwg-umpush-otf fonts-tlwg-waree-otf fonts-unfonts-core fonts-unfonts-extra fragmaster
  freeglut3 lacheck latex-cjk-all latex-cjk-chinese latex-cjk-chinese-arphic-bkai00mp latex-cjk-chinese-arphic-bsmi00lp latex-cjk-chinese-arphic-gbsn00lp latex-cjk-chinese-arphic-gkai00mp latex-cjk-common
  latex-cjk-japanese latex-cjk-japanese-wadalab latex-cjk-korean latex-cjk-thai latexdiff latexmk lcdf-typetools libalgorithm-c3-perl libapache-pom-java libautovivification-perl libbtparse2
  libbusiness-isbn-data-perl libbusiness-isbn-perl libbusiness-ismn-perl libbusiness-issn-perl libclass-accessor-perl libclass-c3-perl libclass-c3-xs-perl libclass-inspector-perl libclass-singleton-perl
  libcommon-sense-perl libcommons-logging-java libcommons-parent-java libdata-compare-perl libdata-uniqid-perl libdate-simple-perl libdatetime-calendar-julian-perl libdatetime-format-builder-perl
  libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdevel-caller-perl libdevel-globaldestruction-perl libdevel-lexalias-perl libdist-checkconflicts-perl
  libemail-date-format-perl libemf1 libencode-eucjpms-perl libencode-hanextra-perl libencode-jis2k-perl libencode-perl libeval-closure-perl libfile-homedir-perl libfile-sharedir-perl libfile-slurper-perl
  libfile-which-perl libfontbox-java libipc-shareable-perl libjson-perl libjson-xs-perl liblingua-translit-perl liblist-allutils-perl liblog-dispatch-perl liblog-log4perl-perl libmagick++-6.q16-8
  libmail-sendmail-perl libmime-charset-perl libmime-lite-perl libmime-types-perl libmro-compat-perl libnamespace-autoclean-perl libosp5 libostyle1c2 libpadwalker-perl libparams-validate-perl
  libparams-validationcompiler-perl libparse-recdescent-perl libpdfbox-java libplot2c2 libpoppler-qt5-1 libpstoedit0c2a libqt5xml5 libreadonly-perl libref-util-perl libref-util-xs-perl libregexp-common-perl
  libscalar-list-utils-perl libsigsegv2 libsombok3 libsort-key-perl libspecio-perl libstring-crc32-perl libsys-hostname-long-perl libtext-bibtex-perl libtext-csv-perl libtext-csv-xs-perl libtext-roman-perl
  libtext-unidecode-perl libtie-cycle-perl libtk8.6 libtypes-serialiser-perl libunicode-linebreak-perl libxml-libxml-simple-perl libxml-libxslt-perl libxml-writer-perl libxstring-perl libyaml-tiny-perl
  openjade pfb2t1c2pfb prerex preview-latex-style ps2eps pstoedit psutils purifyeps teckit tex-gyre texinfo texlive-bibtex-extra texlive-extra-utils texlive-font-utils texlive-fonts-extra
  texlive-fonts-extra-doc texlive-fonts-extra-links texlive-fonts-recommended texlive-fonts-recommended-doc texlive-formats-extra texlive-full texlive-games texlive-humanities texlive-humanities-doc
  texlive-lang-arabic texlive-lang-chinese texlive-lang-cjk texlive-lang-cyrillic texlive-lang-czechslovak texlive-lang-english texlive-lang-european texlive-lang-french texlive-lang-german texlive-lang-greek
  texlive-lang-italian texlive-lang-japanese texlive-lang-korean texlive-lang-other texlive-lang-polish texlive-lang-portuguese texlive-lang-spanish texlive-latex-base-doc texlive-latex-extra
  texlive-latex-extra-doc texlive-latex-recommended texlive-latex-recommended-doc texlive-luatex texlive-metapost texlive-metapost-doc texlive-music texlive-pictures texlive-pictures-doc texlive-plain-generic
  texlive-pstricks texlive-pstricks-doc texlive-publishers texlive-publishers-doc texlive-science texlive-science-doc texlive-xetex tipa tk tk8.6 vprerex
アップグレード: 0 個、新規インストール: 249 個、削除: 0 個、保留: 0 個。
3,445 MB のアーカイブを取得する必要があります。
この操作後に追加で 6,223 MB のディスク容量が消費されます。

[システム] libglib2.0-dev をインストール

次の sary のインストールに必要となるパッケージ。

user<host~> % sudo apt-get install libglib2.0-dev
以下の追加パッケージがインストールされます:
  libblkid-dev libffi-dev libglib2.0-dev-bin libmount-dev libpcre16-3
  libpcre2-dev libpcre2-posix3 libpcre3-dev libpcre32-3 libpcrecpp0v5
  libselinux1-dev libsepol-dev pkg-config python3-distutils uuid-dev
  zlib1g-dev
提案パッケージ:
  libgirepository1.0-dev libglib2.0-doc libxml2-utils
以下のパッケージが新たにインストールされます:
  libblkid-dev libffi-dev libglib2.0-dev libglib2.0-dev-bin libmount-dev
  libpcre16-3 libpcre2-dev libpcre2-posix3 libpcre3-dev libpcre32-3
  libpcrecpp0v5 libselinux1-dev libsepol-dev pkg-config python3-distutils
  uuid-dev zlib1g-dev
アップグレード: 0 個、新規インストール: 17 個、削除: 0 個、保留: 0 個。
4,679 kB 中 0 B のアーカイブを取得する必要があります。
この操作後に追加で 22.7 MB のディスク容量が消費されます。

[システム] 英辞郎-144.4(英和) , 英辞郎-144.1(和英・略語) , sdic , sary をインストール

英辞郎 をインストール

英辞郎のテキスト形式は、残念ながらもう入手できない。
昔購入したものが残っているので、それを利用する。
英和辞書だけは 144.4 まで提供されていたが、和英辞書と略語辞書は 144.1 までしか提供されていなかった。

user<host~> % cd packages/eijiro-144.4
user<host~/packages/eijiro-144.4> % unzip EIJIRO-1444.ZIP 
user<host~/packages/eijiro-144.4> % ls
EIJIRO-1444.TXT  EIJIRO-1444.ZIP
user<host~/packages/eijiro-144.4> % cd ../eijiro-144.1
user<host~/packages/eijiro-144.1> % unzip EDP-1441.zip 
user<host~/packages/eijiro-144.1> % ls
EDP-1441.zip  EIJIRO  PDIC-UNI

これらを sdic形式 に変換するスクリプトで変換する。

user<host~/packages/eijiro-144.1> % vim eijiro.pl 

スクリプトはこれ
https://doshaburi.net/document/eijiro/eijiro.pl

user<host~/packages/eijiro-144.1> % chmod a+x eijiro.pl 
user<host~/packages/eijiro-144.1> % cd EIJIRO
user<host~/packages/eijiro-144.1/EIJIRO> % ls
EIJI-1441.TXT  REIJI1441.TXT  RYAKU1441.TXT  WAEI-1441.TXT
user<host~/packages/eijiro-144.1/EIJIRO> % cat ../../eijiro-144.4/EIJIRO-1444.TXT RYAKU1441.TXT | nkf -S -e | ../eijiro.pl | nkf -w8 > eijiro.sdic
user<host~/packages/eijiro-144.1/EIJIRO> % nkf -S -e WAEI-1441.TXT | ../eijiro.pl | nkf -w8 > waeijiro.sdic

eijiro.sdicwaeijiro.sdic の2つが、出来上がった sdic形式 のファイル。
これらを /usr/local/share/dict に格納する。
オーナーは root.root にしておく。

user<host~/packages/eijiro-144.1/EIJIRO> % sudo -s
root@host:/home/user/packages/eijiro-144.1/EIJIRO# chown root.root eijiro.sdic waeijiro.sdic 
root@host:/home/user/packages/eijiro-144.1/EIJIRO# mkdir /usr/local/share/dict
root@host:/home/user/packages/eijiro-144.1/EIJIRO# mv eijiro.sdic /usr/local/share/dict
root@host:/home/user/packages/eijiro-144.1/EIJIRO# mv waeijiro.sdic /usr/local/share/dict
root@host:/home/user/packages/eijiro-144.1/EIJIRO# exit
exit

sary をインストール

作者のサイト http://sary.sourceforge.net/index.html.ja より引用

sary は Suffix Array のライブラリとツールです。Suffix Array と呼ばれるデータ構造を用いることにより、 10MB, 100MB といっ た巨大なテキストファイルに対する高速な全文検索を実現します。 特定の個所だけにインデックスポイントを割り当てることにより、 特定のフィールドのみを検索対象にすることもできます。

上記の作者のサイトからダウンロードできる。
メチャクチャ古いプログラム(2005年)。

sary-1.2.0 をコンパイルするためには libglib2.0-dev というパッケージが必要。
すでにインストールした。

sary 本体をコンパイルし、インストールする。

user<host~> % cd packages/sary-1.2.0
user<host~/packages/sary-1.2.0> % ls
sary_1.2.0-2.1.diff.gz  sary_1.2.0.orig.tar.gz
user<host~/packages/sary-1.2.0> % tar xvzf sary_1.2.0.orig.tar.gz

パッチをあてる必要がある。
どこから入手したのか忘れてしまったが、次のパッチをあてる。

パッチファイルはこれ
https://doshaburi.net/document/sary/sary_1.2.0-2.1.diff.gz

user<host~/packages/sary-1.2.0> % gunzip sary_1.2.0-2.1.diff.gz
user<host~/packages/sary-1.2.0> % patch -p0 < sary_1.2.0-2.1.diff

ここで、次の問題に対処する必要がある。

  • Ubuntu 20.04 あたりでのコンパイラの仕様変更。関数名が標準ライブラリのものと衝突してコンパイルできない。( Ubuntu 16.04では Warning だったものが Error を出すようになった。)
    • sary のパッケージの中のソースファイル builder.cmksary.c を書き換えることで解決。関数 index の関数名を sindex に変更。

まずは sary/builder.c

user<host~/packages/sary-1.2.0> % cd sary-1.2.0
user<host~/packages/sary-1.2.0/sary-1.2.0> % cd sary
user<host~/packages/sary-1.2.0/sary-1.2.0/sary> % mv builder.c builder.c.ORIGINAL
user<host~/packages/sary-1.2.0/sary-1.2.0/sary> % cp builder.c.ORIGINAL builder.c
user<host~/packages/sary-1.2.0/sary-1.2.0/sary> % vim builder.c

書き換えた箇所は

user<host~/packages/sary-1.2.0/sary-1.2.0/sary> % diff builder.c.ORIGINAL builder.c
48c48
< static SaryInt	index		(SaryBuilder	*builder, 
---
> static SaryInt	sindex		(SaryBuilder	*builder, 
127c127
<     count = index(builder, progress, writer);
---
>     count = sindex(builder, progress, writer);
222c222
< index (SaryBuilder *builder, SaryProgress *progress, SaryWriter *writer)
---
> sindex (SaryBuilder *builder, SaryProgress *progress, SaryWriter *writer)

次に、 src/mksary.c

user<host~/packages/sary-1.2.0/sary-1.2.0/sary> % cd ..
user<host~/packages/sary-1.2.0/sary-1.2.0> % cd src
user<host~/packages/sary-1.2.0/sary-1.2.0/src> % mv mksary.c mksary.c.ORIGINAL
user<host~/packages/sary-1.2.0/sary-1.2.0/src> % cp mksary.c.ORIGINAL mksary.c
user<host~/packages/sary-1.2.0/sary-1.2.0/src> % vim mksary.c

書き換えた箇所は

user<host~/packages/sary-1.2.0/sary-1.2.0/src> % diff mksary.c.ORIGINAL mksary.c
62c62
< static void		index			(SaryBuilder *builder,
---
> static void		sindex			(SaryBuilder *builder,
152c152
< index (SaryBuilder *builder,
---
> sindex (SaryBuilder *builder,
189c189
<     index(builder, file_name, array_name);
---
>     sindex(builder, file_name, array_name);
361c361
< 	    process = index;
---
> 	    process = sindex;

以上でコンパイルの準備ができた。
あとは ./configure make make install を行えばよい。

user<host~/packages/sary-1.2.0/sary-1.2.0/src> % cd ..
user<host~/packages/sary-1.2.0/sary-1.2.0> % ./configure 
user<host~/packages/sary-1.2.0/sary-1.2.0> % make
user<host~/packages/sary-1.2.0/sary-1.2.0> % sudo -s
root@host:/home/user/packages/sary-1.2.0/sary-1.2.0# make install
root@host:/home/user/packages/sary-1.2.0/sary-1.2.0# exit
exit

sary による 英辞郎 のインデックス作成

user<host~> % sudo -s
root@host:/home/user# cd /usr/local/share/dict
root@host:/usr/local/share/dict# mksary -c UTF-8 eijiro.sdic
index:	100% |ooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:02
sort:	100% |ooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:24
root@host:/usr/local/share/dict# mksary -c UTF-8 waeijiro.sdic
index:	100% |ooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:02
sort:	100% |ooooooooooooooooooooooooooooooooooooooooo| Time: 00:01:10
root@host:/usr/local/share/dict# exit
exit

sdic をインストール

作者のサイト http://www.namazu.org/~tsuchiya/sdic/ より引用。

SDIC は、Emacs 上で英和/和英辞書を閲覧するための簡潔( simple )で、小さく( small )て、軽く( speedy )て、小粋( smart )なプログラムです。以下のような特長があります。

  1. 派生語を自動的に検索します。 英語には relation や lexicographic のように -tion/-ic などの語尾のついた派生語が頻繁に現れますが、 これら単語が辞書中に見つからなかった場合、自動的に元々の語を検索します。
  2. 動詞や形容詞の規則変化や名詞の複数形を自動的に取り扱います。 例えば、studies と入力すると、study を出力します。
  3. 単純なユーザーインターフェース

上記の作者のサイトからダウンロードできる。

user<host~> % cd packages
user<host~/packages> % tar xvzf sdic-2.1.3.tar.gz 
user<host~/packages> % cd sdic-2.1.3
user<host~/packages/sdic-2.1.3> % ls
AUTHORS      Makefile.in  acinclude.m4  install-sh     mkinstalldirs
COPYING      NEWS         aclocal.m4    install.el     texi
ChangeLog    README       configure     install.el.in
INSTALL      THANKS       configure.in  lisp
Makefile.am  TODO         contrib       missing

この後、いつものように ./configure make make install すればよい、のだが…。

user<host~/packages/sdic-2.1.3> % ./configure

ここで、次の3つの問題に対処する必要がある。

  • 漢字コードとして euc が使われているせいで sdic を起動できない。 Invalid read syntax: "#" というエラーメッセージが出てしまう。
    • sdic のソースファイル( lisp/*.el )の漢字コードを utf8 に変換することで解決。
  • emacs25 と 26 の間での仕様変更のために sdic を起動できない。 default-fill-column がデフォルトで定義されていないようになったため。
    • lisp/sdic.el に次の2行を追加することで解決。
sdic.el
(if (not (boundp 'default-fill-column))
    (setq default-fill-column (default-value 'fill-column)))
  • emacs26 と 27 の間での仕様変更のために sdic を起動できない。 old-style backquote という記法を許さなくなったり、文法が厳しくなったためらしい。
    • ./configure をやった後で次の2つを行うことで解決。
      • lisp/stem.el の中の '(lambda となっている部分の ' を全部消す。
      • lisp/sdic.el の中の `(foo ,bar ,@toto) のような表記をすべて (` (foo (, bar) (,@ toto))) のような形に直す。

情報源
https://tarancho.hatenablog.com/entry/2018/11/06/200511
https://suzuki.tdiary.net/20161226.html
https://www.power.mech.eng.osaka-cu.ac.jp/~takiyama/sdic.html
https://stackoverflow.com/questions/8109665/how-fix-emacs-error-old-style-backquotes-detected
https://sci.hateblo.jp/entry/Backquote_Emacs

まず、ソースファイルの漢字コードを変換する。

user<host~/packages/sdic-2.1.3> % cd lisp
user<host~/packages/sdic-2.1.3/lisp> % ls
Makefile     elisp-comp       sdic-compat.el  sdic.el.in       stem.el
Makefile.am  sample.emacs     sdic-gene.el    sdicf-client.el
Makefile.in  sample.emacs.in  sdic.el         sdicf.el
user<host~/packages/sdic-2.1.3/lisp> % mv sdic.el sdic.el.ORIGINAL
user<host~/packages/sdic-2.1.3/lisp> % nkf -w8 sdic.el.ORIGINAL > sdic.el
user<host~/packages/sdic-2.1.3/lisp> % mv sample.emacs sample.emacs.ORIGINAL
user<host~/packages/sdic-2.1.3/lisp> % nkf -w8 sample.emacs.ORIGINAL > sample.emacs
user<host~/packages/sdic-2.1.3/lisp> % mv sdic-compat.el sdic-compat.el.ORIGINAL
user<host~/packages/sdic-2.1.3/lisp> % nkf -w8 sdic-compat.el.ORIGINAL > sdic-compat.el
user<host~/packages/sdic-2.1.3/lisp> % mv sdic-gene.el sdic-gene.el.ORIGINAL
user<host~/packages/sdic-2.1.3/lisp> % nkf -w8 sdic-gene.el.ORIGINAL > sdic-gene.el
user<host~/packages/sdic-2.1.3/lisp> % mv sdicf-client.el sdicf-client.el.ORIGINAL
user<host~/packages/sdic-2.1.3/lisp> % nkf -w8 sdicf-client.el.ORIGINAL > sdicf-client.el
user<host~/packages/sdic-2.1.3/lisp> % mv sdicf.el sdicf.el.ORIGINAL
user<host~/packages/sdic-2.1.3/lisp> % nkf -w8 sdicf.el.ORIGINAL > sdicf.el
user<host~/packages/sdic-2.1.3/lisp> % mv stem.el stem.el.ORIGINAL
user<host~/packages/sdic-2.1.3/lisp> % nkf -w8 stem.el.ORIGINAL > stem.el

次に、 stem.el を修正する。

user<host~/packages/sdic-2.1.3/lisp> % cp stem.el stem.el.utf.ORIGINAL
user<host~/packages/sdic-2.1.3/lisp> % vim stem.el

書き換えた箇所は

user<host~/packages/sdic-2.1.3/lisp> % diff stem.el.utf.ORIGINAL stem.el
887c887
< 	(append (mapcar '(lambda (s) (concat stem s)) l)
---
> 	(append (mapcar (lambda (s) (concat stem s)) l)
912c912
< 			     '(lambda (func)
---
> 			     (lambda (func)

次に、 sdic.el を修正する。

user<host~/packages/sdic-2.1.3/lisp> % cp sdic.el sdic.el.utf.ORIGINAL
user<host~/packages/sdic-2.1.3/lisp> % vim sdic.el

書き換えた箇所は

user<host~/packages/sdic-2.1.3/lisp> % diff sdic.el.utf.ORIGINAL sdic.el
92a93,100
> ;;; emacs 26 以降で
> ;;; default-fill-column が定義されていない
> ;;; ことへの対処
> 
> (if (not (boundp 'default-fill-column))
>     (setq default-fill-column (default-value 'fill-column)))
> 
> 
365c373
<   (` (cond
---
>   `(cond
367,368c375,376
<       ((and (equal ?' (string-to-char (, query)))
< 	    (equal "'" (substring (, query) -1)))
---
>       ((and (equal ?' (string-to-char ,query))
> 	    (equal "'" (substring ,query -1)))
370c378
< 	(sdic-search-multi-dictionaries (, dic-list) (substring (, query) 1 -1) 'lambda)))
---
> 	(sdic-search-multi-dictionaries ,dic-list (substring ,query 1 -1) 'lambda)))
372c380
<       ((equal ?/ (string-to-char (, query)))
---
>       ((equal ?/ (string-to-char ,query))
374c382
< 	(sdic-search-multi-dictionaries (, dic-list) (substring (, query) 1) 0)))
---
> 	(sdic-search-multi-dictionaries ,dic-list (substring ,query 1) 0)))
376c384
<       ((equal ?* (string-to-char (, query)))
---
>       ((equal ?* (string-to-char ,query))
378c386
< 	(sdic-search-multi-dictionaries (, dic-list) (substring (, query) 1) t)))
---
> 	(sdic-search-multi-dictionaries ,dic-list (substring ,query 1) t)))
380c388
<       ((equal "*" (substring (, query) -1))
---
>       ((equal "*" (substring ,query -1))
382c390
< 	(sdic-search-multi-dictionaries (, dic-list) (substring (, query) 0 -1))))
---
> 	(sdic-search-multi-dictionaries ,dic-list (substring ,query 0 -1))))
385c393
<        (,@ sexp)))))
---
>        ,@sexp)))

晴れて make make install

user<host~/packages/sdic-2.1.3/lisp> % make
user<host~/packages/sdic-2.1.3/lisp> % sudo make install

さらに、ユーザーの ~/.emacs.el

.emacs.el
(autoload 'sdic-describe-word "sdic" "sdic 英和・和英辞書検索" t nil)
(autoload 'sdic-describe-word-at-point "sdic" "sdic 英和・和英辞書検索" t nil)

を入れておく必要がある。

sdic が sary を使うようにするための設定

ユーザーの ~/.emacs.el に以下を追加する。

.emacs.el
(eval-after-load "sdic"
  '(progn
     ;; saryのコマンドをセットする
     (setq sdicf-array-command "/usr/local/bin/sary")
     ;; saryを直接使用できるように sdicf.el 内に定義されているarrayコマンド用関数を強制的に置換
     (fset 'sdicf-array-init 'sdicf-common-init)
     (fset 'sdicf-array-quit 'sdicf-common-quit)
     (fset 'sdicf-array-search
           (lambda (sdic pattern &optional case regexp)
             (sdicf-array-init sdic)
             (if regexp
                 (signal 'sdicf-invalid-method '(regexp))
               (save-excursion
                 (set-buffer (sdicf-get-buffer sdic))
                 (delete-region (point-min) (point-max))
                 (apply 'sdicf-call-process
                        sdicf-array-command
                        (sdicf-get-coding-system sdic)
                        nil t nil
                        (if case
                            (list "-i" pattern (sdicf-get-filename sdic))
                          (list pattern (sdicf-get-filename sdic))))
                 (goto-char (point-min))
                 (let (entries)
                   (while (not (eobp)) (sdicf-search-internal))
                   (nreverse entries))))))))

ユーザー設定

私の ~/.emacs.el の一部。
調べたい単語にカーソルを置いて Insert キーを押すと辞書が表示されるようにしている。

.emacs.el
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; sdic
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; emacs 26以降 対策

(if (not (boundp 'default-fill-column))
    (setq default-fill-column (default-value 'fill-column)))

;; sdic 英辞郎 英和・和英辞書
(autoload 'sdic-describe-word "sdic" "sdic 英和・和英辞書検索" t nil)
(autoload 'sdic-describe-word-at-point "sdic" "sdic 英和・和英辞書検索" t nil)

;; インデックスの検索に sary を使う設定
;; これがなければ sdic はインデックスの検索に sufary を使うらしい

(eval-after-load "sdic"
  '(progn
     ;; saryのコマンドをセットする
     (setq sdicf-array-command "/usr/local/bin/sary")
     ;; saryを直接使用できるように sdicf.el 内に定義されているarrayコマンド用関数を強制的に置換
     (fset 'sdicf-array-init 'sdicf-common-init)
     (fset 'sdicf-array-quit 'sdicf-common-quit)
     (fset 'sdicf-array-search
           (lambda (sdic pattern &optional case regexp)
             (sdicf-array-init sdic)
             (if regexp
                 (signal 'sdicf-invalid-method '(regexp))
              (save-excursion
                 (set-buffer (sdicf-get-buffer sdic))
                 (delete-region (point-min) (point-max))
                 (apply 'sdicf-call-process
                        sdicf-array-command
                        (sdicf-get-coding-system sdic)
                        nil t nil
                        (if case
                            (list "-i" pattern (sdicf-get-filename sdic))
                          (list pattern (sdicf-get-filename sdic))))
                 (goto-char (point-min))
                 (let (entries)
                   (while (not (eobp)) (sdicf-search-internal))
                   (nreverse entries))))))))

;; 英和辞書
(setq sdic-eiwa-dictionary-list
      '((sdicf-client "/usr/local/share/dict/eijiro.sdic" (strategy array))))
;; 和英辞書
(setq sdic-waei-dictionary-list
      '((sdicf-client "/usr/local/share/dict/waeijiro.sdic" (strategy array))))

;; コーディング
(setq sdic-default-coding-system 'utf-8-unix)

;;;; キー設定
(global-set-key "\C-cw" 'sdic-describe-word) ; カーソル位置の語を検索する
(global-set-key [insert] 'sdic-describe-word-at-point) ; overwrite-mode
(global-set-key [pause] 'sdic-describe-word) ; nil
(global-set-key [Scroll_Lock] 'sdic-describe-region) ; nil

;; 検索結果表示ウインドウの高さ
(setq sdic-window-height 20)

;; 検索結果表示ウインドウにカーソルを移動しないようにする
(setq sdic-disable-select-window t)

;; 見出し語を表示するために使うフェイスと色
(setq sdic-face-style 'bold)
(setq sdic-face-color "PaleGreen")
;(setq sdic-face-color "Violet")

;; 検索結果表示バッファで引いた単語をハイライト表示する
(defvar sdic-highlighted-pattern nil)
(make-face 'sdic-highlight-face)
(set-face-background 'sdic-highlight-face "DarkGreen")
;(set-face-background 'sdic-highlight-face "FireBrick4")
(defadvice sdic-search-eiwa-dictionary (after highlight-phrase (arg))
  (progn
    (unhighlight-regexp sdic-highlighted-pattern)
    (highlight-phrase arg "sdic-highlight-face")
    (setq sdic-highlighted-pattern arg)))
(defadvice sdic-search-waei-dictionary (after highlight-phrase (arg))
  (progn
    (unhighlight-regexp sdic-highlighted-pattern)
    (highlight-phrase arg "sdic-highlight-face")
    (setq sdic-highlighted-pattern arg)))
(ad-activate 'sdic-search-eiwa-dictionary)
(ad-activate 'sdic-search-waei-dictionary)

以上で、 emacs から sdic を通して 英辞郎 で辞書を引くことができるようになった。
とても便利!

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2