GhostBSDのインストール
初めに
FreeBSDの実機が欲しかったのですがGUI構築に敗北したので、よりインストールが簡単なGhostBSDをインストールします。そん時のメモ
目次
- 初めに
- 目次
- インストール元
- ハンドブック(PDF)
- インストール手順
- 日本語設定
- ディレクトリを英語に変更
- X230においてのトラックパッドでのスクロールを有効にする
- Chromium
- VScode
- へッドホンから音がでない問題
- libreofficeの日本語化
- Transmissionのアンインストール
- guakeのインストール
- virtualboxのインストール
インストール元
ハンドブック(PDF)
freebsdのものですが日本語版ハンドブックのようです
https://download.freebsd.org/ftp/doc/ja/books/handbook/book.pdf
インストール手順
直観的なので飛ばす
ZFS+fishでインストールした
日本語設定
fcitx+mozcのインストール
左上のシステム->システム管理->Software Station 起動する
以下のソフトウェアにチェックをつける
・ja-fcitx-mozc
・zh-fcitx-configtool
appyを押してダウンロード && インストール
再ログイン
各種設定
~/.xprofileに
# fcitx export GTK_IM_MODULE=fcitx export QT_IM_MODULE=xim export XMODIFIERS=@im=fcitx /usr/local/bin/mozc start fcitx -r -d
を追記
ディレクトリを英語に変更
LANG=C xdg-user-dirs-update --force
をし、手動で日本語ディレクトリを消す
X230においてのトラックパッドでのスクロールを有効にする
sudo nano /etc/rc.conf
を開く(かなり重要なファイルなので注意)
moused_enable="YES" moused_flags="-V"
以上を追記
再起動
暴れ馬みたいになるが、動くようにはなる。
暴れ馬になっているのではなくて、スクロールの時のポインタを傾ける向きが上下ではなく左右になっていました。ハードウェア設定で変えれそうですが、いまんところそのままにしておきます。
Hフラグ消したら普通になりました。(横スクロールはできませんが...)
参考
FreeBSD on the Lenovo ThinkPad X230 | The Cyber Vanguard
Chromium
ChromeのFreeBSD対応バイナリは残念ながらないので(´;ω;`)ウゥゥ
Software StationからChromiumと検索しダウンロードしインストール
キーリングの設定がうまくいかないので、当分はfirefoxを使用します。(割と普段使いのPCにしようと思っているので)
VScode
VScodeといってもVScode-ossをFreeBSD向けに変更した奴みたいです。
Software Stationからvscodeと検索し、ダウンロード+インストール
へッドホンから音がでない問題
FreeBSDの場合自動でのサウンドの切り替えが行われないようです。
ヘッドホンを有効にする場合
sudo sysctl hw.snd.default_unit=1
内臓スピーカを有効にする場合
sudo sysctl hw.snd.default_unit=0
音声変更のボタンは反応しないかつ右上の音量ボタンも動かないのでアプリケーション->サウンドとビデオ->サウンドから直接設定します。
①/etc/sysctl.confに以下を追記(sudo nano /etc/sysctl.conf
)すればデフォルトをヘッドホンにして再生することができます(内臓スピーカとかそうそう使わないし)
hw.snd.default_unit=1
参考
②snd_hdaドライバを使用する
/boot/loader.conf
に以下を記載
snd_hda_load="YES"
そして、/boot/device.hints
に以下を記載
hint.hdaa.0.nid20.config="as=1 seq=0 device=Speaker" hint.hdaa.0.nid21.config="as=1 seq=15 device=Headphones"
しかし、ミュートボタンが内臓スピーカにしか適応されてないです。
参考
FreeBSD on the Lenovo ThinkPad X230 | The Cyber Vanguard
libreofficeの日本語化
Software Stationからja-libreofficeをインストール
Transmissionのアンインストール
万が一にも有効になったら怒られちゃうので
Software Stationから検索し、チェックを外しApply
guakeのインストール
Software Stationから検索しインストール
端末から起動するといくつかWarningをはくけど、うごくので良しとする。
自動起動に入れる
コントロールセンターから自動起動するアプリを開く
その後、追加を選択し以下のような記述をする。
再起動すれば自動起動するようになっている。
virtualboxのインストール
今回はインストール後の設定ファイルに関するログがコワイのでpkgコマンドを使用しインストールを行う。
sudo pkg install virtualbox-ose
以下がログ
Message from aalib-1.4.r5_13: -- ===> NOTICE: The aalib port currently does not have a maintainer. As a result, it is more likely to have unresolved issues, not be up-to-date, or even be removed in the future. To volunteer to maintain this port, please create an issue at: https://bugs.freebsd.org/bugzilla More information about port maintainership is available at: https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port ===== Message from sdl-1.2.15_14,2: -- Your SDL library has been built with libvgl support, which means that you can run almost any SDL application straight on your console (VESA 2.0 compatible videocard is required). To do this you have to load the vesa kernel module or enable it in your kernel, and set environment variable "SDL_VIDEODRIVER=vgl". ===== Message from virtualbox-ose-5.2.34_4: -- VirtualBox was installed. You need to load the vboxdrv kernel module via /boot/loader.conf: vboxdrv_load="YES" You also have to add all users to your vboxusers group in order to use vbox. % pw groupmod vboxusers -m jerry Reboot the machine to load the needed kernel modules. Bridging Support: ================= For bridged networking please add the following line to your /etc/rc.conf: vboxnet_enable="YES" USB Support: ============ For USB support your user needs to be in the operator group and needs read and write permissions to the USB device. % pw groupmod operator -m jerry Add the following to /etc/devfs.rules (create if it doesn't exist): [system=10] add path 'usb/*' mode 0660 group operator To load these new rule add the following to /etc/rc.conf: devfs_system_ruleset="system" Then restart devfs to load the new rules: % /etc/rc.d/devfs restart Troubleshooting: ================ Running VirtualBox as non-root user may fail with a fatal error NS_ERROR_FACTORY_NOT_REGISTERED. In this case delete /tmp/.vbox-*-ipc file. If you experience "Network: write Failed: Cannot allocate memory" errors try to increase net.graph.maxdata in /boot/loader.conf If you are using AIO, then increase these limits (PR#168298): vfs.aio.max_buf_aio=8192 vfs.aio.max_aio_queue_per_proc=65536 vfs.aio.max_aio_per_proc=8192 vfs.aio.max_aio_queue=65536 To check if AIO is used use: kldstat -v | grep aio Check wiki page for known issues and troubleshooting: http://wiki.freebsd.org/VirtualBox Please report any problems to emulation@. Thanks! -- ===> NOTICE: This port is deprecated; you may wish to reconsider installing it: Uses Python 2.7 which is EOLed upstream. It is scheduled to be removed on or after 2020-12-31.
といってもwikiに書いてあることとあんま変わりませんね。(というかwikiの方が詳しい)
各種設定
X230にCD/DVDドライブはないのでホストのCD/DVDを使用する設定はパス
vboxのモジュール
まず、virtualboxのモジュールを起動時に読み込むようにする。
sudo nano /boot/loader.conf
以下を追記
vboxdrb_load="YES"
ネットワーク
vboxnet_enable="YES"は自動で書き込んでいるみたいなのでパス
グループや権限関係
vboxusersに使用するユーザーを追加
sudo pw groupmod vboxusers -m yourusername
ブリッジネットワークを利用時にアクセス拒否されるのを防ぐために
sudo chown root:vboxusers /dev/vboxnetctl sudo chmod 0660 /dev/vboxnetctl
そして、以上の変更を永続化するために
sudo nano /etc/devfs.conf
以下を追記
own vboxnetctl root:vboxusers perm vboxnetctl 0660
USBサポートを有効にする
ホストのUSBにアクセスできるようにする。
その場合、ユーザーがグループのoperatorに所属していなければならない
確認方法
id <username>
無ければ(おそらくあるが…)
sudo pw groupmod operator -m <yourusername>
次に
sudo nano /etc/devfs.rules
に以下を追記
[system=10] add path 'usb/*' mode 0660 group operator
そして
sudo nano /etc/rc.conf
以下を記載
devfs_system_ruleset="system"
そして再起動