Custom scripts (start/end scripts) doesn't have `DISPLAY` set
Describe the bug
While adding custom scripts, user have to enter DISPLAY variable manually:
start=sh -c "if (wmctrl -m|grep xfwm4);then xfconf-query -c xfwm4 -p /general/use_compositing -s false;else echo 'not xfce'>/dev/shm/test.txt;fi" Will not work since wmctrl needs DISPLAY variable to work.
start=sh -c "if (DISPLAY=:0 wmctrl -m|grep xfwm4);then xfconf-query -c xfwm4 -p /general/use_compositing -s false;else echo 'not xfce'>/dev/shm/test.txt;fi" Does work because DISPLAY has set manually. However if there are multiple sessions with different desktop environments this will not work since script only checks for the desktop environment on tty1.
Expected behavior At Least this behaviour to be documented. I have come across https://github.com/FeralInteractive/gamemode/issues/45 and https://github.com/FeralInteractive/gamemode/issues/7 but since there wasn't a documentation, i had to find this manually.
System Info (please complete the following information):
- OS and version: Pop!_OS 19.10
- GameMode Version
v1.5-dev
Additional context Add any other context about the problem here.