I'm working on a GUI application in QT ( on UbUntu), and I am not sure how I can ensure that only one copy of my application is running at any given time on the machine. Due to the nature of the application, running more than once doesn't make any sense, and will fail quickly. How to use QMutex and semaphore in the main.cpp to do tht . If somebody could suggest the right code ...Thnx