zh 您所在的位置:网站首页 古装帅气头像动漫 zh

zh

2023-04-14 10:54| 来源: 网络整理| 查看: 265

Translation(s): English - Español - Français - Italiano - Русский - 简体中文

Openbox窗口管理器的一些信息.

Contents

简介 安装 运行 Openbox 从登录管理器运行 从命令行运行 基本配置 Obconf Obmenu 壁纸 通过feh设置你的背景图片 其他选择 屏幕保护 桌面图标 GTK 主题 键盘快捷键 Openbox 默认的快捷键组合 配置键绑定 附加软件 文件管理 Taskbars and pagers 系统监视器 外部链接 参见

简介

为了理解Openbox实际上是什么,很重要的一点是了解窗口管理器和桌面环境的不同之处。

窗口管理器是一个在你屏幕上画出运行程序的“盒子”的程序. 窗口管理器控制你的程序窗口如何工作、怎样的外观和怎样的行为。他决定使用哪些窗口装饰、提供某种方式来移动,隐藏窗口、改变窗口大小、最小化和关闭窗口。他控制你点击了哪个按钮来做这些事和你点击哪些按钮这些事情发生。

另一方面, 一个桌面环境意味着整个桌面。他提供一个任务栏、一个系统托盘、一个登录管理器、附加菜单或者可能有屏幕保护和桌面图标。他有可能包含一个文件管理器,一个文本编辑器或者某些其他的附件。

Openbox是窗口管理器,而不是桌面环境。Openbox只负责维护你在你的屏幕上打开的窗口——没有其他的。这意味着安装Openbox不会给你简单的菜单来进入壁纸选项,任务栏或者系统面板,或者大部分其他的doo-dads. It does, however, give you a framework to incorporate other programs that do those things -- and usually with a greater degree of freedom over the style and interface.

Openbox可以没有桌面环境情况下,被单独使用, 或者他可以被用来代替完整的桌面环的窗口管理器。每种方式都是可以被接受的.

安装

Debian系统中安装Openbox最容易的方式是使用 Advanced Packaging Tool (APT). 因此,成为root并且在终端命令提示符中输入以下命令:

# apt-get install openbox

通常的,安装之后在桌面右击时桌面菜单会自动出现.

如果,然而,你的桌面菜单没有自动出现 DebianMenu, 那么你必须安装 menu 软件包:

# apt-get install menu

运行 Openbox

从登录管理器运行

从 KDM or GDM启动Openbox会话, 简单的选择从会话或者会话类型菜单(the session or session-type menu)中选择'openbox'.

从XDM启动Openbox,你应该设置在你的home目录中的 .xsession 文件,并且在文件中增加一下几行:

$ exec openbox-session

作为替换项,或者也可能使用Debian中的替代品(参见 ?update-alternatives) 并且设置 x-session-manager 为 Openbox.

从命令行运行

为了从命令行登录来运行Openbox,设置 .xinitrc 文件在你的home目录中并且插入以下行:

$ exec openbox-session

作为替换项,或者也可能使用Debian中的替代品(参见 ?update-alternatives) 并且设置 x-session-manager 为 Openbox.

注意: 如果你在使用纯净的Openbox你不必须这么设置,只需要运行 startx.

基本配置

Obconf

ObConf is是一个用于配置Openbox 参数选择和动态配置设置的小型图形工具.

如果你是Openbox用户,你想要这个包。.

# apt-get install obconf

Obmenu

Obmenu用来配置Openbox菜单. It is a graphical alternative to directly editing one's menu.xml file.

# apt-get install obmenu

壁纸

由于Openbox没有能力管理桌面壁纸,你必须使用额外的程序设置你的背景图片. There are several applications available for that kind of job (see Alternatives section below). 最普通的是一个轻型的图片查看器叫做 feh.

通过feh设置你的背景图片

feh is an imlib2-based image viewer with a number of features, but perhaps the most popular is the ability to draw desktop backgrounds.

该程序可以通过 APT 利用以下命令来安装:

# apt-get install feh

现在,选择一个壁纸,在终端试试这个命令:

feh --bg-scale /path/to/your/background/image.jpg

注意: 除了 JPEG, feh 也能够处理各种各样的其他图像文件类型,包括 PNG, TIFF 和 GIF.

一旦你选择了一个壁纸, feh 存储在文件名字叫做 .fehbg的文件中. 这意味着你可以告诉它通过在下一次启动时检查该文件来恢复壁纸。 将下列代码添加到 /etc/xdg/openbox 目录下的 autostart.sh 文件.

#我的壁纸 eval `cat $HOME/.fehbg` &

随机壁纸

One neat trick available with feh is a random wallpaper on each boot. Create a directory in your home folder called "wallpapers" and put a few background images into it. Then copy the code below into a file called wallpaper.sh and save it anywhere. A good place is ~/.config/openbox

#!/bin/env bash WALLPAPERS="/home/yourUserName/wallpapers" ALIST=( `ls -w1 $WALLPAPERS` ) RANGE=${#ALIST[@]} let "number = $RANDOM" let LASTNUM="`cat $WALLPAPERS/.last` + $number" let "number = $LASTNUM % $RANGE" echo $number > $WALLPAPERS/.last feh --bg-scale $WALLPAPERS/${ALIST[$number]}

Next, make the script executable.

chmod +x wallpaper.sh

Now add that program to the autostart.sh file, like this.

#Random wallpaper ./pathFromHome/wallpaper.sh

When you log in, the script should be executed, and feh should pick a new wallpaper.

其他选择

feh 不是唯一能够控制背景图片绘制的程序。这里还有一些其他的:

gsetroot - sets root image (wallpaper) for your X session

imagemagick - image manipulation programs

nitrogen - wallpaper browser and changing utility for X

xloadimage : xsetbg(1) or xloadimage -onroot -quiet.

此外,一些文件管理者有能力管理你的壁纸,例如:

ROX-Filer

PCManFM

Nautilus (if started without the --no-desktop option)

屏幕保护

If you're building an Openbox desktop with Gnome already installed, you'll probably already have gnome-screensaver in place. Pure Openbox fans might want to install xscreensaver, which is more customizable and has a wider variety of screensavers involved.

Without Gnome or KDE in place, installing xscreensaver needs a couple of extra commands:

# mkdir /usr/share/backgrounds # apt-get install xscreensaver xscreensaver-gl

The first command sets up a default directory that xscreensaver will look for when it runs. If you don't create that directory, you'll get a string of error messages the first time you set the preferences.

The second command installs xscreensaver and its optional files.

Now add this command to Openbox' autostart.sh file in /etc/xdg/openbox to start the xscreensaver daemon on boot.

xscreensaver -no-splash &

You can access the xscreensaver preferences panel by running xscreensaver-demo from the Openbox menu or from a terminal window.

桌面图标

iDesk

You can add customizable, clickable icons to your desktop with iDesk.

# apt-get install idesk

Consult the iDesk wiki for instructions on how to configure and use iDesk. For icon sets, you may wish to search the repositories, or download them from third-party customization sites, such as Gnome-Look.org and similar locations.

Rox-Filer

Rox-filer is a file manager, but in addition to handling wallpaper, it also has a pinboard option, and can manage desktop icons. Install rox-filer with this command:

# apt-get install rox-filer

You can set up the pinboard through Rox's menus.

GTK 主题

Program GUIs might look ugly if you're working on a pure Openbox system. Install gtk-theme-switch and the gtk2-engines package to give yourself a few more appealing options.

# apt-get install gtk-theme-switch gtk2-engines

Bring up the configuration menu with this command, from a terminal or the Openbox right-click menu.

# switch2

Be sure to search the repositories for other engines that aren't included in the gtk2-engines package.

You can also try installing a Gnome package that will manage some of the settings for you.

# apt-get install gnome-settings-daemon

If you prefere an Xfce look, try

# apt-get install xfce-mcs-manager

Both of those programs can be added to your Openbox menu, or started from a terminal.

键盘快捷键

Openbox 默认的快捷键组合

Alt-F4 关闭活动的窗口

Alt-Space Show the client menu for the active window

Alt-Tab 在桌面窗口之间循环切换

Alt-Shift-Tab Cycle between windows on the desktop in reverse order

Control-Alt-Tab Cycle between panel and desktop windows on the desktop

Windows-D 隐藏所有窗口显示桌面

Windows-E Run the Konqueror file manager (This is an example of how to run a program with a key binding)

Alt-Escape Lower the active window behind other windows, and activate the last window that was in use

Windows-F1 立即进入桌面1

Windows-F2 立即进入桌面2

Windows-F3 立即进入桌面3

Windows-F4 立即进入桌面4

Control-Alt-Left Open the desktop switching dialog, to go to the desktop to the left of the current one

Control-Alt-RightOpen the desktop switching dialog, to go to the desktop to the right of the current one

Control-Alt-Up Open the desktop switching dialog, to go to the desktop above the current one (This will only be useful if you use a pager to set up a desktop layout with multiple rows)

Control-Alt-Down Open the desktop switching dialog, to go to the desktop below the current one (This will only be useful if you use a pager to set up a desktop layout with multiple rows)

Shift-Alt-Left Open the desktop switching dialog, to go to the desktop to the left of the current one, and bring the active window with you

Shift-Alt-Right Open the desktop switching dialog, to go to the desktop to the right of the current one, and bring the active window with you

Shift-Alt-Up Open the desktop switching dialog, to go to the desktop above the current one, and bring the active window with you (This will only be useful if you use a pager to set up a desktop layout with multiple rows)

Shift-Alt-Down Open the desktop switching dialog, to go to the desktop below the current one, and bring the active window with you (This will only be useful if you use a pager to set up a desktop layout with multiple rows)

Alt-Left mouse button 移动窗口

Alt-Right mouse button 改变窗口大小. The window is resized towards the edge that the mouse is nearest to. So use Alt-Right mouse button in the top right corner of a window to resize that corner.

Alt-Scroll wheel Change desktops forward and backward

配置键绑定

Keybinding configuration is done manually by editing your rc.xml file, normally found in the ~/.config/openbox directory. Full documentation is available at the project's website.

附加软件

文件管理

Name

Description

Beesoft Commander

Configurable, more or less orthodox Linux file manager

gentoo

Nautilus

GNOME graphical desktop shell (capable of managing wallpapers and desktop icons)

PCManFM

A fast and lightweight file manager that can draw wallpapers and desktop icons

ROX-Filer

Thunar

The fast and lightweight file manager from Xfce

Xfe

Small, fast and desktop-independent file manager based on X Win Commander

Taskbars and pagers

Some people prefer to use a taskbar or pager to keep track of running programs. Here's a list of applications you can add to your Openbox installation that will handle that task for you.

tint2

pypanel

bbtools

gnome-panel

fspanel

fbpanel

perlpanel

xfce4-panel

系统监视器

如果你正在寻找一种方法来显示系统信息,试试这些漂亮的程序。

gkrellm, which has a number of floating or docked graphical meters and displays

adesklets, for similar graphical displays

conky, a highly configurable text and graphic output that draws directly to your desktop

If you're working on Openbox in conjunction with a Gnome installation, you might also look into gdesklets, which features some very polished monitors and meters for desktop display.

外部链接

Openbox homepage.

Openbox documentation.

Openbox theme directory.

参见

WindowManager



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有