从openbox了解Linux桌面相关知识

OpenBox是什么?

Openbox 是运行于搭载X11的GNU/Linux上的轻巧窗口管理器,Openbox 以GPL协议方式开放源代码,是免费自由软件。Openbox基于Blackbox,后者被认为原始窗口管理器之一(即代码自有)。

总言之:openbox是窗口管理器

如果不用窗口管理器,会怎么样?

       如果linux下,没有窗口管理器,程序也能正常运行。

       但明显的变化,就是没有“标题栏”,程序也不能用鼠标进行拖动。

        还有明显的变化,按“Start+D”也不能返回到桌面了

由此可见,这些都跟窗口管理器有关,而不是你自己程序控制的。

或换句话,如果你觉得“标题栏”不符合你的程序风格,并不是通过程序本身代码修改,而是通过配置窗口管理器的参数去配置

实际上,我们可以归纳总结下:

你的程序显示界面

       UI库(像qt)

  窗口管理器(像openbox)

       视窗系统(像x11)

       硬件驱动

如下图:

从openbox了解Linux桌面相关知识_第1张图片

openbox有哪些优点?也就是,我们什么时候应该用

  1. 速度非常快,资源占用极少。(适合嵌入式,也就意味着可能存在一些考虑不周的情况)
  2. 可高度定制化,能够对应用程序加以灵活控制。(配置灵活,的确挺好,而且很好理解)
  3. 能够绑定键盘和鼠标。比如,你可以为程序设定启动快捷键,也可以为最小/大化窗口设置热键。对于鼠标,同样如此。
  4. 具有自动启动脚本,能够随机自动启动各种程序。
  5. 主题资源丰富,与 *box 类视觉样式兼容。Openbox 的外观是简约而不简单。
  6. 支持会话,可深入 GNOME、KDE、Xfce 等桌面环境使用。换句话说,Openbox 可替代这些桌面环境中默认的窗口管理器,而其他桌面组件仍旧保持原样。

另外,本质上源码也比较少,如果出现一些问题,也可以通过修改源码的方式,也会容易一些

好了,openbox介绍也差不多。我们来了解下,openbox精华部分,配置

配置文件在  

/etc/xdg/openbox/
有几个xml
可以看下

menu.xml 

  1. 首先,让我们来创建一个一级菜单。要定义一个菜单,我们需要使用 

     标签。该标签具有 id、label、以及 execute 属性:

    • id:每一个菜单项目都必须指定一个唯一的 id,以用来区分其他菜单项目。
    • label:用来描述一个菜单的名称。
    • execute:执行一个命令,常用于创建动态菜单。

    例如,我们可以将 Openbox 的 Root 菜单定义如下:

    ...

    如果一个菜单中没有任何项目,我想是不能称其为真正的菜单吧。所以,我们还需要为菜单创建具体的菜单项目。要定义菜单项目,我们可以使用  标签。与 

     标签一样, 标签也具有描述菜单项目名称的 label 属性。我们试着扩展上面的例子:

    
    
    ...
    
    ...
     
    

    现在,我们已经有了一个名为 URxvt 的菜单项目。根据该名称的命名初衷,我们当然希望通过该菜单项目能够启动 URxvt 终端程序。要完成这个任务,我们需要使用  标签。该标签主要用来执行一个操作,比如启动程序。 标签具有 name 属性。我们继续扩展先前的例子:

    
    
    
    ...
    
    
    ...
     
    

    该例中 name 属性已经包含了“Execute”值,其作用是启动一个程序。

    我想,你已经猜到接下来我们需要做什么了。要启动程序,没有具体的命令是不行的。这可以通过  标签来完成。我们仍以前面的例子来说明:

    
    
    
    urxvt
    
    
    ...
     
    

    值得一提的是,命令可以附带路径或选项参数。

  2. 几个特殊的菜单项目

    在此,我们介绍几个较为特殊的菜单项目:

    • 分隔线:可以使用  标签在菜单项目间绘制一条分隔线。 标签同样具有 label 属性。需要注意的是,因为  标签没有具体的内容,所以在关闭该标签时,应照下面的方式进行:

      这是另一个例子,包含 label 属性:

    • 重新配置 Openbox:使用该菜单项目的好处是,当你对 Openbox 的配置文件进行修改后,不必注销系统便可即时生效。该菜单项目定义如下:



      注意,这里  标签的关闭方式与  一样。

    • 重新启动 Openbox:



    • 退出 Openbox:



    • 注销会话:



      注意,需要启动带会话支持的 Openbox 才有效。

rc.xml




b. rc.xml中的”截屏”快捷键, 截取当前窗口, ctrl+Print Screen



scrot -s “/home/allblue/pictures/scrot/cut-%m.%d-%H%M%S.png”


全屏载取, Print Screen



scrot “/home/allblue/pictures/scrot/screen-%m.%d-%H%M%S.png”


c. rc.xml多媒体快捷键设置
音量放大



amixer set Master 5%+ unmute


静音



amixer set Master toggle


打开主页



firefox


https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...
http://github.com/threebb10/w...
https://github.com/threebb10/...
https://www.github.com/threeb...

你可能感兴趣的:(linux)