Swordfish90 / cool-retro-term

A good looking terminal emulator which mimics the old cathode display...
22.12k stars 842 forks source link

CRT clears the QT_QPA_PLATFORMTHEME environment variable for child processes #852

Open Botspot opened 1 month ago

Botspot commented 1 month ago

I tried running some QT5 apps from CRT and noticed that they were not using their usual dark mode. It turns out that CRT has cleared this variable. Why is that, and can it be fixed?

I found this by comparing the differences from running env in Cool Retro Term versus LXTerminal. Normally, QT_QPA_PLATFORMTHEME=qt5ct.

OS information: Raspberry Pi OS Bookworm 64-bit, CRT was installed using Pi-Apps.

Botspot commented 1 month ago

It seems that the variable is cleared deliberately. https://github.com/Swordfish90/cool-retro-term/blob/f157648d1e51878a10e02a8836c1e15aa8c59cc9/app/main.cpp#L36

As an easy fix, could the variable's original value be captured, and then passed to child processes that are launched by the shell?