Pass environment variables to .desktop file Exec entry

by Dan Dascalescu   Last Updated August 14, 2019 03:02 AM - source

I want to create a shortcut that executes a program with an environment variable set, for example:

[Desktop Entry]
Version=1.0
Name=Chromium test UTC
Exec=TZ=UTC chromium-browser

The syntax above doesn't work (the shortcut is invalid) and I can't find anything about passing env vars in the spec.

Is that just not possible and I need to create a launcher script?

Ubuntu 18.



Related Questions



Where is XDG_CONFIG_DIRS set?

Updated October 09, 2019 13:02 PM

Different environment variables depending on gui or shell

Updated September 27, 2015 19:01 PM