[[openbox]]
Piste: » openbox
Openbox
Présentation
Openbox est un gestionnaire de fenêtres (WM) extrêmement rapide et agréable. Cette interface graphique minimale est cohérente à plus d'un titre. Très légère, elle se suffit à elle-même et permet également d'accélérer considérablement la réactivité de Gnome lorsqu'elle remplace Metacity.
Openbox seul ou en gestionnaire de fenêtres pour Gnome est idéal pour ceux qui possèdent de vieux ordinateurs tout en souhaitant utiliser Gnome, ou pour ceux qui souhaitent une configuration minimale, afin de conserver au mieux la batterie de leur portable (j'ai gagné 1h30 de batterie ainsi !).
Après avoir testé plusieurs WM, tels que Fluxbox, Blackbox, il semble que Openbox soit le moins gourmand et le plus configurable. Certains aimeront sa sur-légèreté, d'autres moins. Mais une chose est sûre, si vous cherchez la rapidité, vous êtes à la bonne porte !
Il existe aussi des variantes d'Ubuntu qui utilise Openbox par défaut :
- Ubuntox ;
Avantages
- Requiert peu de ressources (très peu !)
- Peu de dépendances
- Défilement des bureaux avec la molette de la souris
- Des raccourcis claviers et souris personnalisables via des fichiers XML
- De nombreux thèmes
- Écrit en C
- Support de Xinerama pour la sortie en dual screen
- Et avant tout, la rapidité !
Inconvénients
- Minimaliste, ce que certains apprécieront, d'autres non.
- Cela peut prendre un peu de temps à tout configurer (d'où l'utilité de cette doc)
- Ne supporte pas certaines fonctions, comme la gestion du fond d'écran ou de la barre de taches. Toutes ces fonctions peuvent très simplement être accessibles avec d'autres petits programmes légers
- Le montage automatique de CD-ROM ou d'appareils photos numériques peuvent demander du travail supplémentaire.
Pré-requis
- Disposer des droits d'administration ;
- Disposer d'une connexion à Internet configurée et activée ;
- Avoir activé l'accès aux dépôts Universe et Multiverse ;
Installation
Pour commencer, il suffit d'installer les paquets openbox obconf obmenu.
| Installer en 1 clic |
|---|
|
Configuration
Openbox possède quelques fichiers de configuration utiles, qui se trouvent dans le dossier /home/nom_d_utilisateur/.config/openbox.
les raccourcis
Il s'agit du fichier rc.xml, vous pouvez le modifier à votre guise, ainsi, par exemple, le raccourci alt+F2 peut vous lancer gmrun, un lanceur très pratique.
<keybind key="W-p">
<action name="Execute">
<name>transmission</name>
<command>transmission</command>
</action>
</keybind>
puis remplacez "W-p" par le raccourci de votre choix (ex : Alt-f), modifiez le nom et la commande à lancer à la place de transmission, et hop, votre raccourci est configuré! nb : W signifie la touche "super", C la touche "ctrl", A la touche "alt", Up Down Right Left les touches directionnelles
Voici un exemple :
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
<!-- always try to focus new windows when they appear. other rules do
apply -->
<followMouse>no</followMouse>
<!-- move focus to a window when you move the mouse into it -->
<focusLast>yes</focusLast>
<!-- focus the last used window when changing desktops, instead of the one
under the mouse pointer. when followMouse is enabled -->
<underMouse>no</underMouse>
<!-- move focus under the mouse, even when the mouse is not moving -->
<focusDelay>200</focusDelay>
<!-- when followMouse is enabled, the mouse must be inside the window for
this many milliseconds (1000 = 1 sec) before moving focus to it -->
<raiseOnFocus>no</raiseOnFocus>
<!-- when followMouse is enabled, and a window is given focus by moving the
mouse into it, also raise the window -->
</focus>
<placement>
<policy>Smart</policy>
<!-- 'Smart' or 'UnderMouse' -->
<center>yes</center>
<!-- whether to place windows in the center of the free area found or
the top left corner -->
<monitor>Any</monitor>
<!-- with Smart placement on a multi-monitor system, try to place new windows
on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
the active window is -->
</placement>
<theme>
<name>Peptide</name>
<titleLayout>NLIMC</titleLayout>
<!--
available characters are NDSLIMC, each can occur at most once.
N: window icon
L: window label (AKA title).
I: iconify
M: maximize
C: close
S: shade (roll up/down)
D: omnipresent (on all desktops).
-->
<keepBorder>yes</keepBorder>
<animateIconify>yes</animateIconify>
<font place="ActiveWindow">
<name>Aerial</name>
<size>9</size>
<!-- font size in points -->
<weight>Bold</weight>
<!-- 'bold' or 'normal' -->
<slant>Normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="InactiveWindow">
<name>Radio Space</name>
<size>9</size>
<!-- font size in points -->
<weight>Bold</weight>
<!-- 'bold' or 'normal' -->
<slant>Normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="MenuHeader">
<name>Zekton</name>
<size>10</size>
<!-- font size in points -->
<weight>Normal</weight>
<!-- 'bold' or 'normal' -->
<slant>Normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="MenuItem">
<name>Zekton</name>
<size>9</size>
<!-- font size in points -->
<weight>Normal</weight>
<!-- 'bold' or 'normal' -->
<slant>Normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="OnScreenDisplay">
<name>Zekton</name>
<size>8</size>
<!-- font size in points -->
<weight>Normal</weight>
<!-- 'bold' or 'normal' -->
<slant>Normal</slant>
<!-- 'italic' or 'normal' -->
</font>
</theme>
<desktops>
<!-- this stuff is only used at startup, pagers allow you to change them
during a session
these are default values to use when other ones are not already set
by other applications, or saved in your session
use obconf if you want to change these without having to log out
and back in -->
<number>4</number>
<firstdesk>1</firstdesk>
<names>
<!-- set names up here if you want to, like this:
<name>desktop 1</name>
<name>desktop 2</name>
-->
</names>
<popupTime>875</popupTime>
<!-- The number of milliseconds to show the popup for when switching
desktops. Set this to 0 to disable the popup. -->
</desktops>
<resize>
<drawContents>yes</drawContents>
<popupShow>Nonpixel</popupShow>
<!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
<popupPosition>Center</popupPosition>
<!-- 'Center', 'Top', or 'Fixed' -->
<popupFixedPosition>
<!-- these are used if popupPosition is set to 'Fixed' -->
<x>10</x>
<!-- positive number for distance from left edge, negative number for
distance from right edge, or 'Center' -->
<y>10</y>
<!-- positive number for distance from top edge, negative number for
distance from bottom edge, or 'Center' -->
</popupFixedPosition>
</resize>
<!-- You can reserve a portion of your screen where windows will not cover when
they are maximized, or when they are initially placed.
Many programs reserve space automatically, but you can use this in other
cases. -->
<margins>
<top>0</top>
<bottom>0</bottom>
<left>0</left>
<right>0</right>
</margins>
<dock>
<position>TopLeft</position>
<!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
<floatingX>0</floatingX>
<floatingY>0</floatingY>
<noStrut>yes</noStrut>
<stacking>Above</stacking>
<!-- 'Above', 'Normal', or 'Below' -->
<direction>Horizontal</direction>
<!-- 'Vertical' or 'Horizontal' -->
<autoHide>yes</autoHide>
<hideDelay>300</hideDelay>
<!-- in milliseconds (1000 = 1 second) -->
<showDelay>300</showDelay>
<!-- in milliseconds (1000 = 1 second) -->
<moveButton>Middle</moveButton>
<!-- 'Left', 'Middle', 'Right' -->
</dock>
<keyboard>
<chainQuitKey>C-g</chainQuitKey>
<!-- Keybindings for desktop switching -->
<keybind key="C-A-Left">
<action name="DesktopLeft">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="C-A-Right">
<action name="DesktopRight">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="C-A-Up">
<action name="DesktopUp">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="C-A-Down">
<action name="DesktopDown">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="S-A-Left">
<action name="SendToDesktopLeft">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="S-A-Right">
<action name="SendToDesktopRight">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="S-A-Up">
<action name="SendToDesktopUp">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="S-A-Down">
<action name="SendToDesktopDown">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="W-F1">
<action name="Desktop">
<desktop>1</desktop>
</action>
</keybind>
<keybind key="W-F2">
<action name="Desktop">
<desktop>2</desktop>
</action>
</keybind>
<keybind key="W-F3">
<action name="Desktop">
<desktop>3</desktop>
</action>
</keybind>
<keybind key="W-F4">
<action name="Desktop">
<desktop>4</desktop>
</action>
</keybind>
<keybind key="W-d">
<action name="ToggleShowDesktop"/>
</keybind>
<!-- Keybindings for windows -->
<keybind key="A-F4">
<action name="Close"/>
</keybind>
<keybind key="A-Escape">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</keybind>
<keybind key="A-space">
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</keybind>
<keybind key="Print">
<action name="Execute">
<execute>xfce4-screenshooter</execute>
</action>
</keybind>
<!-- Keybindings for window switching -->
<keybind key="A-Tab">
<action name="NextWindow"/>
</keybind>
<keybind key="A-S-Tab">
<action name="PreviousWindow"/>
</keybind>
<keybind key="C-A-Tab">
<action name="NextWindow">
<panels>yes</panels>
<desktop>yes</desktop>
</action>
</keybind>
<!-- Keybindings for running applications -->
<keybind key="W-w">
<action name="Execute">
<name>iceweasel</name>
<command>iceweasel</command>
</action>
</keybind>
<keybind key="W-a">
<action name="Execute">
<name>abiword</name>
<command>abiword</command>
</action>
</keybind>
<keybind key="W-p">
<action name="Execute">
<name>transmission</name>
<command>transmission</command>
</action>
</keybind>
<keybind key="W-s">
<action name="Execute">
<name>quodlibet</name>
<command>quodlibet</command>
</action>
</keybind>
<keybind key="C-Right">
<action name="Execute">
<name>quodlibet previous</name>
<command>quodlibet --previous</command>
</action>
</keybind>
<keybind key="C-Left">
<action name="Execute">
<name>quodlibet next</name>
<command>quodlibet --next</command>
</action>
</keybind>
<keybind key="C-space">
<action name="Execute">
<name>quodlibet toggle</name>
<command>quodlibet --play-pause</command>
</action>
</keybind>
<keybind key="W-q">
<action name="Execute">
<name>links</name>
<command>links2 -g</command>
</action>
</keybind>
<keybind key="C-S-c">
<action name="Execute">
<name>wallpaper</name>
<command>/home/xavier/.config/openbox/wallpaper.sh</command>
</action>
</keybind>
<keybind key="W-t">
<action name="Execute">
<name>terminator</name>
<command>terminator</command>
</action>
</keybind>
<keybind key="W-b">
<action name="Execute">
<name>dillo</name>
<command>dillo</command>
</action>
</keybind>
<keybind key="W-m">
<action name="Execute">
<name>icedove</name>
<command>icedove</command>
</action>
</keybind>
<keybind key="W-i">
<action name="Execute">
<name>emesene</name>
<command>emesene</command>
</action>
</keybind>
<keybind key="W-v">
<action name="Execute">
<name>vlc</name>
<command>vlc</command>
</action>
</keybind>
<keybind key="W-h">
<action name="Execute">
<name>pcmanfm</name>
<command>pcmanfm</command>
</action>
</keybind>
<keybind key="W-k">
<action name="Execute">
<name>kazehakase</name>
<command>kazehakase</command>
</action>
</keybind>
<keybind key="W-c">
<action name="Execute">
<name>3ddesk</name>
<command>/usr/bin/3ddesk</command>
</action>
</keybind>
<keybind key="W-F12">
<action name="Execute">
<name>xscreensaver-command -activate</name>
<command>xscreensaver-command -activate</command>
</action>
</keybind>
<keybind key="Alt-F2">
<action name="Execute">
<name>gmrun</name>
<command>gmrun</command>
</action>
</keybind>
</keyboard>
<mouse>
<dragThreshold>8</dragThreshold>
<!-- number of pixels the mouse must move before a drag begins -->
<doubleClickTime>200</doubleClickTime>
<!-- in milliseconds (1000 = 1 second) -->
<screenEdgeWarpTime>400</screenEdgeWarpTime>
<!-- Time before changing desktops when the pointer touches the edge of the
screen while moving a window, in milliseconds (1000 = 1 second).
Set this to 0 to disable warping -->
<context name="Frame">
<mousebind button="A-Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="A-Left" action="Click">
<action name="Unshade"/>
</mousebind>
<mousebind button="A-Left" action="Drag">
<action name="Move"/>
</mousebind>
<mousebind button="A-Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="A-Right" action="Drag">
<action name="Resize"/>
</mousebind>
<mousebind button="A-Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind button="A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="C-A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="C-A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="A-S-Up" action="Click">
<action name="SendToDesktopPrevious"/>
</mousebind>
<mousebind button="A-S-Down" action="Click">
<action name="SendToDesktopNext"/>
</mousebind>
</context>
<context name="Titlebar">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Move"/>
</mousebind>
<mousebind button="Left" action="DoubleClick">
<action name="ToggleMaximizeFull"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind button="Up" action="Click">
<action name="Shade"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
<action name="Lower"/>
</mousebind>
<mousebind button="Down" action="Click">
<action name="Unshade"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
</context>
<context name="Top">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize">
<edge>top</edge>
</action>
</mousebind>
</context>
<context name="Left">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize">
<edge>left</edge>
</action>
</mousebind>
</context>
<context name="Right">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize">
<edge>right</edge>
</action>
</mousebind>
</context>
<context name="Bottom">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize">
<edge>bottom</edge>
</action>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
</context>
<context name="BLCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="BRCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="TLCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="TRCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="Client">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
</context>
<context name="Icon">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
</context>
<context name="AllDesktops">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="ToggleOmnipresent"/>
</mousebind>
</context>
<context name="Shade">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="ToggleShade"/>
</mousebind>
</context>
<context name="Iconify">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="Iconify"/>
</mousebind>
</context>
<context name="Maximize">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="ToggleMaximizeFull"/>
</mousebind>
<mousebind button="Middle" action="Click">
<action name="ToggleMaximizeVert"/>
</mousebind>
<mousebind button="Right" action="Click">
<action name="ToggleMaximizeHorz"/>
</mousebind>
</context>
<context name="Close">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="Close"/>
</mousebind>
</context>
<context name="Desktop">
<mousebind button="Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="C-A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="C-A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
</context>
<context name="Root">
<!-- Menus -->
<mousebind button="Middle" action="Press">
<action name="ShowMenu">
<menu>client-list-combined-menu</menu>
</action>
</mousebind>
<mousebind button="Right" action="Press">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</mousebind>
</context>
<context name="MoveResize">
<mousebind button="Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
</context>
</mouse>
<menu>
<!-- You can specify more than one menu file in here and they are all loaded,
just don't make menu ids clash or, well, it'll be kind of pointless -->
<!-- default menu file (or custom one in $HOME/.config/openbox/) -->
<!-- system menu files on Debian systems -->
<file>/var/lib/openbox/debian-menu.xml</file>
<file>debian-menu.xml</file>
<file>menu.xml</file>
<hideDelay>200</hideDelay>
<!-- if a press-release lasts longer than this setting (in milliseconds), the
menu is hidden again -->
<middle>no</middle>
<!-- center submenus vertically about the parent entry -->
<submenuShowDelay>100</submenuShowDelay>
<!-- this one is easy, time to delay before showing a submenu after hovering
over the parent entry -->
<applicationIcons>yes</applicationIcons>
<!-- controls if icons appear in the client-list-(combined-)menu -->
<manageDesktops>yes</manageDesktops>
<!-- show the manage desktops section in the client-list-(combined-)menu -->
</menu>
<applications>
<!--
# this is an example with comments through out. use these to make your
# own rules, but without the comments of course.
<application name="first element of window's WM_CLASS property (see xprop)"
class="second element of window's WM_CLASS property (see xprop)"
role="the window's WM_WINDOW_ROLE property (see xprop)">
# the name or the class can be set, or both. this is used to match
# windows when they appear. role can optionally be set as well, to
# further restrict your matches.
# the name, class, and role use simple wildcard matching such as those
# used by a shell. you can use * to match any characters and ? to match
# any single character.
# when multiple rules match a window, they will all be applied, in the
# order that they appear in this list
# each element can be left out or set to 'default' to specify to not
# change that attribute of the window
<decor>yes</decor>
# enable or disable window decorations
<shade>no</shade>
# make the window shaded when it appears, or not
<position>
# the position is only used if both an x and y coordinate are provided
# (and not set to 'default')
<x>center</x>
# a number like 50, or 'center' to center on screen. use a negative number
# to start from the right (or bottom for <y>), ie -50 is 50 pixels from the
# right edge (or bottom).
<y>200</y>
<monitor>1</monitor>
# specifies the monitor in a xinerama setup.
# 1 is the first head, or 'mouse' for wherever the mouse is
</position>
<focus>yes</focus>
# if the window should try be given focus when it appears. if this is set
# to yes it doesn't guarantee the window will be given focus. some
# restrictions may apply, but Openbox will try to
<desktop>1</desktop>
# 1 is the first desktop, 'all' for all desktops
<layer>normal</layer>
# 'above', 'normal', or 'below'
<iconic>no</iconic>
# make the window iconified when it appears, or not
<skip_pager>no</skip_pager>
# asks to not be shown in pagers
<skip_taskbar>no</skip_taskbar>
# asks to not be shown in taskbars. window cycling actions will also
# skip past such windows
<fullscreen>yes</fullscreen>
# make the window in fullscreen mode when it appears
<maximized>true</maximized>
# 'Horizontal', 'Vertical' or boolean (yes/no)
</application>
# end of the example
-->
<application name="stalonetray">
<decor>yes</decor>
<desktop>all</desktop>
<layer>below</layer>
<skip_pager>yes</skip_pager>
<skip_taskbar>yes</skip_taskbar>
</application>
</applications>
</openbox_config>
Le menu
Pour configurer le menu que vous faites apparaître par un clic-droit sur le bureau, éditez le fichier menu.xml (toujours dans le même répertoire).
Sinon, lancez en ligne de commande obmenu, vous pourrez alors le modifier de manière graphique.
Utilisation
Pour démarrer Openbox seul, choisissez « Openbox » depuis le menu « session » de GDM ou KDM.
Pour l'utiliser comme gestionnaire de fenêtre sur Gnome, choisissez « GNOME/Openbox » dans le menu session de GDM ou KDM.
Pour l'utiliser comme gestionnaire de fenêtre sur KDE, choisissez donc « KDE/Openbox » dans le menu session de KDM ou GDM.
Personnalisation
Openbox étant très minimaliste pour être le plus léger possible, il peut vous être utile d'utiliser quelques autres petits programmes. Voici, entre autre choses, quelques exemple de petits programmes très légers et pratiques.
Obconf
Lancez ce gestionnaire de configuration avec la commande obconf, ou par le menu d'Openbox en faisant un simple clic-droit sur le bureau.
Vous pourrez alors configurer plusieurs options :
- le thème de couleurs (installez le paquet openbox-themes, ou téléchargez le thème que vous voulez sur box-look.org.
- Les polices des fenêtres et autres
- Le comportement des fenêtres, de la souris…etc
- Vous pouvez aussi définir une marge sur l'écran, une zone qui ne sera pas recouverte par les fenêtres, ce qui peut être très pratique pour avoir un accès rapide au menu d'Openbox par un clic-droit.
- Configuration du dock, pour les applications dockables (dockapps.org)
Le fond d'écran
Qui a dit que l'on ne pouvait pas mettre le fond d'écran que l'on voulait sous Openbox ? bien sûr que si! voici quelques possibilités :
- Utilisez des programmes tels que gnome-appearance-properties , nitrogen, drapes, wallpaper-tray, hsetroot, feh… il y en a une ribambelle ! Pour ces derniers, il peut être pratique de les lancer au démarrage (voir plus bas).
- Un nouveau fond à chaque démarrage :
voici l'astuce ! ouvrez gedit (par exemple), et copiez ce texte :
#!/bin/bash -u
#Description: Ce script requiert feh sur votre machine, il changera votre fond d'écran openbox (ou autre) automatiquement toutes les 400 seondes
#Author: Millien Marc
#Date: 2 mars 2008
#On vérifie l'existence du répertoire Images/Fonds
if [ -d ~/Images/Wallpapers/ ] ; then
cd ~/Images/Wallpapers/
#On compte le nombre de fichiers
_fics=`ls | grep -E "*.(png|jpg)" | wc -l`
#S'il y a plus d'un fichier c'est parti
if [ ${_fics} -gt 0 ] ; then
#On vérifie que le script ne tourne pas déjà
_ps=`ps aux`
_pid=`echo "${_ps}" | grep $0 | tr -s [:space:] | cut -d' ' -f2`
_lines=`echo "${_pid}" | wc -w`
if [ ${_lines} -gt 1 ]; then
_pid=`echo ${_pid} | cut -d' ' -f1`
echo "Un script en trop, on le kill (pid: ${_pid})"
kill ${_pid}
fi
#Boucle de fonctionnement
while true; do
#On sélectionne un fichier au hasard
_nombre=$RANDOM
_nombre=`expr ${_nombre} % ${_fics}`
if [ ${_nombre} -eq 0 ] ; then
_nombre=1
fi
_image=`ls | grep -E "*.(png|jpg)" | head --lines=${_nombre} | tail -1`
#On affiche le fichier
sleep 20
feh --bg-scale "${HOME}/Images/Wallpapers/${_image}"
sleep 400
_fics=`ls | grep -E "*.(png|jpg)" | wc -l`
done
else
echo "Veuillez placer des fichiers images dans le répertoire ${HOME}/Images/Wallpapers !"
fi
else
echo "Veuillez créer le répertoire ${HOME}/Images/Wallpapers et y placer vos fonds d'écran !"
fi
Indiquez le dossier où sont tous vos wallpapers. Puis, sauvegardez ce script où vous voulez, appelez le par exemple wallpaper.sh. Il ne vous reste plus qu'à le rendre exécutable en tapant dans une console :
chmod +x wallpaper.sh
ou bien en faisant un clic-droit puis propriétés, permissions, autoriser l'exécution du fichier comme un programme.
Et voilà, il ne vous reste plus qu'à le lancer au démarrage avec la commande /home/login/chemin_vers_le_fichier/wallpaper.sh
Autres possibilités : https://help.ubuntu.com/community/RotateWallpapers
Les icônes sur le bureau
Si si, c'est possible ! pour cela, installez rox-filer, et faites un glisser-déposer sur le bureau.
Alternatives : Utilisez idesk ou fbdesk. (ils sont très légers, personnellement, j'utilise idesk)
Idesk
Après l'installation, vous trouverez un fichier ~/.ideskrc qui permet de configurer le comportement de vos futures icônes. Voici le mien :
table Config
FontName: gothic
FontSize: 11
FontColor: #37CFA6
ToolTip.FontSize: 11
ToolTip.FontName: gothic
ToolTip.ForeColor: #0000FF
ToolTip.BackColor: #FFFFFF
ToolTip.CaptionOnHover: true
ToolTip.CaptionPlacement: Right
Locked: false
Transparency: 100
Shadow: true
ShadowColor: #000000
ShadowX: 1
ShadowY: 1
Bold: true
ClickDelay: 300
IconSnap: true
SnapWidth: 20
SnapHeight: 20
SnapOrigin: BottomRight
SnapShadow: false
SnapShadowTrans: 200
CaptionOnHover: false
CaptionPlacement: bottom
FillStyle: fillinvert
Background.File: latina.jpg
end
table Actions
Lock: control right doubleClk
Reload: middle doubleClk
Drag: left hold
EndDrag: left singleClk
Execute[0]: left doubleClk
Execute[1]: right doubleClk
end
Pour pouvoir mettre des icônes sur votre bureau, il vous faut au préalable créer un répertoire ~/.idesktop. Pour cela :
mkdir .idesktop
ou clic-droit, nouveau répertoire.
Maintenant placez-vous dans ce répertoire et créez, par exemple, un fichier firefox.lnk, en y mettant à l'intérieur:
table Icon
Caption: Firefox
Command: /usr/bin/firefox
Icon: /usr/share/pixmaps/firefox.png
Width: 48
Height: 48
X: 1179
Y: 253
end
Et voilà, quand vous lancerez idesk, vous aurez un belle icône Firefox sur votre bureau, que vous placerez où vous voulez. Créez autant de fichier.lnk que d'icône que vous voulez placer sur votre bureau. Les icônes peuvent se déplacer avec la souris ensuite, pas de panique avec la position !
fbdesk
Installez le paquet fbdesk.
Une fois installé, éditez le fichier fbdesk.icons.
Chaque entrée se présente comme suit :
[Desktop Entry] Name=default Exec= Icon= Pos= 100 100 [end]
- Name : Nom
- Exec : le nom de l'executable (vous en trouverez dans /usr/bin/)
- Icon : adresse de l'îcone (vous en trouverez dans /usr/share/pixmaps/)
- Pos : Position en X et Y
Exemple d'un fichier configuré :
[Desktop Entry] Name=Roxfiler Exec=rox-filer Icon=~/icones/home.png Pos= 50 50 [end] [Desktop Entry] Name=Gaim Exec=gaim Icon=~/icones/gaim.png Pos= 50 150 [end] [Desktop Entry] Name=VideoLan Exec=vlc Icon=~/icones/tv.png Pos= 50 250 [end] [Desktop Entry] Name=Firefox Exec=firefox Icon=~/icones/firefox.png Pos= 50 350 [end] [Desktop Entry] Name=Terminal Exec=gnome-terminal Icon=~/icones/term.png Pos= 50 450 [end]
(~ sera remplacé par /home/user une fois fbdesk relancé)
La barre de tache
Sous Openbox, vous pouvez vous passer de barre de tâches, à condition d'aimer le raccourci alt+tab, pour changer de fenêtre.
voici une liste non exhaustive de programmes à lancer au démarrage servant de barre des taches :
- bbpager
- pypanel (configurable en éditant le .pypanelrc dans votre home) , très léger
- gnome-panel (panel de GNOME)
- fspanel
- fbpanel (configurable en tapant fbpanel –configure), encore plus léger.
- perlpanel
- xfce4-panel (panel de Xfce)
- lx-panel, panel de lxde
Pour avoir un system-tray, vous pouvez installer stalonetray. un exemple du fichier de configuration à placer dans le fichier texte ~/.stalonetrayrc : exemple de stalonetrayrc ou pour avoir le tray dans le dock d'openbox, lancez le avec la commande : stalonetray -w , et avec la transparence : stalonetray -t -w (cela évite de devoir écrire tout le .stalonetrayrc, et le dock est très facilement configurable dans obconf)
Voici une liste tirée du wiki d'Openbox de programmes utiles pour Openbox : (extrait du wiki d'openbox)
Besides the programs included in GNOME and KDE…
- visibility (click snapshot to download a .tar.gz)
- pypanel - PyPanel is a lightweight panel/taskbar. It can be easily customized to match any desktop theme or taste.
- Tint Task Manager (new release) - Tint is a simple panel/taskbar intentionally made for openbox3, but should also work with other window managers (dépendances pour la compilation : sudo aptitude install libcairo2-dev libpango1.0-dev libglib2.0-dev libimlib2-dev libxinerama-dev libxrandr-dev)
- feh - Image viewer
- BBDock (untested. EWMH capable) Tested by CrossWind, Fully operational!
- Set Layout - small program to set your desktops into a grid if you do not use a pager
You can find lots of dockapps at [http://www.dockapps.org dockapps.org]. Some nice ones are wmCalClock, wmnd, wmix and wmpinboard.
There are other programs of interest in the Community portal.
les themes gtk
Pour ne pas avoir des applications gtk toutes moches, voici quelques astuces : -créez ou éditer un fichier dans votre home nommé .gtkrc-2.0, puis remplissez-le ainsi :
gtk-font-name = "Zekton 9"
gtk-theme-name = "Crude"
gtk-icon-theme-name = "black-white_2-Style"
-installez switch2 :
sudo aptitude install gtk-theme-switch gtk2-engines
puis lancez dans une console
switch2
et choisissez votre thème.
-Vous pouvez aussi installer le gestionnnaire d'apparence de gnome (car openbox gère automatiquement les applis gnome et kde au démarrage!)
sudo aptitude install gnome-settings-daemon
-Ou pour xfce :
sudo aptitude install xfce-mcs-manager
Le montage automatique de volume
lancez gnome-volume-manager, ou bien installez ivman
sudo apt-get install ivman
Le démarrage automatique de programmes
Lorsque vous lancez openbox, un script de démarrage se lance. Celui par défaut se situe ici : /etc/xdg/openbox/autostart.sh
Mais Vous pouvez utiliser votre propre script de démarrage! C'est très simple, il vous suffit de le placer ici : ~/.config/openbox/autostart.sh Ce sera ce script qui sera alors utilisé automatiquement à la place de celui par défaut. Voici ce que vous pouvez faire :
lancez gedit
copiez collez ce texte :
# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.
# Set a background color
BG=""
if which hsetroot >/dev/null; then
BG=hsetroot
else
if which esetroot >/dev/null; then
BG=esetroot
else
if which xsetroot >/dev/null; then
BG=xsetroot
fi
fi
fi
test -z $BG || $BG -solid "#303030"
# D-bus
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval `dbus-launch --sh-syntax --exit-with-session`
fi
# Make GTK apps look and behave how they were set up in the gnome config tools
if which gnome-settings-daemon >/dev/null; then
gnome-settings-daemon &
fi
# Preload stuff for KDE apps
if which start_kdeinit >/dev/null; then
LD_BIND_NOW=true start_kdeinit --new-startup +kcminit_startup &
fi
Enregistrez-le sans /home/votre_login/.config/openbox/autostart.sh puis rendez le script éxécutable (chmod +x /home/votre_login/.config/openbox/autostart.sh , ou clic-droit, permissions, permettre l'utilisation du fichier comme un programme.)
Vous pouvez ajouter les programmes que vous voulez bien entendu, la seule chose à ne pas oublier, c'est de rajouter un "&" à la fin de chaque ligne, sinon, le script s'arrête. Vous pourrez ainsi lancer votre gestionnaire d'icones sur le bureau idesk, une barre de taches, conky….etc Voici pour exemple mon autostart.sh :
# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.
# D-bus
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval `dbus-launch --sh-syntax --exit-with-session`
fi
gnome-settings-daemon &
xscreensaver -no-splash &
/usr/lib/gnome-volume-manager/gnome-volume-manager --sm-disable &
sh /home/xavier/.conky/conky.sh &
#idesk &
update-notifier &
gnome-power-manager &
nm-applet &
fbpanel &
sleep 3
drapes &
xcompmgr -fF -I-.002 -O-.003 -D6 -cC -t-5 -l-6 -r5 &
La transparence
installez le paquet xcompmgr, et lancez le ;)
Désinstallation
Il suffit de désinstaller les packet openbox, obconf, obmenu.
sudo apt-get remove openbox obconf obmenu




