How to initialize environment variables on Wayland and elogind
Mark Hindley
mark at hindley.org.uk
Mon Feb 4 09:44:51 GMT 2019
On Sun, Feb 03, 2019 at 08:25:48PM +0900, YOSHINO Yoshihito wrote:
> Hi,
>
> I am looking for a way to initialize environment variables on Wayland
> and elogind,
> like GTK_IM_MODULE for an input method system.
>
> Xorg session sources shell scripts through /etc/X11/Xsession.d/ .
> Wayland itself does not use any such files, so the variables are not set at all.
>
> Since GNOME Wayland + gdm3 + systemd-logind is the default desktop in Buster,
> I am first sruggling with the combination.
> systemd-logind >= 233 seems to run any program found in
> /usr/lib/systemd/user-environment-generators/, which echoes ENVKEY=VAL to stdout
> that the program wants to define to the activation environment of a
> new systemd ---user
> session, and gdm3 import variables in the activation environment to
> the environment
> of the new desktop session. I am currently considering the use of the
> user-environment-generators, like done in some variables of gnupg2 (#855868).
>
> elogind does not seem to (and will probably not) have
> user-environment-generators.
No, and elogind doesn't provide systemd --user. Therefore gdm3 will not work
with elogind. I have tried both lightdm and slim and both work well with elogind.
Although I have not tried it, I *think* elogind's upstream uses Wayland (with
SDDM).
> Any suggestions?
I would definitely change from gdm3 to something that works with elogind.
Does it work to set your enviroment variables in ~/.pam_environment? See
pam_env(8).
Mark
More information about the Debian-init-diversity
mailing list