Help:Using Openbox in GNOME

From Openbox

(Difference between revisions)
Jump to: navigation, search
(Nautilus and Openbox: typo)
m (Fix broken link)
 
(23 intermediate revisions by 18 users not shown)
Line 2: Line 2:
  
 
[[Image:LoginOptions.png|right|thumb|Figure 1: The GNOME/Openbox option when logging in]]
 
[[Image:LoginOptions.png|right|thumb|Figure 1: The GNOME/Openbox option when logging in]]
 +
The instructions below don't work with current versions of GNOME and Openbox versions before 3.4.8.  As a workaround, you can run the command <code>openbox --replace</code> after logging into a standard GNOME session, and cross your fingers.
 +
 
To log into the GNOME desktop environment with Openbox as your window manager, select the "GNOME/Openbox"  
 
To log into the GNOME desktop environment with Openbox as your window manager, select the "GNOME/Openbox"  
 
option when logging in through GDM, which you can see in Figure 1.
 
option when logging in through GDM, which you can see in Figure 1.
Line 10: Line 12:
  
 
<div style="clear: right;">
 
<div style="clear: right;">
 +
 
== Accessing gnome-panel with key bindings ==
 
== Accessing gnome-panel with key bindings ==
 
[[Image:GnomeMenuInOpenbox.png|left|thumb|Figure 2: The gnome-panel main menu]]
 
[[Image:GnomeMenuInOpenbox.png|left|thumb|Figure 2: The gnome-panel main menu]]
Line 25: Line 28:
 
</pre></code></div>
 
</pre></code></div>
  
Just add that to the &lt;keyboard&gt; section of your <code>rc.xml</code> [[Help:Config| configuration file]], and change the keys to match your preferences. The keys shown are the defaults used by Metacity, the default window manager for GNOME.
+
Just add that to the &lt;keyboard&gt; section of your <code>rc.xml</code> [[Help:Configuration| configuration file]], and change the keys to match your preferences. The keys shown are the defaults used by Metacity, the default window manager for GNOME.
 
</div>
 
</div>
  
Line 43: Line 46:
  
 
You can also use the same command in a key binding to log out by pressing a key combination.
 
You can also use the same command in a key binding to log out by pressing a key combination.
 +
 +
The session state may not be preserved when you log out with Openbox running.  You can fix this by restarting Metacity first, for example with the following shell script.
 +
 +
<code><pre>
 +
killall openbox
 +
coproc metacity
 +
gnome-session-save --logout-dialog
 +
</pre></code>
 +
 +
And to shut down
 +
 +
<code><pre>
 +
killall openbox
 +
coproc metacity
 +
gnome-session-save --shutdown-dialog
 +
</pre></code>
  
 
== Nautilus and Openbox ==
 
== Nautilus and Openbox ==
If you don't want Nautilus to draw icons on your desktop, you can disable it with the <code>gconf-editor</code> program.  Run <code>gconf-editor</code> and browse to "/apps/nautilus/preferences" and turn off the '''show desktop''' option.
+
If you don't want Nautilus to draw icons on your desktop, you can disable it with the <code>gconf-editor</code> program.  Run <code>gconf-editor</code> and browse to "/apps/nautilus/preferences" and turn off the '''show desktop''' option. Another simpler way to get that is to call nautilus with the --no-desktop switch.
  
If you do want icons from Nautilus on your desktop, you should disable the menu Openbox shows when you right-click on the desktop.  Other desktop programs don't have this problem, but with Nautilus you won't be able to access its right-click menu unless you disable Openbox's.  In the default configuration <code>rc.xml</code> file, remove the following section (in the "Root" mouse-binding context):
+
If you do want icons from Nautilus on your desktop, you should disable the menu Openbox shows when you right-click on the desktop.  Other desktop programs don't have this problem, but with Nautilus you won't be able to access its right-click menu unless you disable Openbox's (or use Shift-Right Click to access the Nautilus menu).  In the default configuration <code>rc.xml</code> file, remove the following section (in the "Root" mouse-binding context):
 
<code><pre>
 
<code><pre>
 
     <mousebind button="Right" action="Press">
 
     <mousebind button="Right" action="Press">

Latest revision as of 13:37, 10 July 2017

Contents

[edit] Starting Openbox with GNOME

(thumbnail)
Figure 1: The GNOME/Openbox option when logging in

The instructions below don't work with current versions of GNOME and Openbox versions before 3.4.8. As a workaround, you can run the command openbox --replace after logging into a standard GNOME session, and cross your fingers.

To log into the GNOME desktop environment with Openbox as your window manager, select the "GNOME/Openbox" option when logging in through GDM, which you can see in Figure 1.

If you don't use a graphical log in, you can use the openbox-gnome-session command to start a GNOME session with Openbox as your window manager.

See the getting started guide for more details.

[edit] Accessing gnome-panel with key bindings

(thumbnail)
Figure 2: The gnome-panel main menu

If you are using gnome-panel in Openbox and want to access it with key bindings, you can use the gnome-panel-control program (which is a part of Openbox) to do so.

Here is an example of two bindings to pop up the gnome-panel's main menu, and to pop up the "Run" dialog:

<keybind key="A-F1">
    <action name="execute"><execute>gnome-panel-control --main-menu</execute></action>
</keybind>
<keybind key="A-F2">
    <action name="execute"><execute>gnome-panel-control --run-dialog</execute></action>
</keybind>

Just add that to the <keyboard> section of your rc.xml configuration file, and change the keys to match your preferences. The keys shown are the defaults used by Metacity, the default window manager for GNOME.

[edit] Logging out

(thumbnail)
Figure 3: The GNOME logout screen, shown with gnome-session-save

In order to log out of GNOME without going through the gnome-panel, you can use the command gnome-session-save --kill --gui.

Here is an example of a "Log out" option for a menu:

<menu id="root-menu">
  ...
  <item label="Log out">
    <action name="Execute"><execute>gnome-session-save --kill --gui</execute></action>
  </item>
</menu>

You can also use the same command in a key binding to log out by pressing a key combination.

The session state may not be preserved when you log out with Openbox running. You can fix this by restarting Metacity first, for example with the following shell script.

killall openbox
coproc metacity
gnome-session-save --logout-dialog

And to shut down

killall openbox
coproc metacity
gnome-session-save --shutdown-dialog

[edit] Nautilus and Openbox

If you don't want Nautilus to draw icons on your desktop, you can disable it with the gconf-editor program. Run gconf-editor and browse to "/apps/nautilus/preferences" and turn off the show desktop option. Another simpler way to get that is to call nautilus with the --no-desktop switch.

If you do want icons from Nautilus on your desktop, you should disable the menu Openbox shows when you right-click on the desktop. Other desktop programs don't have this problem, but with Nautilus you won't be able to access its right-click menu unless you disable Openbox's (or use Shift-Right Click to access the Nautilus menu). In the default configuration rc.xml file, remove the following section (in the "Root" mouse-binding context):

    <mousebind button="Right" action="Press">
      <action name="ShowMenu"><menu>root-menu</menu></action>
    </mousebind>

Also, file a bug report for Nautilus so you won't have to do this in the future.

Personal tools