[wishlist] allow setting per-snap environment variables

Bug #1864240 reported by Simon Déziel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

tl;dr: it would be nice to be able to set environment variable on a per-snap basis.

I ran into this need when trying to workaround a chrome/chromium bug [1] where one needs to export MESA_GLSL_CACHE_DISABLE=true when starting the browser to have the GPU sandbox working. It's doable this way:

  MESA_GLSL_CACHE_DISABLE=true chromium

but is not convenient since more often than not, chromium is started by clicking the icon. Editing the .desktop file would surely work too but is not very user friendly. I'm also not sure if the .desktop file is not refreshed along with the snap.

Additional information:

$ lsb_release -rd
Description: Ubuntu 18.04.4 LTS
Release: 18.04

$ apt-cache policy snapd
snapd:
  Installed: 2.42.1+18.04
  Candidate: 2.42.1+18.04
  Version table:
 *** 2.42.1+18.04 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.37.4+18.04.1 500
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     2.32.5+18.04 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages

1: https://bugs.chromium.org/p/chromium/issues/detail?id=264818

Changed in snapd (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.