emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] iCal export - possible timezone bug


From: Nick Dokos
Subject: Re: [Orgmode] iCal export - possible timezone bug
Date: Fri, 08 May 2009 17:15:10 -0400

Nick Dokos <address@hidden> wrote:

> The question is: is there a personal file that can be used for this purpose,
> no matter *how* one starts his or her desktop environment?  I suspect that
> the answer is "no", but there might be a best practice: one or two or perhaps 
> a
> handful of possibilities for different methods of desktop initialization.
> 

Assuming that /etc/X11/Xsession is actually more general than just Ubuntu,
then there does seem to be a single place where things like environment variable
definitions can be picked up: ~/.xsessionrc.

First, at the top of /etc/X11/Xsession it says:

# global Xsession file -- used by display managers and xinit (startx)

[ But, forewarned is forearmed - the man page for Xsession (worth
reading in its entirety for all the caveats) says:

       /etc/X11/Xsession is a Bourne shell (sh(1)) script which is run
       when an X Window System ses‐ sion is begun by startx(1x) or a
       display manager such as xdm(1x).  (Some display managers only
       invoke Xsession when specifically directed to so by the user; see
       the documentation for your display manager to find out more.)

]

Second, it defines (among other things)

SYSSESSIONDIR=/etc/X11/Xsession.d
USERXSESSION=$HOME/.xsession
USERXSESSIONRC=$HOME/.xsessionrc

Third, it sources all the files in $SYSSESSIONDIR:

SESSIONFILES=$(run-parts --list $SYSSESSIONDIR)
if [ -n "$SESSIONFILES" ]; then
  set +e
  for SESSIONFILE in $SESSIONFILES; do
    . $SESSIONFILE
  done
  set -e
fi

Fourth, one of the files in /etc/X11/Xsession.d is  40x11-common_xsessionrc
which reads in its entirety:

# This file is sourced by Xsession(5), not executed.

#Source user defined xsessionrc (locales and other environment variables)
if [ -r "$USERXSESSIONRC" ]; then
  . "$USERXSESSIONRC"
fi

So it seems that ~/.xsessionrc is sourced very early in the desktop
initialization and might serve as a universal provider of e.g. environment
variables.

Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]