To make everything even better with no limit of time, should I use C?
You can use C++ but no classes, just functions and use C linkage. For each entity in your program make a separate source file and header fileand compile them into object files. Your headaches go away when you realize you are always calling C on the X windows server and kernel utilities. Also much of the C work has already bin done so reinventing the API is not so hard. The only advantage C++ has in this scenario is better type safety.