<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 2, 2016 at 10:28 AM, Mohan R <span dir="ltr"><<a href="mailto:mohan43u@gmail.com" target="_blank">mohan43u@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I'm working on a display-manager for a multiseat environment. Here is how we use logind</div><div><br></div><div>1. create new seat through udev</div><div>2. we set the XDG_SEAT in pamenv before calling pam_open_session()</div><div>3. we take XDG_SESSION_ID, XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS from pam_systemd</div><div><br></div><div>Let say if a user already have a session(session0) in a seat (customseat0) and he want to start another session in another seat (customseat1). Our display manager would get the same DBUS_SESSION_BUS_ADDRESS from pam_systemd for session1.</div><div><br></div><div>As we cannot use the same address for two sessions, we have to start dbus-session manually. Using the address provided by dbus-session as DBUS_SESSION_BUS_ADDRESS, we then proceed with starting gnome-keyring and gnome-session.</div><div><br></div><div>Problem is, processes forked by 'systemd --user' will have DBUS_SESSION_BUS_ADDRESS="<wbr>unix:path=$XDG_RUNTIME_DIR/<wbr>bus" but processes forked by gnome-session will have DBUS_SESSION_BUS_ADDRESS=$<wbr>DBUS_SESSION_PROVIDED_ADDRESS.</div><div><br></div><div>Is there any way to make pam_systemd provides uniq DBUS_SESSION_BUS_ADDRESS for every session (may be unix:path=$XDG_RUNTIME_DIR/$<wbr>XDG_SESSION_ID/bus)? or is there any way to ask 'systemd --user' to provide different DBUS_SESSION_BUS_ADDRESS to the childs?</div></div></blockquote></div><div class="gmail_extra"><br></div>No, only one graphical session at a time is supported. While you can start additional sessions using `dbus-run-session` or the old `dbus-launch` (and have them run independently, "traditional way"), systemd --user will only ever use the main user bus.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Also, if you made systemd specify different bus envvars for different services, you wouldn't be able to start the same service for *both* sessions at once...</div><div class="gmail_extra"><br></div><div class="gmail_extra">(<i>Technically,</i> I suppose it would be possible to make logind start per-session instances of --user and so on and so on, but as it is nothing like that is supported.)<br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>