diff -up gnome-shell/js/misc/gnomeSession.js.orig gnome-shell/js/misc/gnomeSession.js
--- gnome-shell/js/misc/gnomeSession.js.orig	2012-05-16 22:55:45.000000000 +0200
+++ gnome-shell/js/misc/gnomeSession.js	2012-06-20 12:50:48.560983298 +0200
@@ -53,6 +53,10 @@ const SessionManagerIface = <interface n
 <method name="CanShutdown">
     <arg type="b" direction="out" />
 </method>
+<method name="IsInhibited">
+    <arg type="u" direction="in" />
+    <arg type="b" direction="out" />
+</method>
 </interface>;
 
 var SessionManagerProxy = Gio.DBusProxy.makeProxyWrapper(SessionManagerIface);
diff -up gnome-shell/js/ui/automountManager.js.orig gnome-shell/js/ui/automountManager.js
--- gnome-shell/js/ui/automountManager.js.orig	2012-06-19 10:58:36.649664445 +0200
+++ gnome-shell/js/ui/automountManager.js	2012-06-22 08:52:28.237425875 +0200
@@ -10,6 +10,9 @@ const Shell = imports.gi.Shell;
 const Main = imports.ui.main;
 const ShellMountOperation = imports.ui.shellMountOperation;
 const ScreenSaver = imports.misc.screenSaver;
+const GnomeSession = imports.misc.gnomeSession;
+
+const GNOME_SESSION_AUTOMOUNT_INHIBIT = 16;
 
 // GSettings keys
 const SETTINGS_SCHEMA = 'org.gnome.desktop.media-handling';
@@ -79,6 +82,7 @@ const AutomountManager = new Lang.Class(
     _init: function() {
         this._settings = new Gio.Settings({ schema: SETTINGS_SCHEMA });
         this._volumeQueue = [];
+        this._session = new GnomeSession.SessionManager();
 
         if (!haveSystemd())
             this.ckListener = new ConsoleKitManager();
@@ -217,6 +221,9 @@ const AutomountManager = new Lang.Class(
             }
         }
 
+        if (this._session.IsInhibitedSync(GNOME_SESSION_AUTOMOUNT_INHIBIT) == 'true')
+            return;
+
         // Volume is already mounted, don't bother.
         if (volume.get_mount())
             return;
