trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: July 2012

Re: [trinity-devel] [Patch] Re: [trinity-devel] tdm login screen - gentdmconf, need to check existence of /etc/X11/Xsession before sourcing

From: "E. Liddell" <ejlddll@...>
Date: Fri, 20 Jul 2012 17:00:39 -0400
On Fri, 20 Jul 2012 12:03:07 -0500
"David C. Rankin" <drankinatty@...> wrote:

> On 07/20/2012 11:33 AM, Francois Andriot wrote:
> > Hello, under RHEL/Fedora, the Xsession file exists but is located elsewhere.
> > Can we please add the same kind of check, e.g:
> >
> > [[ -r /etc/X11/xinit/Xsession ]] && . /etc/X11/xinit/Xsession
> >
> > So that I wouldn't need to patch again when packaging.
> >
> > Thanks
> > Francois
> 
> Sure,
> 
>    Anybody else have any other locations?? It is a simple matter to just go 
> down a list of sequential checks:
> 
> [[ -r /etc/X11/Xsession ]] && . /etc/X11/Xsession
> [[ -r /etc/X11/xinit/Xsession ]] && . /etc/X11/xinit/Xsession
> ...
> 
>    If there is a huge number, we can just throw it into an array to save space:
> 
> declare -a xSloc
> xSloc=( '/etc/X11' '/etc/X11/xinit' '/etc/X11/whereever' )
> 
> for l in ${xSloc[@]}; do
>    [[ -r ${l}/Xsession ]] && . ${l}/Xsession
> done
> 
>    Once we get a list, I'll do another patch and Darrell or Tim can push.

My system appears to have /etc/X11/Sessions/Xsession rather than
either of the other two.