Window Managers

From Bit Binary Wiki
Jump to: navigation, search

Contents

Introduction

This is intended to be a brief article on how to install and configure various Window Managers on Debian Sid.

Resources

CrunchBang forum member 2ManyDogs did and incredible review of 30 window managers in 30 days. Reviewing this is highly recommended.

Openbox

apt-get install openbox obconf obmenu menu

You may also like to install the openbox-themes package.

Tip: obconf and obmenu are not strictly required as you can configure Openbox's configuration files directly, I would suggest installing obconf at a minimum

Now create your users Openbox configuration

su - username
mkdir -p ~/.config/openbox
cp /etc/xdg/openbox/* ~/.config/openbox/

At this point run startx as your normal user account to check everything is working at a base level.

startx

Right click on the Desktop and choose exit once complete.

Starting X Automatically

Install python-xdg as Openbox depends on it for xdg autostart stuff.

apt-get install python-xdg

Option 1: Start X when logging in to tty1

This method requires no display manager.

Simply append the following code to your standard users ~/.profile

if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ] ; then
    { exec startx -- -dpi 96 2>&1 | logger -t x-session ; exit ; }
fi

And create an ~/.xinitrc

echo "exec ck-launch-session dbus-launch openbox-session" > ~/.xinitrc

Then login to console 1 as your standard user and you should find that Openbox launches automatically.

xdg auto start

Due to a bug in the openbox-session script you cannot append arguments to the openbox-session script. For the startx method you can to the following:

Create the following script called openbox-session-autostart and place it in your $PATH e.g. ~/bin or ~/.bin

#!/bin/sh

# Set up the environment
A="/etc/xdg/openbox/environment"
test -r $A && . $A
A="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/environment"
test -r $A && . $A

# Run Openbox, and have it run the autostart stuff
exec /usr/bin/openbox --startup "/usr/lib/openbox/openbox-autostart OPENBOX GNOME" "$@"

Then update ~/.xinitrc replacing openbox-session with openbox-session-autostart

echo "exec ck-launch-session dbus-launch openbox-session-autostart" > ~/.xinitrc

See this link for further information.

Option 2: Graphical login using lightdm

apt-get install lightdm

lightdm does not source ~/.profile like some other desktop managers and Debian will not alter this unless upstream do. So if you have options in ~/.profile that you need sourced in your X windows sesssion then you can do the following:

Edit ~/.xsessionrc and append the following (create the file if it does not exist).

. /etc/profile
. ${HOME}/.profile

See this link for further information.

xdg auto start

If you would like files in /etc/xdg/autostart/ that only start in gnome, xfce or kde to launch with your Openbox session you can do the following:

cp /usr/bin/openbox-session ~/.xsession

Then edit the last line in ~/.xsession adding "GNOME" (or other desktop environments) to the openbox-autostart arguments so the line would look like

exec /usr/bin/openbox --startup "/usr/lib/openbox/openbox-autostart OPENBOX GNOME" "$@"

See this link for further information.

Personal tools