Bug 218146 - x11/lightdm: screws up envvars
Summary: x11/lightdm: screws up envvars
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ben Woods
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-26 18:32 UTC by John Smith
Modified: 2018-08-21 21:59 UTC (History)
2 users (show)

See Also:
woodsb02: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Smith 2017-03-26 18:32:54 UTC
Lightdm screws up environmental variables for any user logged in through it.

It cuts down $PATH for user to /usr/local/bin:/usr/bin:/bin, cutting away such paths as /sbin:/usr/sbin:/usr/local/sbin:/home/user/bin.

It even screws up envvars set by /etc/login.conf! As a consequence - it screws up localization configured via /etc/login.conf

This can not be justified by "sbin's are for superusers", because they are not.

FreeBSD: 11.0-RELEASE-p8
lightdm: 1.20.0_4, compiled from ports using synth (because it fails to compile using portmaster).
Comment 1 Walter Schwarzenfeld freebsd_triage 2017-04-03 09:52:42 UTC
The build with portmaster is fixed with
https://svnweb.freebsd.org/ports/head/x11/lightdm/Makefile?r1=437590&r2=437589&pathrev=437590
Comment 2 Ben Woods freebsd_committer freebsd_triage 2017-04-03 12:28:35 UTC
It does not appear to be a FreeBSD specific issue that LightDM does not set environment variable as per a normal shell login.

Debian Linux: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752129
CrunchBang Linux: http://crunchbang.org/forums/viewtopic.php?id=39437
Gentoo Linux: https://forums.gentoo.org/viewtopic-t-892052-start-0.html

According to this post on the lightdm mailing list, the normal environment variables are supposed to be brought in via the pam_env module, which does not exist on FreeBSD and is therefore commented out by patches in the FreeBSD port.
https://lists.freedesktop.org/archives/lightdm/2016-February/000934.html

As an alternative, you can apparently use $HOME/.xsessionrc, but I would prefer that it automatically brought in environment variables to normal FreeBSD way.
Comment 3 John Smith 2017-04-04 16:13:05 UTC
(In reply to Ben Woods from comment #2)
Oh, so it's just a DM of poo quality, got it.
Feel free to do whatever with this issue.