- 1. 概要
- 2. インストール
- 3. シャットダウンユーザの設定
- 4. /etc/rc.conf 編集
- 5. ユーザ用初期化ファイルの作成
- 6. xfce 起動
1. 概要
下記のデスクトップ環境を構築する手順を記述します。
システム | FreeBSD 11.3 RELEASE(VirtualBox 6.0.10 上の amd64) |
ログインマネージャ | Slim |
日本語入力 | fcitx-mozc |
インストーラ入手や OS のインストール、sendmail 無効化と pkg update までは「FreeBSD のOSインストール」を参照してください。
2. インストール
pkg install xorg
pkg install japanese/font-std
pkg install ja-fcitx-mozc zh-fcitx-configtool
pkg install slim slim-themes
pkg install x11-wm/xfce4
xfce4 のインストール時、まとめて 116 パッケージがインストールされました。
後で読み返す必要が出てきそうな気がしたので、長いですが、記録しておきます。
Message from xmlcatmgr-2.2_2:
The following catalogs are installed:
1) /usr/local/share/sgml/catalog
The top level catalog for SGML stuff. It is not changed
by any ports/packages except textproc/xmlcatmgr.
2) /usr/local/share/sgml/catalog.ports
This catalog is for handling SGML stuff installed under
/usr/local/share/sgml. It is changed by ports/packages.
3) /usr/local/share/xml/catalog
The top level catalog for XML stuff. It is not changed
by any ports/packages except textproc/xmlcatmgr.
4) /usr/local/share/xml/catalog.ports
This catalog is for handling XML stuff installed under
/usr/local/share/xml. It is changed by ports/packages.
Message from py27-setuptools-41.0.1:
*******************************************************************
Only /usr/local/bin/easy_install-2.7 script has been installed
since Python 2.7 is not the default Python version.
*******************************************************************
Message from cmocka-1.1.3:
=================================================================
For more information on using cmocka, see https://api.cmocka.org
=================================================================
Message from openldap-client-2.4.47:
************************************************************
The OpenLDAP client package has been successfully installed.
Edit
/usr/local/etc/openldap/ldap.conf
to change the system-wide client defaults.
Try `man ldap.conf' and visit the OpenLDAP FAQ-O-Matic at
http://www.OpenLDAP.org/faq/index.cgi?file=3
for more information.
************************************************************
Message from libinotify-20180201_1:
============================================================================
Libinotify functionality on FreeBSD is missing support for
- detecting a file being moved into or out of a directory within the
same filesystem
- certain modifications to a symbolic link (rather than the
file it points to.)
in addition to the known limitations on all platforms using kqueue(2)
where various open and close notifications are unimplemented.
This means the following regression tests will fail:
Directory notifications:
IN_MOVED_FROM
IN_MOVED_TO
Open/close notifications:
IN_OPEN
IN_CLOSE_NOWRITE
IN_CLOSE_WRITE
Symbolic Link notifications:
IN_DONT_FOLLOW
IN_ATTRIB
IN_MOVE_SELF
IN_DELETE_SELF
Kernel patches to address the missing directory and symbolic link
notifications are available from:
https://github.com/libinotify-kqueue/libinotify-kqueue/tree/master/patches
=============================================================================
You might want to consider increasing the kern.maxfiles tunable if you plan
to use this library for applications that need to monitor activity of a lot
of files.
=============================================================================
Message from gamin-0.1.10_10:
===============================================================================
Gamin will only provide realtime notification of changes for at most n files,
where n is the minimum value between (kern.maxfiles * 0.7) and
(kern.maxfilesperproc - 200). Beyond that limit, files will be polled.
If you often open several large folders with Nautilus, you might want to
increase the kern.maxfiles tunable (you do not need to set
kern.maxfilesperproc, since it is computed at boot time from kern.maxfiles).
The behavior of gamin can be controlled via the various gaminrc files.
See http://www.gnome.org/~veillard/gamin/config.html on how to create
these files. In particular, if you find gam_server is taking up too much
CPU time polling for changes, something like the following may help
in one of the gaminrc files:
# reduce polling frequency to once per 10 seconds
# for UFS file systems in order to lower CPU load
fsset ufs poll 10
===============================================================================
===> NOTICE:
The gamin 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 fusefs-libs-2.9.9:
Install the fuse kernel module to use this port.
Message from samba48-4.8.12_3:
===============================================================================
How to start: http://wiki.samba.org/index.php/Samba4/HOWTO
* Your configuration is: /usr/local/etc/smb4.conf
* All the relevant databases are under: /var/db/samba4
* All the logs are under: /var/log/samba4
* Provisioning script is: /usr/local/bin/samba-tool
For additional documentation check: http://wiki.samba.org/index.php/Samba4
Bug reports should go to the: https://bugzilla.samba.org/
===============================================================================
Message from xfce4-tumbler-0.2.5:
To override the default configuration, you must copy the rc-file:
mkdir ~/.config/tumbler
cp /usr/local/etc/xdg/tumbler/tumbler.rc ~/.config/tumbler
The COVER plugin requires manual configuration.
For more information see http://docs.xfce.org/xfce/thunar/tumbler
Message from xfce4-terminal-0.8.8:
Some options could need manual change to ~/.config/xfce4/terminal/terminalrc:
To reduce the height of tabs, add the hidden 'MiscSlimTabs' option:
MiscSlimTabs=TRUE
By default this option is not defined.
If you have configured a custom color cursor you will also need to add:
ColorCursorUseDefault=FALSE
to have such configuration still working, otherwise reconfigure the color
in the GUI.
Keep in mind, when you change an option in Preferences window, this file
is overwritten.
Message from xfce4-session-4.12.1_6:
To be able to shutdown or reboot your system, you'll have to add .rules
files in /usr/local/etc/polkit-1/rules.d directory. Which looks
like this (replace PUTYOURGROUPHERE by your group):
polkit.addRule(function (action, subject) {
if ((action.id == "org.freedesktop.consolekit.system.restart" ||
action.id == "org.freedesktop.consolekit.system.stop")
&& subject.isInGroup("PUTYOURGROUPHERE")) {
return polkit.Result.YES;
}
});
For those who have working suspend/resume:
polkit.addRule(function (action, subject) {
if (action.id == "org.freedesktop.consolekit.system.suspend"
&& subject.isInGroup("PUTYOURGROUPHERE")) {
return polkit.Result.YES;
}
});
2019年7月19日、インストール時のバージョンは下記の通りでした。
> pkg info xfce
xfce-4.12_1
Name : xfce
Version : 4.12_1
Installed on : Fri Jul 19 12:40:17 2019 JST
Origin : x11-wm/xfce4
Architecture : FreeBSD:11:*
Prefix : /usr/local
Categories : xfce x11-wm
Licenses :
Maintainer : xfce@FreeBSD.org
WWW : http://www.xfce.org/
Comment : The "meta-port" for the Xfce Desktop Environment
Options :
APPFINDER : on
ICONS : on
MIXER : off
MOUSEPAD : on
NOTIFY : on
ORAGE : on
PRINT : off
SLIM : off
SQUEEZE : off
TERMINAL : on
XPM : off
Annotations :
repo_type : binary
repository : FreeBSD
Flat size : 0.00B
Description :
Xfce Desktop Environment
This package does not contain anything by itself - it is a "meta-port" that
depends on other Xfce packages.
WWW: http://www.xfce.org/
3. シャットダウンユーザの設定
一般ユーザからもシャットダウンできるようにします。
逆に、一般ユーザからシャットダウンさせないようにするにはこの手順を行わないでください。
下記のファイルを作成して
/usr/local/etc/polkit-1/localauthority/50-local.d/org.freedesktop.consolekit.pkla
以下のように記述します。
[Local restart]
Idendity=unix-group:power
Action=org.freedesktop.consolekit.system.restart
ResultAny=yes
ResultInactive=yes
ResultActive=yes
[Local shutdown]
Idendity=unix-group:power
Action=org.freedesktop.consolekit.system.stop
ResultAny=yes
ResultInactive=yes
ResultActive=yes
[Local restart - multiple]
Idendity=unix-group:power
Action=org.freedesktop.consolekit.system.restart-multiple-users
ResultAny=yes
ResultInactive=yes
ResultActive=yes
[Local shutdown - multiple]
Idendity=unix-group:power
Action=org.freedesktop.consolekit.system.stop-multiple-users
ResultAny=yes
ResultInactive=yes
ResultActive=yes
[Suspend Hibernate]
Idendity=unix-group:power
Action=org.freedesktop.upower.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
電源操作用のグループを作成します。
pw groupadd power
/etc/group
の power に wheel,operator,power を追加します。
power:*:1002:wheel,operator,power
group 番号は、タイミングによって異なります。
「wheel,operator,power」を行末に追加しています。
4. /etc/rc.conf 編集
/etc/rc.conf に以下の行を加えます。
slim_enable="YES"
dbus_enable="YES"
polkitd_enable="YES"
5. ユーザ用初期化ファイルの作成
~/.xinitrc
というファイルを作成し、以下のように記述します。
#!/bin/sh
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
exec $1
新規ユーザのために作成したものを /usr/share/skel にコピーしておきます。
cp /home/ユーザ名/.xinitrc /usr/share/skel/dot.xinitrc
6. xfce 起動
上記までの設定が終わったら、デーモン群を起動します。
service dbus start
service slim start
うまく設定できていれば、ログイン画面が表示されます。
ユーザ名・パスワードを入力してログインします・・・が、初回ログインの前に「XFCE - FreeBSD 11.3 RELEASE - 基本操作」の「初回ログイン時の設定」へ GO。
|