portage
<https://wiki.gentoo.org/wiki/Gentoo_Cheat_Sheet>桌面
fcitx
配置注意事项
- 解决与ibus冲突
GNOME编译时直接把ibus作为依赖包,gentoo下默认安装都会导致ibus安装,再安装fcitx后,fcitx会无法启动。要移除gnome对ibus的依赖,可在/etc/portage/package.use对几个关键gnome包作如下配置:
`` example
gnome-base/gnome-shell -i18n
gnome-base/gnome-control-center -i18n
gnome-base/gnome-settings-daemon -i18n
USE设置中去掉i8n,接下来就可以移除ibus了:
example
emerge --unmerge ibus
- 设置输入法相关环境变量 fcitx官方网站有环境变量的说明:
<https://fcitx-im.org/wiki/Input_method_related_environment_variables>
环境变量的配置与fcitx的USE设置有关,我在目前有用的.xprofile文件内容如下:
bash
export XIM=fcitx
export XIM_PROGRAM=fcitx
export XMODIFIERS="@im=fcitx"
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim
fcitx官方网站推荐的USE设置:
<https://www.fcitx-im.org/wiki/Install_%28Gentoo%29>
Gentoo的fcitx文档: <https://wiki.gentoo.org/wiki/Fcitx>
- 禁用gnome键盘中快捷键设置
gnome键盘设置中有快捷键设置,其中打字的“切换至下个输入源”默认快捷键为Ctrl+Space,不禁用的话,fcitx的界面出不来。
- Xorg启动时字体文件位置的设置
有了前面的设置,一般的gnome应用中均可调出fcitx,但到了emacs中,fcitx依旧出不来。经过反复查找,最后发现,如果xorg在启动时不能找到相应中文字体,fcitx在emacs中无法显示。gentoo默认的字体安装路径并不会被Xorg自动搜索到,需要在/etc/X11/xorg.conf.d下作类似于下面的配置:
bash
Section "Files"
FontPath "/usr/share/fonts/wqy-bitmapfont"
FontPath "/usr/share/fonts/wqy-microhei"
FontPath "/usr/share/fonts/wqy-zenhei"
FontPath "/usr/share/fonts/ttf-bitstream-vera"
FontPath "/usr/share/fonts/corefonts"
EndSection
<h3 id="Note for GNOME Later than 3.6">Note for GNOME Later than 3.6</h3>
<https://fcitx-im.org/wiki/Note_for_GNOME_Later_than_3.6>
<https://bugzilla.gnome.org/show_bug.cgi?id=685514>
- libibus maybe compiled as a dependency of gnome, don't try to remove
it (If you're not using gentoo, in gentoo you can disable i18n USE).
- uninstall package that contains ibus-daemon on your system. Or if
you want to keep ibus installed (if you want to use fcitx you don't
need ibus at all, for older gnome 3.6 you might also hit this bug,
so you'd better remove it), run:
example
gsettings set org.gnome.settings-daemon.plugins.keyboard active false
as your current user. Or,
- If you are using fedora, make sure to use imsettings to select
"Fcitx". Re-login.
<h3 id="输入法相关环境变量">输入法相关环境变量</h3>
<https://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn>
<h2 id="字体">字体</h2>
可能要用到的字体工具 emerge mkfontdir mkfontscale
下载好看的英文字体: emerge ttf-bitstream-vera corefonts
下载好看的中文字体: emerge media-fonts/wqy-bitmapfont
在xorg.conf中Section "Files"中加入新增的字体目录
使用fc-cache更新系统字体
使用xlsfonts检查字体是否已经存在
<h1 id="uvesafb配置">uvesafb配置</h1>
<http://wiki.gentoo.org/wiki/Uvesafb>
klibc像是包含了完整的2.6内核,因此安装时使用oneshot选项会比较合理:
example
emerge --ask --oneshot klibc
除了完成上面网页的配置外,还要注意下面的内核参数: :
CONFIG<sub>FRAMEBUFFERCONSOLE</sub>=y fbsplash配置页面:
<http://wiki.gentoo.org/wiki/Fbsplash>
<h1 id="journalctl">journalctl</h1>
<h2 id="查看xorg日志">查看xorg日志</h2>
example
journalctl -e /usr/bin/Xorg
<h1 id="apache从2.2升级到2.4">apache从2.2升级到2.4</h1>
After emerging Apache 2.4, you will also need to rebuild any third-party
modules:
example
emerge -av1 /usr/lib/apache2/modules --exclude=www-servers/apache
如果使用event,要在make.conf中添加如下设置:
example
APACHE2_MPMS="event"
<h1 id="Kernel升级">Kernel升级</h1>
备份.config
example
root #cd /usr/src/linux
root #cp .config ~/kernel-config-uname -r
用eselect设置新的kernel:
example
eselect kernel list
eselect kernel set 2
编译安装:
example
cp /usr/src/linux-3.14.14-gentoo/.config /usr/src/linux/
make silentoldconfig
make INSTALL_MOD_STRIP=1 modules_install
外部module:
example
make modules_prepare
emerge --ask @module-rebuild
移除旧kernel: To remove the old kernel sources, emerge's –depclean
option (short form -c) can be used to remove all old or unused versions
of a slotted package.
example
emerge --ask --depclean gentoo-sources
rm -r /usr/src/linux-3.X.Y
rm -r /lib/modules/3.X.Y
Grub:
example
sudo grub2-mkconfig -o /boot/grub/grub.cfg
<h1 id="gcc-config">gcc-config</h1>
gcc-config: Active gcc profile is invalid 列出可用的profile
example
gcc-config -l
gcc-config: Active gcc profile is invalid!
[1] i686-pc-linux-gnu-4.6.3
设置profile
example
gcc-config i686-pc-linux-gnu-4.6.3
``xmonad
master pane是指屏幕中最大的区域,通过mod-comma和mod-period可以修改master
pane中的窗口的数量。 交换窗口次序: mod-return: 交换focus window与master
window mod-shift-j:将focus window与邻近window交换,类似于冒泡排序。
tiled window之上有浮动层(floating layer),可将窗口移入(
mod-button1)或移出(mod-t)浮动层。