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

Re: Question about ~/.xsession



Jaque Moreau <mr.wimpy@firemail.de> writes:

> According to the Debian reference Debian uses both ~/.xsession and
> ~/.xinitrc for setting up an X-environment.
>
> I use wdm as display manager and need a personal PATH.
>
> If I set it up in ~/.xsession it works as desired but if I now login on
> a terminal and start a separate X-Server my ~/.bash_profile is executed
> what is right and also the ~/.xsession is executed.

One way to do it is to set a magic environment variable when you do
your initialization, and only do it if it's unset.  In {a,ba,k,z,}sh,
this would look sort of like this:

  if test -z "$MY_SETUP"; then
    MY_SETUP=done
    PATH=$PATH:$HOME/bin
  fi

> I want ~/.xinitrc (and only ~/.xinitrc) to be executed if I use a
> display manager and ~/.xsession only to be executed if I use startx.

So my understanding of how those files are typically used is that
xinit (and hence startx) uses .xinitrc, and display managers use
.xsession.  So you might be fine if you swapped those filenames, and
were careful about what ran what.

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: