How do you change those? This is something I remember trying to look up some time ago (to set PATH also for the Alt+F2 'run command' dialog in Cinnamon) but I didn't find it.
I think you misunderstood my question. Indeed with `DISPLAY=:0 glxgears` I can run something on my screen from a different virtual terminal (perhaps even an ssh session), but what I mean is that my desktop environment takes the PATH environment variable from somewhere and I don't know where. When I run 'josm' in the Alt+F2 dialog, it can't find the command, even though in my bashrc I configured my PATH to include ~/bin/.
Environment variables are defined in multiple files. most desktop environments launch in a systemd user session, so one option is to use that[0]. Then are .xsession, scripts specific to the DE, /etc/environment and a bunch of other stuff I am forgetting.
A TTY like you get in your "ALT+F2" is a new login/session shell and uses .bash_profile rather than .bashrc (which is invoked when you create a new bash process in an already existing login session like when you open a terminal window). There are lots of moving pieces, but I've found the easiest way to get the same behavior in both is to have my .bash_profile source my .bashrc.