Multiple Window Manager using one Xinitrc

Synopsis

Tired of editing your ~/.xinitrc each time you want to start a different window manager?, I have the solution for you, one .Xinitrc to start everything without ever editing .xinitrc

Description

I was tired of editing/commenting Window Managers in .xinitrc, So I decided to look for a way to start any Window Manager, switch between them using one command line, and also make sure that the command ‘startx’ starts the last Window Manager used…

The idea goes like this, the real xinitrc file will be called .Xinitrc, .xinitrc will be a symbolic link to .xinitrc-sessions/windowmanager, and .xinitrc-sessions/windowmanager is just a small file that goes something like this:

#!/bin/sh
source $HOME/.Xinitrc

So when you call startx, .Xinitrc will be called, in .Xinitrc the Window Manager name will be concluded from the file which .xinitrc links to (in this case .xinitrc-sessions/windowmanager)

To make the task even easier, instead of creating .xinitrc-sessions/* and .xinitrc link, I created a small and simple bash script which will create all the required files/links needed to launch the Window Manager

example:

If I want to run awesome, all I have to do is call:

$ xsession awesome

If I want to change to gnome, so

$ xsession gnome

and now, running:

$ startx

will launch gnome as it was the last Window Manager

Installation

To install you need git installed

git clone git://github.com/eMxyzptlk/MultiWmXinitrc.git

cd MultiWmXinitrc

git submodule init
git submodule update

make
sudo make install

This will install everything to /usr/local, If you want to install them in another place, like your home directory then use the prefix option as in

make prefix=${HOME} install

You can open a ticket over at my Redmine. As this is free software the response time can vary.

# Ticket Tracker Created at Status

Comments

blog comments powered by Disqus

Donations

Most of my software is free but I still need to eat and keep the wife happy.

If you use any software commercially please consider giving a donation.

Make a donation via PayPal

Fork me on GitHub
photo of Wael Nasreddine wael.nasreddine@gmail.com
4 place de Sérbie
Rennes, Bretagne, 35200 France
+33 6 32 94 70 13
Jabber