I have modified a .nix file to build a propritary Qt app, chitubox.
updated: chitubox.nix · GitHub
When I attempt to run it as a normal user it hangs. with the only console output being:
$ ./result/bin/chitubox Could not load the Qt platform plugin "xcb" in "" even though it was found. resource path: "/nix/store/cqh9a4js9wjqbz0qqa9wfc03f09by6sx-chitubox-1.9.5/bin/../chitubox/resource" applicationDirPath(): "/nix/store/cqh9a4js9wjqbz0qqa9wfc03f09by6sx-chitubox-1.9.5/bin" currentPath(): "/home/user" config path: "/home/user/.config/ChiTuBox"
I can run it with sudo. I do get some console errors about config and log files that it expects to be able to read/write to under /root, but the application window opens.
Interestingly I get the normal user behaviour when run with sudio -E.
So it looks like it has something to do with the normal user envirment vs root, but I’m unsure how to track down what needs to be set/uset/changed.