安装了gentoo 以后, 准备使用 openbox 作为图形界面.
听说可以 obmenu管理右键菜单 obconfig管理openbox tint2面板 pcmanfm文件管理器 pnmixer音量管理器 feh墙纸墙纸设定 lxapperance设置主体.
emerge --ask --verbose obmenu obconf tint2 pcmanfm pnmixer feh
/etc/portage/make.conf 中的USE里面增加 dbus 和 consolekit
更新世界的USE
emerge --ask --changed-use --deep @world
添加到启动
/etc/init.d/dbus start
rc-update add dbus default
/etc/init.d/consolekit start
rc-update add consolekit default
cd /usr/src/linux-xxx
make menuconfig
确保如下选项选中,如果以前没有选中,那么选中后需要重新编译内核.
General setup --->
[] Auditing support
[] Enable system-call auditing support
复制openbox 默认配置文件
mkdir -p ~/.config/openbox/
cp /etc/xdg/openbox/* ~/.config/openbox/
设置命令行启动图形的配置
vim ~/.xinitrc
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session openbox-session
使用 startx 发现没用, 原来是忘了安装 xorg.
安装xorg:
因为阉掉了独立显卡,只使用集成显卡,首先看看显卡
lspci | grep -i VGA
vim /etc/portage/make.conf
(For intel integated cards)
VIDEO_CARDS="intel" 使用intel 集成显卡
(For mouse, keyboard, and Synaptics touchpad support)
INPUT_DEVICES="evdev synaptics"
更新一下 USE
emerge --ask --changed-use --deep @world
把用户加入图像组
gpasswd -a xxx video
安装 xorg-server 进行驱动
emerge --ask --verbose xorg-server
xorg 使用evdev
查看内核
Device Drivers --->
Input device support --->
<*> Event interface
使用KMS必须关掉 framebuffer, 查看内核
Device Drivers --->
Graphics support --->
Frame Buffer Devices --->
<*> Support for frame buffer devices --->
(Disable all drivers, including VGA, Intel, nVidia, and ATI, except EFI-based Framebuffer Support, only if you are using UEFI)
## (Further down, enable basic console support. KMS uses this.)
Console display driver support --->
<*> Framebuffer Console Support
INTEL 显卡
Processor type and features --->
[] MTRR (Memory Type Range Register) support
Device Drivers --->
Graphics support --->
<> /dev/agpgart (AGP Support) --->
<> Intel 440LX/BX/GX, I8xx and E7x05 chipset support
<> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
<> Intel 8xx/9xx/G3x/G4x/HD Graphics
[] Enable modesetting on intel by default
[*] Enable legacy fbdev support for the modesetting intel driver
Device Drivers --->
Graphics support --->
<> /dev/agpgart (AGP Support) --->
--- /dev/agpgart (AGP Support)
< > AMD Opteron/Athlon64 on-CPU GART support
-- Intel 440LX/BX/GX, I8xx and E7x05 chipset support
< > SiS chipset support
< > VIA chipset support
[ ] VGA Arbitration
[ ] Laptop Hybrid Graphics - GPU switching support
<> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
--- Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
[] Enable legacy fbdev support for your modesetting driver
[ ] Allow to specify an EDID data set instead of probing for it
I2C encoder or helper chips --->
< > 3dfx Banshee/Voodoo3+
< > ATI Rage 128
< > ATI Radeon
< > AMD GPU
< > Nouveau (NVIDIA) cards
< > Intel I810
<> Intel 8xx/9xx/G3x/G4x/HD Graphics
[ ] Enable preliminary support for prerelease Intel hardware by default
< > Matrox g200/g400
< > SiS video cards
< > Via unichrome video cards
< > Savage video cards
< > Virtual GEM provider
< > DRM driver for VMware Virtual GPU
< > Intel GMA5/600 KMS Framebuffer
< > DisplayLink
< > AST server chips
< > Kernel modesetting driver for MGA G200 server engines
< > Cirrus driver for QEMU emulated device
< > QXL virtual GPU
< > DRM Support for bochs dispi vga interface (qemu stdvga)
Display Panels ----
Display Interface Bridges ----
Frame buffer Devices --->
-- Backlight & LCD device support --->
Console display driver support --->
[*] Bootup logo --->
如果使用INTEL的 Kabylake, Skylake , Broxton 显卡,需要安装 sys-kernel/linux-firmware, 并且在kernel 里面指定位置:
Device Drivers --->
Generic Driver Options --->
-- Userspace firmware loading support
[] Include in-kernel firmware blobs in kernel binary
(i915/skl_dmc_ver1_26.bin)
(/lib/firmware) Firmware blobs root directory
重新编译内核.
reboot
然后使用video用户组里面的用户登录, 使用 startx 启动进入图像界面.
普通用户模式
生成一下 openbox 的 obmenu 菜单
obmenu-generator -i -s
绑定快捷键
vim ~/.config/openbox/rc.xml
xterm
root-menu
client-list-combined-menu
菜单增加图标, 未安装的时候,只有几个能显示图标, 安装完成就可以了.
vim /etc/portage/package.use/openbox
x11-wm/openbox imlib
重新编译一下openbox
emerge --ask --changed-use x11-wm/openbox
修改obmenu 图标
vim ~/.config/openbox/menu.xml
xterm