{"action":"closed","issue":{"url":"https://api.github.com/repos/systemd/systemd/issues/232","labels_url":"https://api.github.com/repos/systemd/systemd/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/232/comments","events_url":"https://api.github.com/repos/systemd/systemd/issues/232/events","html_url":"https://github.com/systemd/systemd/issues/232","id":88786151,"number":232,"title":"Trying to run as user instance, but $XDG_RUNTIME_DIR is not set","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},"labels":[{"url":"https://api.github.com/repos/systemd/systemd/labels/login","name":"login","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-06-16T17:14:29Z","updated_at":"2015-06-17T20:47:40Z","closed_at":"2015-06-17T20:47:40Z","body":"I'm working on a semi-embedded distribution which starts a PAM session for a designated user during boot, then instructs that session to start a target that includes Xorg and a GUI. This mostly works fine, but there seems to be a race condition in which the `systemd --user` run by `user@.service` doesn't always pick up its `$XDG_RUNTIME_DIR` correctly:\r\n\r\n```\r\nJun 16 17:02:25 xxx systemd[1]: Starting User Manager for UID 1000...\r\nJun 16 17:02:25 xxx systemd[539]: Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.\r\n```\r\n\r\nIt seems to fail about 1/3 of the time on my virtual machine setup. I've found one possible reason for the race, which does look like a genuine bug, for which I'll send a pull request; but unfortunately, that commit doesn't actually fix it."}}