如何为 Linux 桌面配置 Openbox

> 
> 本文是 24 天 Linux 桌面特别系列的一部分。Openbox 窗口管理器占用很小的系统资源、易于配置、使用愉快。
> 
> 
> 


![](/data/attachment/album/201912/20/102327hdl3gcychsc53y3m.jpg)


你可能不知道你使用过 [Openbox](http://openbox.org) 桌面：尽管 Openbox 本身是一个出色的窗口管理器，但它还是 LXDE 和 LXQT 等桌面环境的窗口管理器“引擎”，它甚至可以管理 KDE 和 GNOME。除了作为多个桌面的基础之外，Openbox 可以说是最简单的窗口管理器之一，可以为那些不想学习那么多配置选项的人配置。通过使用基于菜单的 obconf 的配置应用，可以像在 GNOME 或 KDE 这样的完整桌面中一样轻松地设置所有常用首选项。


### 安装 Openbox


你可能会在 Linux 发行版的软件仓库中找到 Openbox，也可以在 [Openbox.org](http://openbox.org/wiki/Openbox:Download) 中找到它。如果你已经在运行其他桌面，那么可以安全地在同一系统上安装 Openbox，因为 Openbox 除了几个配置面板之外，不包括任何捆绑的应用。


安装后，退出当前桌面会话，以便你可以登录 Openbox 桌面。默认情况下，会话管理器（KDM、GDM、LightDM 或 XDM，这取决于你的设置）将继续登录到以前的桌面，因此你必须在登录之前覆盖该选择。


要使用 GDM 覆盖它：


![Select your desktop session in GDM](/data/attachment/album/201912/20/102343or9aa60asgpsipsi.jpg "Select your desktop session in GDM")


要使用 SDDM 覆盖它：


![Select your desktop session with KDM](/data/attachment/album/201912/20/102344dj2xb7rrrmmjjrb2.jpg "Select your desktop session with KDM")


### 配置 Openbox 桌面


默认情况下，Openbox 包含 obconf 应用，你可以使用它来选择和安装主题、修改鼠标行为、设置桌面首选项等。你可能会在仓库中发现其他配置应用，如 obmenu，用于配置窗口管理器的其他部分。


![Openbox Obconf configuration application](/data/attachment/album/201912/20/102345v60rknt55uuwwbuw.jpg "Openbox Obconf configuration application")


构建你自己的桌面环境相对容易。它有一些所有常见的桌面组件，例如系统托盘 [stalonetray](https://sourceforge.net/projects/stalonetray/)、任务栏 [Tint2](https://opensource.com/article/19/1/productivity-tool-tint2) 或 [Xfce4-panel](http://xfce.org) 等几乎你能想到的。任意组合应用，直到拥有梦想的开源桌面为止。


![Openbox](/data/attachment/album/201912/20/102346hlt000e6wmwmkwfi.jpg "Openbox")


### 为何使用 Openbox


Openbox 占用的系统资源很小、易于配置、使用起来很愉悦。它基本不会让你感觉到阻碍，会是一个容易熟悉的系统。你永远不会知道你面前的桌面环境秘密使用了 Openbox 作为窗口管理器（知道如何自定义它会不会很高兴？）。如果开源吸引你，那么试试看 Openbox。




---


via: <https://opensource.com/article/19/12/openbox-linux-desktop>


作者：[Seth Kenlon](https://opensource.com/users/seth) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
You may have used the [Openbox](http://openbox.org) desktop without knowing it: While Openbox is a great window manager on its own, it also serves as the window manager "engine" for desktop environments like LXDE and LXQT, and it can even manage KDE and GNOME. Aside from being the foundation for several desktops, Openbox is arguably one of the easiest window managers to configure for anyone who doesn't want to learn all the options to put into a config file. By using the **obconf** menu-based configuration application, all the common preferences can be set just as easily as in a full desktop, like GNOME or KDE.

## Installing Openbox

You are likely to find Openbox in the software repository of your Linux distribution, but you can also find it on [Openbox.org](http://openbox.org/wiki/Openbox:Download). If you're already running a different desktop, it's safe to install Openbox on the same system, because Openbox doesn't include any bundled applications aside from a few configuration panels.


After installing it, log out of your current desktop session so you can log into your Openbox desktop. By default, your session manager (KDM, GDM, LightDM, or XDM, depending on your setup) will continue to log you into your previous desktop, so you must override that before logging in.

To override it with GDM:

![Select your desktop session in GDM Select your desktop session in GDM](https://opensource.com/sites/default/files/advent-gdm_0.jpg)

With SDDM:

![Select your desktop session with KDM Select your desktop session with KDM](https://opensource.com/sites/default/files/advent-kdm.jpg)

## Configure the Openbox desktop

By default, Openbox includes the **obconf** application, which you can use to choose and install themes, modify mouse behavior, set desktop preferences, and do much more. You can probably find other configuration applications, like **obmenu**, in your repository to configure other parts of your window manager.

![Openbox Obconf configuration application Openbox Obconf configuration application](https://opensource.com/sites/default/files/uploads/advent-openbox-obconf_675px.jpg)

Building your own desktop experience is relatively easy. There are little components for all the usual desktop tropes, like [stalonetray](https://sourceforge.net/projects/stalonetray/) for a system tray, [Tint2](https://opensource.com/article/19/1/productivity-tool-tint2) for a taskbar, or [Xfce4-panel](http://xfce.org) for nearly anything you can think of. String any set of applications together until you have the open source desktop of your dreams.

![Openbox Openbox](https://opensource.com/sites/default/files/uploads/advent-openbox_675px.jpg)

## Why you should use Openbox

Openbox is light on system resources, easy to configure, and a pleasure to use. It pops up in the unlikeliest of places, so it can be a good system to get familiar with. You never know when you'll be in front of a desktop that secretly uses Openbox as its window manager (and won't it be nice that you know how to customize it?). If critical mass and open source appeal to you, open up the Openbox box and get started.

## Comments are closed.