SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there any way to use multiple window managers by simply using startx commands? (i.e., startx -flux)
-Wes
::Edit:: Err, should've been more specific. I ask this because I really don't want to have to do a xwmconfig every time I swicth WMs.... (I use KDE primarily, because this is a multi-user system, but would like to use Fluxbox when doing CPU-intensive tasks--about 50% of the time)
Notably, I would rather not use if blocks to do it.... (maybe even doing a command like WM="fluxbox" startx)
maybe you could have multiple .xinitrc files in your home dir... name them like .xinitrc-kde and .xinitrc-flux.
then have 2 scripts called startk and startf or something. the startk script would "cp .xinitrc-kde .xinitrc" and then startx. the startk script would "cp .xinitrc-flux .xinitrc" and then startx.
would that work for ya?
edit: it seems the fellow above me has an easier solution
Well, thankee. I was alsow orking on a solution of my own, to try and practice bash, and I ~think~ I may have come up with something decent (although, perfect_circle has a pretty darned good solution...)
I was just about to edit and say that I meant "dont' want to use a lot of if blocks", and this is my conceptual solution (which, IMO, is shit, but I'm looking for all your feedback)
Code:
if [ `echo $WM |wc -c` -le 1 ]; then
WM="kde";
fi
if [ `whereis start$WM |cut -d':' -f2 |wc -c` -ge 2 ]; then
start$WM;
else
echo "Could not find the approiate Window Manager (start$WM)";
fi
You solution is fine if it suits your needs, that's the power of making your own scripts
I would rather use something like:
Code:
case "$1" in
"fluxbox")
# Start Fluxbox
;;
"kde")
# Start KDE
;;
*)
# Start default WM
;;
esac
$1 means first command line parameter, so if you give fluxbox as parameter, it will start fluxbox, if you give kde it will start KDE, otherwise, the default one.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.