diff options
-rw-r--r-- | gui/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/main.cpp b/gui/main.cpp index 1efa332..a172766 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -1,4 +1,5 @@ #include <csignal> +#include <unistd.h> #include <QApplication> #include <QTimer> #include <QTranslator> @@ -146,6 +147,11 @@ int main(int argc, char **argv) { exit(0); } + if (getuid() == 0) { + qDebug() << "Please don't run as root. Aborting."; + exit(0); + } + if (!QSystemTrayIcon::isSystemTrayAvailable()) { qDebug() << "No systray icon available."; availableSystray = false; |