smaller fix for RPi compiling issue with XInitThreads
smaller fix for RPi not being able to compile with XInitThreads
permissions fix
remove RPi ifdefs