I am trying to read a system variable that is XDG_CURRENT_DESKTOP from a shell script.
echo the variable in terminal works fine. but when running it within a bash script it echoes empty due to that the script runs from an child shell
I cannot export it, I don't know the source of the varible. is there any way to import a system variable without messing with bashrc?
/Pierre