1

How can I correctly set the following environment variables in a .desktop launcher file?

To fix a problem with Davinci Resolve Studio it is necessary for my setup to set these two environment variables:

__NV_PRIME_RENDER_OFFLOAD=1 
__GLX_VENDOR_LIBRARY_NAME=nvidia 

Via the terminal I can launch Davinci Resolve Studio now with the following line successfully:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia /opt/resolve/bin/resolve

And I try to note these in the .desktop launcher like the following with no effect (see line 8, "Exec=..."). What do I have to alter in this .desktop file to get this working? I tried with and without the "env" command at the beginning so far.

[Desktop Entry]
Version=1.0
Type=Application
Name=DaVinci Resolve
GenericName=DaVinci Resolve
Comment=Revolutionary new tools for editing, visual effects, color correction, and professional audio post-production, all in a single application!
Path=/opt/resolve/
Exec=env __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia /opt/resolve/bin/resolve %u
Terminal=false
MimeType=application/x-resolveproj;
Icon=/opt/resolve/graphics/DV_Resolve.png
StartupNotify=true
Name[en_US]=DaVinci Resolve

The parameters are exemplary here. I wonder what is missing here to get this working via a launcher.

Fuchsi
  • 21

1 Answers1

1

As suggested by @vanadium I just had to move this .desktop file to ~/.local/share/applications.

See also this post for more information: How can I create launchers on my desktop?

Fuchsi
  • 21