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: "David C. Rankin" <drankinatty@...>
Date: Fri, 20 Jul 2012 12:03:07 -0500
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


   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

   Once we get a list, I'll do another patch and Darrell or Tim can push.

David C. Rankin, J.D.,P.E.