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

Bug#752192: marked as done (Need to source shell profile startup files into X environment)



Your message dated Sun, 22 Jun 2014 01:23:26 +0200
with message-id <20140621232326.GI28640@betterave.cristau.org>
and subject line Re: Bug#752192: Need to source shell profile startup files into X environment
has caused the Debian Bug report #752192,
regarding Need to source shell profile startup files into X environment
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
752192: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752192
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: x11-common
Version: 1:7.7+7
Severity: important

Currently, if you install LightDM+Xfce on Debian testing, log in to the
GUI, and open a shell in a terminal emulator, the shell will not have
any of the initializations from /etc/profile nor ~/.profile. One
noticeable effect is that if you have a ~/bin directory, it is not added
to your PATH (whereas this occurs due to the default ~/.profile when you
log in non-graphically).

In the past, the X display manager's startup scripts would source
/etc/profile and ~/.profile (possibly also /etc/xprofile and
~/.xprofile) so that the X session environment would have these
initializations, and then when the user opens a (non-login) shell in a
terminal emulator, everything's already there. On Ubuntu, LightDM does
exactly this in /usr/sbin/lightdm-session, line 23.

The maintainer of the lightdm package in Debian, however, has clearly
rejected this approach:

    https://bugs.debian.org/752129

The ~/.xsessionrc file may provide an answer to this, but this file is
not present unless the user creates it. Given that ~/.profile et al. are
already used out-of-the-box as a matter of standard practice, the
current behavior of Debian's X session is at least inconsistent (with
Debian itself as well as other distributions), and in terms of users'
expectations is assuredly a bug.

Since making LightDM do this is unlikely, one possible solution is to
create a new /etc/X11/Xsession.d/ script that sources ~/.profile et al.
into the X environment. If I recall correctly, an old version of gdm did
exactly this.

Another possible solution is to add a new /etc/skel/.xsessionrc file,
whose default incarnation does the profile sourcing. New users get
this file, and with it the expected profile-initialization behavior.
If they want to tweak the behavior, they can edit their copy to their
heart's content.

Here is the relevant excerpt from Ubuntu's /usr/sbin/lightdm-session
script. Somehow, somewhere, we need to do something similar:

    for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
        if [ -f "$file" ]; then
            echo "Loading profile from $file";
            . "$file"
        fi
    done

--- End Message ---
--- Begin Message ---
On Fri, Jun 20, 2014 at 17:27:17 -0400, Daniel Richard G. wrote:

> Package: x11-common
> Version: 1:7.7+7
> Severity: important
> 
> Currently, if you install LightDM+Xfce on Debian testing, log in to the
> GUI, and open a shell in a terminal emulator, the shell will not have
> any of the initializations from /etc/profile nor ~/.profile. One
> noticeable effect is that if you have a ~/bin directory, it is not added
> to your PATH (whereas this occurs due to the default ~/.profile when you
> log in non-graphically).
> 
> In the past, the X display manager's startup scripts would source
> /etc/profile and ~/.profile (possibly also /etc/xprofile and
> ~/.xprofile) so that the X session environment would have these
> initializations, and then when the user opens a (non-login) shell in a
> terminal emulator, everything's already there. On Ubuntu, LightDM does
> exactly this in /usr/sbin/lightdm-session, line 23.
> 
> The maintainer of the lightdm package in Debian, however, has clearly
> rejected this approach:
> 
>     https://bugs.debian.org/752129
> 
> The ~/.xsessionrc file may provide an answer to this, but this file is
> not present unless the user creates it. Given that ~/.profile et al. are
> already used out-of-the-box as a matter of standard practice, the
> current behavior of Debian's X session is at least inconsistent (with
> Debian itself as well as other distributions), and in terms of users'
> expectations is assuredly a bug.
> 
> Since making LightDM do this is unlikely, one possible solution is to
> create a new /etc/X11/Xsession.d/ script that sources ~/.profile et al.
> into the X environment. If I recall correctly, an old version of gdm did
> exactly this.
> 
I don't think that would be appropriate, the Xsession scripts are not
about login, the user may be starting X from a VT, or starting a nested
server, or...  So I'm not convinced any such sourcing should happen, but
in any case if it does it would be the display manager's job.

Cheers,
Julien

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: