[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xinitrc vs. xsession (was Re: Window Managers)



On Thu, 3 Jul 1997, Gary L. Dolan wrote:

> I hate to think that my version of 1.2 (now 1.3) is idiosyncratic, but the
> global xsession and the global xinitrc files are identical. I have attempted
> in my own halting way to parse my way thru the file(s), and the result 
> appears to me to be that some resource files do not get read. I would be
> pleased if someone would correct my impression if I am wrong.

I don't exactly know what you are asking. First, I knew the files had the
same functionality, but I never looked to see if they are the same. I have
two completely separate things to say about this so I will separate them
as I think one may be a bug:

Given they have the same functionality, they both basically define and
source a couple of system files (Xresources and Xmodmap) and then source
individual user files (.Xmodmap and .Xsession). They then go onto do some
other stuff and then they source a users startup file (.xsession). If that
file exists, the rest of the global file does not get sourced, rather the
user file is used in its place. This is all done within the last unnested
if statement which is
------------
if [ -x $startup ] && grep -q ^allow-user-xsession /etc/X11/config
then
  exec $startup
else
  xterm -ls &
  if [ -e /etc/X11/window-managers ]
  then
    for i in `sed 's/#.*//' /etc/X11/window-managers`
    do
      if [ -x $i ]
      then
        exec $i
      fi
    done
  fi
  if [ -x /usr/X11R6/bin/fvwm ]
  then
    exec fvwm
  fi
  exec twm
fi  
--------------

So if $startup exists, then that file is read rather than the rest of the
above. So if you want to run different window manager rather than the
default one listed in /etc/X11/window-managers, then take this above piece
without the if statement regarding /etc/X11/window-managers and put it in
.xsession with your window manager of choice. For instance, if I always
wanted to run kdm, my .xsession could look as simple as
--------------
#!/bin/sh

exec kdm
--------------

I actually always run fvwm2 and I have a few customizations in my
.xsession which is
--------------
#!/bin/sh

source /etc/profile
source ~/.bash_profile

if [ -x /usr/lib/plan/pland ] ; then
  exec /usr/lib/plan/pland -k &
fi

exec fvwm2
-------------

I hope I am getting my point across.


My second point is (possibly a bug). Shouldn't /etc/Xsession have $startup
defined as .xsession and /etc/X11/xinit/xinitrc have $startup defined as
.xinitrc? At the moment, both files have $startup defined as .xsession. Is
this a bug?

Cheers.

--
	  Colin R. Telmer, Institute of Intergovernmental Relations
		School of Policy Studies, Queen's University
		     Kingston, Ontario, Canada, K7L-3N6
	      (613)545-6000x4219   telmerco@qed.econ.queensu.ca
	   PGP Public Key at <URL:http://terrapin.econ.queensu.ca>



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: