I don't run Ubuntu so I wouldn't know, but the other sandbox system I know, Docker, has its own syntax to set environment variables. It's worth having a look at the man pages.
DISPLAY="$DISPLAY" gimp
This is a no-op. It sets DISPLAY in the current env with the value of DISPLAY in the current env. Processes spawned from the shell already inherit the current environment (unless they're running in a separate namespace, of course)