[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-amd64
Subject:    [gentoo-amd64]  Re: How do I switch to a window manager?
From:       Duncan <1i5t5.duncan () cox ! net>
Date:       2009-06-17 18:51:50
Message-ID: pan.2009.06.17.18.51.49 () cox ! net
[Download RAW message or body]

Steve Herber <herber@thing.com> posted
Pine.LNX.4.64.0906170910450.29525@thing.com, excerpted below, on  Wed, 17
Jun 2009 09:39:13 -0700:

> Can somebody answer a question, related to the favorite WM question, how
> do I change to an alternative window manager?
> 
> I normally run xdm and update my .xinitrc or .xsession file to do this
> but I feel that there should be a better way.  How do you do it?

My "better way" is to not use a graphical login manager at all, but 
rather to login at the text login prompt, and start X (and my WM/DE 
(windo manager / desktop environment) of choice) from there.  Whether 
that's a "better way" for you or not, of course depends on you, but it 
Works for Me (tm)!

The various DEs and at least some of the WMs should put session scripts 
in /etc/X11/Sessions, with launchers (like startkde) in the path.  You 
can either use the launchers, or create your own.

I create my own launchers as scriptlets that make use of the generic 
startx.  Normally, startx depends on the XSESSION variable as set and 
exported in either the system scripts (rc.conf, IIRC for baselayout-1 
users) or in a user's startup scripts (.bashrc or the like).  However, 
that's kind of limiting since it leaves just one choice.  So for each 
session script in /etc/X11/Sessions, I create a scriptlet, say k4 for 
kde4, k3 for kde3, g2 if I had gnome2 installed, etc.  Each of these sets 
and exports the XSESSION variable to match the appropriate filename in 
the Sessions dir, and then invokes startx.  Now, with a single short (two-
character in the above examples, g2, k3, k4, etc) command, I can start 
any of the session types I want. =:^)

What's nice about this is that once the launcher scriptlets are setup, 
it's possible to take care of any other housekeeping as necessary, 
setting up any other environmental vars, whatever.  Any commands before 
the startx will run as X and that environment starts.  Any after it will 
run as it quits back to the text login.  Or, make it startx &, so it runs 
in the background and issue the bash disown command, and the script will 
startx in the background and then terminate, leaving you with a bash 
prompt again.  Then you can do what I do and run ". k3", so it runs it in 
the current shell, and it'll logout after startx as well, thus returning 
that VT to the login prompt.

As can be seen, it wasn't for nothing that I said my system is rather 
more uniquely customized than most. =:^)  But it fits the way I work and 
is thus the "better way" for me, which is what counts.  And of course 
Gentoo makes all that customization far easier than most distributions 
do, making it all the better! =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic