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



Different environment variables depending on gui or shell

Updated September 27, 2015 19:01 PM



how to create own environmental file?

Updated March 06, 2017 12:02 PM