Convention for user-provided environment


#1

Could we agree on a convention for snaps to pick up user-provided environment snippets? Something like sourcing $SNAP_USER_DATA/.env, say?

Does this make sense?


#2

Maybe, do you have some use cases?


#3

The use case is to allowing passing custom env variables to snap without need to do it every time on cmdline or without editing desktop file for gui apps which may get out-of-sync with app updates.


#4

How do you do this for non-snapped applications? Why can you not do it that way with your snapped applications?


#5

For non-snapped applications I do the same as for snap however snap alternatives like flatpak or firejail have dedicated options for passing env variables to apps. Snap is currently behind those in that case.