{"action":"created","issue":{"url":"https://api.github.com/repos/systemd/systemd/issues/3904","repository_url":"https://api.github.com/repos/systemd/systemd","labels_url":"https://api.github.com/repos/systemd/systemd/issues/3904/labels{/name}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/3904/comments","events_url":"https://api.github.com/repos/systemd/systemd/issues/3904/events","html_url":"https://github.com/systemd/systemd/pull/3904","id":169621806,"number":3904,"title":"Environment.d","user":{"login":"halfline","id":15030,"avatar_url":"https://avatars.githubusercontent.com/u/15030?v=3","gravatar_id":"","url":"https://api.github.com/users/halfline","html_url":"https://github.com/halfline","followers_url":"https://api.github.com/users/halfline/followers","following_url":"https://api.github.com/users/halfline/following{/other_user}","gists_url":"https://api.github.com/users/halfline/gists{/gist_id}","starred_url":"https://api.github.com/users/halfline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halfline/subscriptions","organizations_url":"https://api.github.com/users/halfline/orgs","repos_url":"https://api.github.com/users/halfline/repos","events_url":"https://api.github.com/users/halfline/events{/privacy}","received_events_url":"https://api.github.com/users/halfline/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/systemd/systemd/labels/pid1","name":"pid1","color":"c7def8"},{"url":"https://api.github.com/repos/systemd/systemd/labels/units","name":"units","color":"d4c5f9"},{"url":"https://api.github.com/repos/systemd/systemd/labels/user-session","name":"user-session","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":36,"created_at":"2016-08-05T14:37:31Z","updated_at":"2016-08-09T18:51:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/systemd/systemd/pulls/3904","html_url":"https://github.com/systemd/systemd/pull/3904","diff_url":"https://github.com/systemd/systemd/pull/3904.diff","patch_url":"https://github.com/systemd/systemd/pull/3904.patch"},"body":"Provide means to handle user environment configuration\r\n\r\nAt the moment there's no good answer for users who want to set\r\nenvironment variables for their session.  Users have in the past used\r\ntheir .bashrc or .bash_profile to accomplish this task, but sourcing\r\na tower of shell scripts at login time is suboptimal, so wayland\r\nsessions aren't run through a login shell.\r\n\r\nSome distributions use pam_env, but the way it's set up from distro to\r\ndistro varies, and its file format is strange.\r\n\r\nSee https://bugzilla.gnome.org/show_bug.cgi?id=736660\r\n\r\nFurthermore, services themselves may want to affect the user session\r\nenvironment. flatpak, for instance, needs to modify XDG_DATA_DIRS to\r\nwork correctly. There's no good way to achieve this at the moment.\r\n\r\nSee https://github.com/alexlarsson/xdg-app/issues/147\r\n\r\nThis patchset tries to solve the problem in systemd by:\r\n\r\n1. Augmenting the DefaultEnvironment option of user.conf to have a new\r\nDefaultEnvironmentFile next to it.  It follows the same format as\r\nEnvironmentFile inside service files.\r\n\r\n2. Augmenting user.conf to support certain specifiers.  This is needed\r\nto allow %h (the home dir) to be referenced from user.conf\r\n\r\n3. Augmenting EnvironmentFile (and DefaultEnvironmentFile) to support\r\nenvironment variable expansion using the ${VAR} format. This is\r\nhandled in a backward compatible way by requiring the glob pattern to\r\nbe prefixed with a special character (':').\r\n\r\n4. For symmetry, augmenting Environment (and DefaultEnvironment) to\r\nsupport environment variable expansion if a ':' prefix is provided.\r\n\r\n5. Shipping a default user.conf.d snippet that configures user sessions\r\nto read environment variables from:\r\n\r\n  /etc/environment        (to take over from pam_env)\r\n  ~/.config/environment.d (to give the user a place to put additions)\r\n  /usr/lib/environment.d  (to give services a place to put additions)\r\n\r\n6. Changing pam_systemd to import the systemd --user environment into\r\nsessions as they get opened.\r\n"},"comment":{"url":"https://api.github.com/repos/systemd/systemd/issues/comments/238653227","html_url":"https://github.com/systemd/systemd/pull/3904#issuecomment-238653227","issue_url":"https://api.github.com/repos/systemd/systemd/issues/3904","id":238653227,"user":{"login":"smcv","id":1561141,"avatar_url":"https://avatars.githubusercontent.com/u/1561141?v=3","gravatar_id":"","url":"https://api.github.com/users/smcv","html_url":"https://github.com/smcv","followers_url":"https://api.github.com/users/smcv/followers","following_url":"https://api.github.com/users/smcv/following{/other_user}","gists_url":"https://api.github.com/users/smcv/gists{/gist_id}","starred_url":"https://api.github.com/users/smcv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smcv/subscriptions","organizations_url":"https://api.github.com/users/smcv/orgs","repos_url":"https://api.github.com/users/smcv/repos","events_url":"https://api.github.com/users/smcv/events{/privacy}","received_events_url":"https://api.github.com/users/smcv/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T18:51:14Z","updated_at":"2016-08-09T18:51:14Z","body":"> probably by shipping an .env file in the xdg-user-dirs package\r\n\r\nThis is not actually what `xdg-user-dirs` does - it's a user of the basedir spec, not part of its implementation. `xdg-user-dirs` is responsible for setting up localized values for the XDG \"special desktop directories\" like `~/Downloads`, `~/Music` and so on. You can't rely on it being part of a system unless something explicitly depends on it, and it only does anything useful at all if users in non-English locales want to have their locale's localized directories like `~/Musique`."}}
{"actor":{"display_login":"smcv"}}