A new user interface for you! Read more...

File vbox-permissions_warning.diff of Package virtualbox

Index: VirtualBox-3.2.2_OSE/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- VirtualBox-3.2.2_OSE.orig/src/VBox/Frontends/VirtualBox/Makefile.kmk
+++ VirtualBox-3.2.2_OSE/src/VBox/Frontends/VirtualBox/Makefile.kmk
@@ -48,7 +48,7 @@ endif
 # The targets.
 #
 ifdef VBOX_WITH_HARDENING
-PROGRAMS += VirtualBoxHardened
+PROGRAMS += VirtualBoxHardened VBoxPermissionsMessage
 DLLS += VirtualBox
 else
 PROGRAMS += VirtualBox
@@ -94,6 +94,10 @@ if1of ($(KBUILD_TARGET), freebsd linux n
  VirtualBox_SDKS += LIBSDL
 endif
 
+VBoxPermissionsMessage_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE)
+VBoxPermissionsMessage_NAME = VBoxPermissionMessage
+VBoxPermissionsMessage_DEFS.linux     = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
+
 ifdef VBOX_WITH_ICHAT_THEATER
  # For testing iChat Theater stuff change the sdk path (HACK ALERT!)
  VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
@@ -366,6 +370,9 @@ ifdef VBOX_WITH_REGISTRATION
 	src/wizards/registration/UIRegistrationWzd.cpp
 endif
 
+VBoxPermissionsMessage_SOURCES = \
+	src/VBoxPermissionsMessage.cpp
+
 VirtualBox_SOURCES = \
 	src/main.cpp \
 	src/VBoxAboutDlg.cpp \
@@ -537,6 +544,8 @@ endif
 # (The include directory and lib/framework for each module will be added by the Qt4 unit.)
 VirtualBox_QT_MODULES = Core Gui Network
 
+VBoxPermissionsMessage_QT_MODULES = Core Gui Network
+
 if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
  VirtualBox_QT_MODULES += OpenGL
 endif
@@ -757,6 +766,8 @@ $$(PATH_VirtualBox)/VirtualBox-icon.rc:
 
 endif # win
 
+INSTALLS += VBoxPermissionsMessage
+VBoxPermissionsMessage_INST = $(INST_VIRTUALBOX)
 
 ifeq ($(KBUILD_TARGET),darwin)
 #
Index: VirtualBox-3.2.2_OSE/src/VBox/Frontends/VirtualBox/src/VBoxPermissionsMessage.cpp
===================================================================
--- /dev/null
+++ VirtualBox-3.2.2_OSE/src/VBox/Frontends/VirtualBox/src/VBoxPermissionsMessage.cpp
@@ -0,0 +1,12 @@
+#include <QtGui/QApplication>
+#include <QtGui/QMessageBox>
+int main(int argc, char *argv[])
+{
+        QApplication app(argc, argv);
+        QMessageBox msgBox;
+        msgBox.setWindowTitle(QObject::tr("Permissions problem !"));
+        msgBox.setText(QObject::tr("You are not a member of the \"vboxusers\" group. Please add yourself to this group before starting VirtualBox. You could do it using: Yast / Security and Users / User and Group management. Don't forget re-login your user account!"));
+        int ret = msgBox.exec();
+        app.quit();
+        return 0;
+}
\ No newline at end of file