Thank you Williams , I know I must check the kernel (uname -r) and then run WM

but how can I do that in Gentoo (because Gentoo use /etc/rc.conf ) ?

can I do shell script in the file /etc/rc.conf ?

Mike Williams wrote:
On Friday 05 December 2003 23:25, SMS WebMaster wrote:

Hi

Can gentoo run WM depending in the Kernel ?

for example when I run the kernel "gentoo-standard" I want gentoo to run
  gnome as my window manager

BUT if I run "gentoo-lowbattry" I want gentoo to run XFCE

can I do that ? (don't tell me to have two accounts ;) )


It should be trivial to check what kernel is running to decide what WM to use.
How do you start X, and your WM?
startx runs .xinitrc as a shell script IIRC, and {k,g,x]dm run sessions from 
/etc/X11/Sessions

sauron root # uname -r
2.4.22-ck2
sauron root # uname=`uname -r`
sauron root # if [ "`echo $uname | egrep ck2$`" != "" ]

then
echo "kernel ck2, running gnome"
elif [ "`echo $uname | egrep lowbattery$`" != "" ]
then
echo "kernel lowbattery, running xfce"
fi

sauron root # uname=2.4.22-lowbattery sauron root # if [ "`echo $uname | egrep ck2$`" != "" ]; then echo "kernel ck2, running gnome"; elif [ "`echo $uname | egrep lowbattery$`" != "" ]; then echo "kernel lowbattery, running xfce"; fi kernel lowbattery, running xfce



-- [EMAIL PROTECTED] mailing list






-- http://www.4-SMS.Com http://eShop.4-SMS.Com http://Mozilla.4-SMS.Com -*- If Linux doesn't have the solution, you have the wrong problem -*-


-- [EMAIL PROTECTED] mailing list



Reply via email to