On 12/9/05, Felix Breuer <[EMAIL PROTECTED]> wrote:

Entrance executes a login shell to start a session? That is interesting.
I did a quick grep and could not find the relevant part of the code, could
you point me to it?

Sure, take a look in entrance/src/client/entrance_session.c at the function  entrance_session_start_user_session. It uses execl and eventually calls the users specified shell with the arguments -l -c <sessioncommand>. The -l argument specifies a login shell for bash, but some other shells will ignore that if any other arguments are specified.

Now the problem is the following. After I start a session in entrance,
some environment variables that are important to the system, such as
PYTHONPATH, are not set. These variables are set in the init script and
later cleared by Entrance. Entrance does not run an Xsession script (there
is none on my distro) but starts E17 directly. Entrance does not run a
login shell in that case, right?

It does, it executes a login shell with the command for the session passed as an argument, that's the -c above.

On my system, a login shell reads /etc/profile which sources
/etc/environment in which all these variables are exported. So
a login shell knows about those variables even though it clears them
first, the same way Entrance does.

What I would like to know is the following:

* What is the standard way for a login manager to read/set the environment for
  a session? Are login managers supposed to go through an Xsession script?

* If so, why does Entrance offer the option to run an executable directly?

* What would be a good way to allow system administrators to customize
  the standard environment for all the sessions that Entrance launches
  directly, i.e. not through an Xsession script?

atmos had written a small utility to edit the configuration settings including the sessions. I don't know where this ended up, might be the entrance_edit.c in CVS.
 


Reply via email to