Re: xinitrc follies

"Russell Evans" <[email protected]>
Newsgroups gmane.org.user-groups.linux.pdxlug
Message-ID <20040511000421.0b58e054@downtown>
On Mon, 10 May 2004 13:43:21 -0400
"Jonathan Daugherty" <[email protected]> wrote:

> # I'm trying to configure .xinitrc so I can choose which window
> # manager to use on a whim, and of course there must be a
> # default. Here is my current version:
> 
> If putting it in .xinitrc doesn't work (and I don't know of a way to
> have startx pass args to .xinitrc), then instead, move your .xinitrc
> to a script -- say ~/bin/startx -- which you run, like
> 
> foo@bar:~$ startx wmaker
> 
> where ~/bin comes before /usr/bin/X11 in your PATH.  Your ~/bin/startx
> might either create ~/.xinitrc using a stub config or call startx with
> some voodoo which has not yet been identified.


My favorite way to play with window managers is to use Xnest.

#!/bin/sh

if [ ! $@ ] ; then
  echo usage $0 [ -w -d ]
  echo "-w Window_Manager" 
  echo "-d Display"
  echo "$0 -w /usr/local/bin/pwm -d 1" 
  exit 1
fi

for ARG in $@ ; do
 case "$ARG" in
    -w) shift ; WM="$1" ; shift;;
    -d) shift ; DP="$1" ; shift;;
  esac
done

Xnest :$DP -name $WM -kb -ac -br &
#exec xsetroot -display :$DP -solid blue &
export DISPLAY=:$DP
exec $WM
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.