This section describes the installation and configuration procedure for using the desktop environment called Xfce4 on FreeBSD on Linux + qemu.
In each explanation below, the command to be actually executed is described in the following format.
#pkg install package name
Actually, when you execute the above command, the progress of package installation is displayed, but these are omitted on this page.
Uses Ubuntu 20.04.1 LTS.
Log in as root on FreeBSD and install the following packages.
# pkg install xorg
# pkg install xfce
# pkg install japanese/font-std
# pkg install ja-fcitx-mozc
# pkg install firefox
From top to bottom
In the above example, the packages are specified one by one, but you can also specify them collectively as follows.
# pkg install xorg xfce japanese/font-std ja-fcitx-mozc firefox
Since Xfce4 uses D-Bus, follow the steps below to start D-Bus.
# sysrc dbus_enable="YES"
# service dbus start
Exit the shell running with root privileges, and then log back in with general user privileges.
# exit
logout
FreeBSD/amd64 (fbsd122) (ttyv0)
login: yamada
Password:
$
Use a text editor such as vi/emacs to create a .xinitrc file in your home directory and write the following settings.
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
/usr/local/bin/fcitx -r -d
exec /usr/local/bin/xfce4-session
If you are using a Japanese keyboard, put the following line just before the last line xfce4-session.
/usr/local/bin/setxkbmap -layout jp
Run the startx command to start the desktop environment.
$ startx
If the Xfce4 desktop environment is displayed as shown below, it is successful.
Click "Applications" in the upper left to display the menu. Click "Web Browser" in the menu to start Firefox. To enter Japanese, press the Ctrl and Spacebar keys at the same time. Enter characters and convert with the SPACE key. Press Ctrl and Spacebar again at the same time to return to English input.
Click "Username" in the upper right to display the menu. Click "Logout" to exit the desktop environment.
If you encounter problems such as "Desktop environment is not displayed" or "Japanese cannot be entered", check the contents of the .xinitrc file created under your home directory.
Recommended Posts