Click to See Complete Forum and Search --> : How to setup easy switching?
Gaccm
06-28-2001, 10:46 PM
I want to have two diff X enviorns.
1) KDE running in 32bit
2) Blackbox running in 16bit
i cant figure out any easy way to switching between them. what i would like is to just have two diff aliased commands, like 'kde' and 'bbox' which each starts its own X environs.
Has anyone done this successfully?
demetrius
06-28-2001, 11:03 PM
I've considered doing something very close to this .. one configuration that starts my normal xsession (Enlightenment with a Gnome panel) and one for gaming (X with nothing but an Xterm). I haven't tried it yet, but what i was thinking of doing is this:
1. Make two text files which can be cp'd to .xinitrc with the relevant enties to startx with my desired configuration.
2. Create 2 simple bash scripts that copy said text files to .xinitrc and startx.
The bash scripts, I assume could simply contain:
#!/bin/bash
cp game.txt .xinitrc &&
startx
or
#!/bin/bash
cp desktop.txt .xinitrc &&
startx
in your case you could use
#!/bin/bash
cp blackbox.txt .xinitrc &&
startx -16bpp
and
#!/bin/bash
cp kde.txt .xinitrc &&
startx -32bpp
Then you could invoke x by calling the script files which should startx with the correct window manager and color depth. Of course I have yet to try this, but in theory it should work.
Gaccm
06-29-2001, 01:29 AM
dang, i was trying to figure out this complex aliasing the commands without having to use the .xinitrc, and you come and blow it all away with two simple 2 line scripts :)
Why do you have the && in the cp command? what is its purpose, but other than that it seems 100% to my eyes.
Gaccm
06-29-2001, 01:44 AM
another slight change
its not startx --16bpp
its startx -- -depth 16 (well, for 4.x)
also, X doesn't technicly 'have' 32bit, i dont really understand it. If you try to startx with 32 depth it errors with 'no screen found'
demetrius
06-29-2001, 01:53 AM
Yup, its actually 24bit color with an 8bit frame buffer which gives you 32bit color. So I guess it would be startx -- -depth 24.
The && is to make sure the startx isn't run until the txt file is copied to .xinitrc. May not be neccessary, just being safe :)