使用 FVWM 自定义 Linux 桌面
FVWM

> 
> 本文是 24 天 Linux 桌面特别系列的一部分。如果你正在寻找轻巧、快速且简单的 Linux 窗口管理器，那么 FVWM 可以胜任。但是，如果你正在寻找可以深入、探索和魔改的窗口管理器，那么 FVWM 是必须的。
> 
> 
> 


![](/data/attachment/album/201912/25/062800dwh3yhfcpx3ggjxp.jpg)


[FVWM](http://www.fvwm.org/) 窗口管理器最早脱胎于对 1993 年的 [TWM](https://en.wikipedia.org/wiki/Twm) 的修改。经过几年的迭代，诞生了一个可高度自定义的环境，它可以配置任何行为、动作或事件。它支持自定义键绑定、鼠标手势、主题、脚本等。


尽管 FVWM 在安装后即可投入使用，但默认分发版本仅提供了极其少的配置。这是开始自定义桌面环境的良好基础，但是，如果你只想将其用作桌面，那么可能要安装由其它用户发布的完整配置版本。FVWM 有几种不同的分发版，包括模仿 Windows 95 的 FVWM95（至少在外观和布局上）。我尝试了 [FVWM-Crystal](https://www.box-look.org/p/1018270/)，这是一个具有一些现代 Linux 桌面约定的现代主题。


可以从 Linux 发行版的软件仓库中安装要尝试的 FVWM 分发版。如果找不到特定的 FVWM 分发版，那么可以安装基础的 FVWM2 包，然后进入 [Box-Look.org](http://box-look.org) 手动下载主题包。这样就需要更多的工作，但比从头开始构建要少。


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


对于 GDM：


![Select your desktop session in GDM](/data/attachment/album/201912/25/062821v99x5n5f9nx6zi65.jpg "Select your desktop session in GDM")


对于 KDM：


![Select your desktop session with KDM](/data/attachment/album/201912/25/062821jcgqctsgpumkptui.jpg "Select your desktop session with KDM")


### FVWM 桌面


无论你使用什么主题和配置，当你在桌面上单击鼠标左键时，FVWM 至少会显示一个菜单。菜单的内容取决于你所安装的内容。FVWM-Crystal 分发版中的菜单包含对常用首选项的快速访问，例如屏幕分辨率、壁纸设置、窗口装饰等。


同 FVWM 中的几乎所有东西一样，你可以编辑菜单中你要想的内容，但 FVWM-Crystal 的特色在于其应用菜单栏。应用菜单位于屏幕的左上角，每个图标都包含了相关的应用启动器的菜单。例如，GIMP 图标表示图像编辑器，KDevelop 图标表示集成开发环境（IDE），GNU 图标表示文本编辑器，等等，具体取决于你在系统上安装的程序。


![FVWM-crystal running on Slackware 14.2](/data/attachment/album/201912/25/062822w1hjba0mymlzzxbm.jpg "FVWM-crystal running on Slackware 14.2")


FVWM-Crystal 还提供了虚拟桌面、任务栏、时钟和应用栏。


关于背景，你可以使用与 FVWM-Crystal 捆绑在一起的壁纸，也可以使用 `feh` 命令设置自己的壁纸（你可能需要从仓库中安装它）。此命令有一些设置背景的选项，包括 `--bg-scale` 使用你选择的图片缩放填充屏幕，`--bg-fill` 直接填充而不缩放图片，等等。



```
$ feh --bg-scale ~/Pictures/wallpapers/mybackground.jpg
```

大多数配置文件都包含在 `$HOME/.fvwm-crystal` 中，某些系统范围的默认文件位于 `/usr/share/fvwm-crystal`。


### 自己尝试一下


FVWM 是大多作为一个桌面构建平台，它也是窗口管理器。它不会为你做到面面俱到，它期望你来配置尽可能的一切。


如果你正在寻找轻巧、快速且简单的窗口管理器，那么 FVWM 可以胜任。但是，如果你正在寻找可以深入、探索和魔改的窗口管理器，那么 FVWM 是必须的。




---


via: <https://opensource.com/article/19/12/fvwm-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
The [FVWM](http://www.fvwm.org/) window manager started out as modifications to [TWM](https://en.wikipedia.org/wiki/Twm), back in 1993. After several years of iteration, what emerged is an extremely customizable environment where any behavior, action, or event is configurable. It has support for custom key bindings, mouse gestures, theming, scripting, and much more.

While FVWM is usable immediately after installation, its default distribution provides only the absolute minimum configuration. It's a great foundation to start your own custom desktop environment, but if you just want to use it as a desktop, then you probably want to install a full configuration distributed by another user. There are a few different distributions of FVWM, including FVWM95, which mimics Windows 95 (at least in appearance and layout). I tried [FVWM-Crystal](https://www.box-look.org/p/1018270/), a modern-looking theme with some common Linux desktop conventions.

Install the FVWM distribution you want to try from your Linux distribution's software repository. If you can't find a specific FVWM distribution, it's safe to install the base FVWM2 package and then go to [Box-Look.org](http://box-look.org) to download a theme package manually. It's a little more work that way, but not nearly as much as building your own workspace from scratch.


After installing, log out of your current desktop session so you can log into FVWM. 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 do so with GDM:

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

And with SDDM:

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

## FVWM desktop

Regardless of what theme and configuration you're using, FVWM, at minimum, provides a menu when you left-click on the desktop. The contents of this menu vary depending on what you've installed. The menu in the FVWM-Crystal distribution contains quick access to common preferences, such as screen resolution, wallpaper settings, window decorations, and so on.

As with pretty much everything in FVWM, the menu can be edited to include whatever you want, but FVWM-Crystal favors the application menu bar. The application menu is located at the top-left of the screen, and each icon contains a menu of related application launchers. For example, the GIMP icon reveals image editors, the KDevelop icon reveals integrated development environments (IDEs), the GNU icon reveals text editors, and so on, depending on what you have installed on your system.

![FVWM-crystal running on Slackware 14.2 FVWM-crystal running on Slackware 14.2](https://opensource.com/sites/default/files/advent-fvwm-crystal.jpg)

FVWM-Crystal also provides virtual desktops, a taskbar, a clock, and an application bar.

For your background, you can use the wallpapers bundled with FVWM-Crystal or set your own with the **feh** command (you may need to install it from your repository). This command has a few options for setting the background, including **--bg-scale** to fill the screen with a scaled version of your wallpaper of choice, **--bg-fill** to fill the screen without adjusting the size of the image, and so on.

`$ feh --bg-scale ~/Pictures/wallpapers/mybackground.jpg`


Most configuration files are contained in **$HOME/.fvwm-crystal**, with some systemwide defaults located in **/usr/share/fvwm-crystal**.

## Do it yourself

FVWM is as much a desktop-building platform as it is a window manager. It doesn't do anything for you, and it expects you to configure anything—and possibly everything.

If you're looking for a lightweight, fast, and simple window manager, FVWM qualifies. But if you're looking for something to dig into, explore, and hack, then FVWM is a must.

## Comments are closed.