LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-03-2005, 07:46 PM   #1
ncf
Member
 
Registered: Jun 2005
Distribution: Slackware/10.1
Posts: 47

Rep: Reputation: 15
Using Multiple WMs


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)

Last edited by ncf; 11-03-2005 at 07:48 PM.
 
Old 11-03-2005, 07:52 PM   #2
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Code:
startx /usr/X11R6/bin/fluxbox
Code:
startx /opt/kde/bin/startkde
 
Old 11-03-2005, 07:53 PM   #3
Seiken
Member
 
Registered: Sep 2004
Location: Canada
Distribution: Slackware 14
Posts: 248

Rep: Reputation: 30
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

Last edited by Seiken; 11-03-2005 at 07:54 PM.
 
Old 11-03-2005, 08:03 PM   #4
ncf
Member
 
Registered: Jun 2005
Distribution: Slackware/10.1
Posts: 47

Original Poster
Rep: Reputation: 15
Wow...that was suprisingly fast :P

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
 
Old 11-03-2005, 10:00 PM   #5
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
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.

If you don't know about it yet, i recommend you this guide: http://www.tldp.org/LDP/abs/html/

Last edited by gbonvehi; 11-03-2005 at 10:02 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
having two WMs open? DJOtaku Linux - General 6 08-16-2005 04:30 PM
Lots of WMs khsater Linux - Distributions 3 03-26-2005 10:12 PM
WMs from the console nub47 Linux - Newbie 2 01-05-2004 04:00 PM
WMs from the console nub47 Debian 3 01-05-2004 11:11 AM
DEs and WMs KptnKrill Linux - General 3 06-22-2003 05:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration