The silent death of .xprofile in gnome 3.22
Did you upgrade to Wayland already? Noticed breaking stuff everywhere?
One of the silent breaks is .xprofile, Wayland by design doesn't load
the X legacy initialisation scripts ~/.xprofile ~/.xsession ~/.xinitrc
as well as their siblings below /etc/X11.
While I understand the reason to cut away legacy to forward a modern
desktop environment, I'd still like GNOME to care more about helping
end-users to migrate.
How to Migrate Environment Settings
If you want to set desktop global environment variables you need to task your display manager which those as Wayland explicitely refuses to provide a hook. When you use GDM a possible hook is in /usr/share/gdm/env.d/startup_${USER}.shHow to Migrate Application Startup
The only sane way is to migrate to the autostart as defined by the XDG spec which means placing .desktop files in (usually) ~/.config/autostart. To run an arbitrary command use a shell invocation like this[Desktop Entry] Name=My favourite command GenericName=My favourite command Comment=We all like GNOME making life harder Exec=/bin/bash -c "ENVVAR=value my_application -o --param=value something" Terminal=false StartupNotify=true Type=Application Categories=X11;Legacy;StartupThe only relevant line being the 'Exec' entry. Use a shell with -c to pass environment variables or more complex commands.