Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
.xinitrc mod to select window manager/desktop environment
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
triad
Apprentice
Apprentice


Joined: 10 Jul 2003
Posts: 234
Location: Dark Side of the Moon

PostPosted: Mon Sep 08, 2003 7:36 pm    Post subject: .xinitrc mod to select window manager/desktop environment Reply with quote

After many hours of digging around on this forum and googling to death finally found a pretty easy way to select what type of window manager/desktop environment at startx without using a login manager. Basicaly created .xinitrc with this code in it.:

Code:

#!/bin/bash
#
# .xsession/.xinitrc
#
# choose a window manager
#

defaultwm=kde
#set the window manager to $1 if it was supplied
windowmgr=${1:-$defaultwm}
#start the respective window managers
case ${windowmgr} in
kde|kwm|kdestart)
WINDOWMANAGER=startkde
;;
fluxbox)
WINDOWMANAGER=fluxbox
;;
fluxbox_main)
WINDOWMANAGER=fluxbox_main
;;
startxfce4)
WINDOWMANAGER=startxfce4
;;

*) WINDOWMANAGER=windowmgr # default for unknown wm's
esac

exec $WINDOWMANAGER


so at command prompt can type:

Code:
startx windowmanager

where windowmanager is your window manager/desktop environment as specified in script..

I found this useful because I use another x-display to watch videos on my TV via Nvidia TV-out and I wanted to start another instance of Fluxbox without having all my normal startup items specified in .xinitrc appearing on second display. so in my case what I did was create a script called fluxbox_main that has this:


Code:

xscreensaver &
gkrellm2 -w &
bbrun &
amsn &
fluxbox


I put this in my /usr/bin directory

so then at command prompt i would just type
Code:
startx fluxbox_main


This gets me into X with fluxbox and all my startup items going.

Once in this session I have a menu item:

Code:
startx fluxbox -- :1 -layout TV vt8


This opens Session for TV viewing without all the startup stuff.

Hope this makes sense.

Triad
_________________
It's not the size of your processor that matters... But how you use it!
Back to top
View user's profile Send private message
OneOfOne
Guru
Guru


Joined: 28 May 2003
Posts: 368
Location: Alexandria, Egypt

PostPosted: Thu Sep 11, 2003 5:16 am    Post subject: Reply with quote

i love it :) 8)
peace
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum