Index: /trunk/src/VBox/Installer/linux/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Installer/linux/Makefile.kmk	(revision 34521)
+++ /trunk/src/VBox/Installer/linux/Makefile.kmk	(revision 34522)
@@ -75,4 +75,5 @@
 linux-misc_SOURCES = \
 	$(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_32px.png=>VBox.png \
+	$(PATH_ROOT)/src/VBox/Installer/linux/virtualbox.xml \
 	$(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)=>LICENSE) \
 	$(if $(VBOX_WITH_QTGUI),$(PATH_linux-misc)/virtualbox.desktop,)
@@ -87,4 +88,8 @@
 endif
 
+INSTALLS += linux-icons
+linux-icons_INST = bin/icons
+linux-icons_MODE = a+r,u+w
+linux-icons_SOURCES = $(VBOX_MIME_ICONS)
 
 
@@ -160,8 +165,10 @@
  VBOX_LNX_NO_STRIP += \
 	virtualbox.desktop \
+	virtualbox.xml \
 	$(VBOX_LICENSE_FILES) \
  	$(if $(VBOX_WITH_QT4_SUN),$(notdir $(wildcard $(PATH_BIN)/lib*VBox*)),) \
 	$(if $(VBOX_WITH_QT4_SUN),accessible/libqtaccessiblewidgets.so,) \
- 	$(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES),nls/VirtualBox_$(f).qm nls/qt_$(f).qm)
+ 	$(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES),nls/VirtualBox_$(f).qm nls/qt_$(f).qm) \
+	icons
 endif
 
@@ -254,4 +261,10 @@
 	VBoxEFI64.fd
 endif
+
+VBOX_MIME_ICONS = \
+	$(addprefix $(PATH_ROOT)/src/VBox/Resources/other/,\
+	    $(foreach f,ova ovf vbox vbox-extpack, \
+	        $(foreach s,16 20 24 32 48 64 72 96 128 256,\
+		    virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/virtualbox-$(f).png)))
 
 #
Index: /trunk/src/VBox/Installer/linux/install.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/install.sh	(revision 34521)
+++ /trunk/src/VBox/Installer/linux/install.sh	(revision 34522)
@@ -386,4 +386,5 @@
     ln -sf $INSTALLATION_DIR/VBox.png /usr/share/pixmaps/VBox.png
     ln -sf $INSTALLATION_DIR/virtualbox.desktop /usr/share/applications/virtualbox.desktop
+    ln -sf $INSTALLATION_DIR/virtualbox.xml /usr/share/mime/packages/virtualbox.xml
     ln -sf $INSTALLATION_DIR/rdesktop-vrdp /usr/bin/rdesktop-vrdp
     ln -sf $INSTALLATION_DIR/src/vboxhost /usr/src/vboxhost-_VERSION_
@@ -394,4 +395,24 @@
     ln -sf VBoxSDL /usr/bin/vboxsdl > /dev/null 2>&1
     ln -sf VBoxHeadless /usr/bin/vboxheadless > /dev/null 2>&1
+
+    # Icons
+    cur=`pwd`
+    cd $INSTALLATION_DIR/icons
+    for i in *; do
+        cd $i
+        if [ -d /usr/share/icons/hicolor/$i ]; then
+            for j in *; do
+                if [ -d /usr/share/icons/hicolor/$i/mimetypes ]; then
+                    ln -s $INSTALLATION_DIR/icons/$i/$j /usr/share/icons/hicolor/$i/mimetypes/$j
+                    echo /usr/share/icons/hicolor/$i/mimetypes/$j >> $CONFIG_DIR/$CONFIG_FILES
+                fi
+            done
+        fi
+        cd -
+    done
+    cd $cur
+
+    # Update the MIME database
+    update-mime-database /usr/share/mime 2>/dev/null
 
     # If Python is available, install Python bindings
Index: /trunk/src/VBox/Installer/linux/uninstall.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/uninstall.sh	(revision 34521)
+++ /trunk/src/VBox/Installer/linux/uninstall.sh	(revision 34522)
@@ -96,4 +96,5 @@
   /usr/share/pixmaps/VBox.png \
   /usr/share/applications/virtualbox.desktop \
+  /usr/share/mime/packages/virtualbox.xml \
   /usr/bin/rdesktop-vrdp \
   /usr/bin/virtualbox \
@@ -158,2 +159,3 @@
     log "Successfully $INSTALL_VER$INSTALL_REV removed VirtualBox."
 fi
+update-mime-database /usr/share/mime >/dev/null 2>&1
Index: /trunk/src/VBox/Installer/linux/virtualbox.desktop
===================================================================
--- /trunk/src/VBox/Installer/linux/virtualbox.desktop	(revision 34521)
+++ /trunk/src/VBox/Installer/linux/virtualbox.desktop	(revision 34522)
@@ -5,6 +5,7 @@
 GenericName=Virtual Machine
 Type=Application
-Exec=VirtualBox
+Exec=VirtualBox "%U"
 TryExec=VirtualBox
+MimeType=application/x-virtualbox-vbox;application/x-virtualbox-vbox-extpack;application/x-virtualbox-ovf;application/x-virtualbox-ova
 DocPath=file://$VBOX_DOC_PATH/UserManual.pdf
 Icon=VBox
Index: /trunk/src/VBox/Installer/linux/virtualbox.xml
===================================================================
--- /trunk/src/VBox/Installer/linux/virtualbox.xml	(revision 34522)
+++ /trunk/src/VBox/Installer/linux/virtualbox.xml	(revision 34522)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+   <mime-type type="application/x-virtualbox-vbox">
+      <comment>VirtualBox Machine Definition</comment>
+      <comment xml:lang="en">VirtualBox Machine Definition</comment>
+      <glob pattern="*.vbox"/>
+      <icon name="virtualbox-vbox"/>
+   </mime-type> 
+
+   <mime-type type="application/x-virtualbox-vbox-extpack">
+      <comment>VirtualBox Extension Pack</comment>
+      <comment xml:lang="en">VirtualBox Extension Pack</comment>
+      <glob pattern="*.vbox-extpack"/>
+      <icon name="virtualbox-vbox-extpack"/>
+   </mime-type> 
+
+   <mime-type type="application/x-virtualbox-ovf">
+      <comment>Open Virtualization Format</comment>
+      <comment xml:lang="en">Open Virtualization Format</comment>
+      <glob pattern="*.ovf"/>
+      <icon name="virtualbox-ovf"/>
+   </mime-type> 
+
+   <mime-type type="application/x-virtualbox-ova">
+      <comment>Open Virtualization Format Archive</comment>
+      <comment xml:lang="en">Open Virtualization Format Archive</comment>
+      <glob pattern="*.ova"/>
+      <icon name="virtualbox-ova"/>
+   </mime-type> 
+</mime-info>
