コンピュータ/ソフトウェア関連Tips

xfce、日本語フォント、ブラウザ

作成日: Jul 21, 2019
更新日: Jul 21, 2019
カテゴリー: FreeBSD タグ: FreeBSD

xfce4のセットアップメモです。

$ sudo pkg install xorg xfce
$ sudo vi /etc/rc.conf
dbus_enable="YES"

を追加。

$ cd
$ vi .xinitrc
vmware-user-suid-wrapper &
. /usr/local/etc/xdg/xfce4/xinitrc

一旦再起動、ログインし直して、

$ startx

再起動ではなく、「$ sudo service dbus start」でも良かったのかも。

日本語フォントの追加

いくつか参考になるページを見てみたのだが、ページ毎にインストールしているフォントが違った。

$ sudo pkg install -g 'ja-font-*'

で一気にインストールして、不要なフォントを削除する作戦に。2020年10月25日時点では、以下の状況。

Number of packages to be installed: 43

The process will require 2 GiB more space.
824 MiB to be downloaded.

と表示された。

Ricty Diminishedの追加

portsには RictyとRicty Discordはあるが、Ricty Diminishedが無い。

$ psearch font|grep ricty
japanese/font-ricty       Programming fonts with Japanese support
japanese/font-ricty-discord Ricty Discord - fonts for programming

GitHubからzip形式でダウンロードして ~/.fonts 内に RictyDiminished というディレクトリを作成し、その中に、ttfを保存。

./.fonts/RictyDiminished
./.fonts/RictyDiminished/README.md
./.fonts/RictyDiminished/RictyDiminished-Bold.ttf
./.fonts/RictyDiminished/RictyDiminished-BoldOblique.ttf
./.fonts/RictyDiminished/RictyDiminished-Oblique.ttf
./.fonts/RictyDiminished/RictyDiminished-Regular.ttf
./.fonts/RictyDiminished/RictyDiminishedDiscord-Bold.ttf
./.fonts/RictyDiminished/RictyDiminishedDiscord-BoldOblique.ttf
./.fonts/RictyDiminished/RictyDiminishedDiscord-Oblique.ttf
./.fonts/RictyDiminished/RictyDiminishedDiscord-Regular.ttf

日本語入力

https://freebsd.sing.ne.jp/desktop/03/05/01.html を参考にして、

$ sudo pkg install ja-fcitx-mozc zh-fcitx-configtool
=====
Message from qtchooser-66_4:

--
qtchooser is a wrapper that allows to specify Qt version of 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 "qtX", where X is desired Qt
version, provided that it is offered by the Ports Collection. See qtchooser(1)
for more information.
=====
Message from zh-fcitx-4.2.9.7:

--
Remember to set the environment variable XMODIFIERS:

        csh/tcsh:       setenv XMODIFIERS @im=fcitx
        sh/bash:        export XMODIFIERS='@im=fcitx'

For GTK+ programs, you may want to set:

        csh/tcsh:       setenv GTK_IM_MODULE fcitx
                        setenv GTK3_IM_MODULE fcitx
        sh/bash:        export GTK_IM_MODULE=fcitx
                        export GTK3_IM_MODULE=fcitx

For Qt4 programs, we recommend you to use

        qtconfig-qt4: /usr/ports/misc/qt4-qtconfig

instead of to manually set QT4_IM_MODULE.

To start fcitx with your desktop, just

        cp /usr/local/share/applications/fcitx.desktop \
            ~/.config/autostart/
=====
Message from ja-fcitx-mozc-2.23.2815.102.01_1:

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

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=xim
export XMODIFIERS=@im=fcitx
/usr/local/bin/mozc start
fcitx -r -d

上記、インストーラのメッセージと、https://freebsd.sing.ne.jp/desktop/03/05/01.html を参考にして、~/.xinitrcを以下のように設定。

#!/bin/sh
# set locale
export LC_ALL=ja_JP.UTF-8
export LANGUAGE=ja_JP.UTF-8
export LANG=ja_JP.UTF-8
#
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=xim
export XMODIFIERS=@im=fcitx
/usr/local/bin/mozc start
fcitx -r -d
#
setxkbmap -layout jp

vmware-user-suid-wrapper &
. /usr/local/etc/xdg/xfce4/xinitrc

xfce起動

$ startx

壁紙(ネズミ)が無くなり、黒背景となった。壁紙設定もメニューから消えてしまった。

ブラウザ

$ sudo pkg install firefox chromium

Chromium の実行可能ファイルは、 /usr/local/bin/chrome。 /usr/local/bin/chromium ではない。

Message from firefox-82.0,2:

--
## Missing features

Some features found on Windows, macOS and Linux are not implemented:

- Encrypted Media Extensions (requires Widevine CDM binary)
- Process sandboxing (requires Capsicum backend)
- Reduced memory usage (requires mozjemalloc)
- Crash Reporter (requires Google Breakpad and reproducible builds)
- Gamepad API (requires libusbhid backend)
- WebVR (requires open source runtime)
- TCP fast open
- `about:networking` (requires link state notification)

## Audio backend

Currently used audio backend can be inspected on `about:support` page.
Supported backends and default probing order is as follows:
- `pulse-rust` if `pulseaudio` package is installed (PULSEAUDIO option)
- `jack` if `jackit` package is installed (JACK option)
- `sndio` if `sndio` package is installed (SNDIO option)
- `alsa` if `alsa-lib` package is installed (ALSA option)
- `oss` (always available)
To force a specific backend open `about:config` page and create
`media.cubeb.backend` preference.

Microphone selection only works in `oss`, `pulse`, `pulse-rust` backends.
Other backends are limited to `default` which is usually `/dev/dsp`,
so use virtual_oss to reroute microphones from non-default devices.

## smb:// issues
Network group, machine, and share browsing does not work correctly.

## sftp://
Only sftp access using public key authentication works. To easily
setup public key authentication to `remote_host`:

    $ ssh-keygen
    $ cat ~/.ssh/id_rsa.pub | ssh remote_host "cat >> .ssh/authorized_keys"

The SSH server on `remote_host` must allow pub key authentication.
=====
Message from chromium-84.0.4147.135:

--
Chromium has a known problem of hanging tabs. The bug has been fixed
in r337328. Therefore, it is recommended to upgrade the system after
the correction date.

    # svn diff -c337328 --summarize svn://svn.freebsd.org/base

See PR 212812 for further details.
--
===>   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.