diff --git a/src/common/gajim.py b/src/common/gajim.py
index 6a01fdaa5a5287649adc4629778031d0a0991479..ef2bdede5b0d965f7898f85ffb66b984ac7e3665 100644
--- a/src/common/gajim.py
+++ b/src/common/gajim.py
@@ -52,18 +52,22 @@ if os.name == 'nt':
 		# Documents and Settings\[User Name]\Application Data\Gajim
 		LOGPATH = os.path.join(os.environ['appdata'], 'Gajim', 'Logs') # deprecated
 		VCARDPATH = os.path.join(os.environ['appdata'], 'Gajim', 'Vcards')
+		TMP = os.path.join(os.environ['tmp'], 'Gajim')
 	except KeyError:
 		# win9x, in cwd
 		LOGPATH = 'Logs' # deprecated
 		VCARDPATH = 'Vcards'
+		TMP = 'temporary files'
 else: # Unices
 	DATA_DIR = '../data'
 	LOGPATH = os.path.expanduser('~/.gajim/logs') # deprecated
 	VCARDPATH = os.path.expanduser('~/.gajim/vcards')
+	TMP = '/tmp'
 
 try:
 	LOGPATH = LOGPATH.decode(sys.getfilesystemencoding())
 	VCARDPATH = VCARDPATH.decode(sys.getfilesystemencoding())
+	TMP = TMP.decode(sys.getfilesystemencoding())
 except:
 	pass
 
diff --git a/src/gajim.py b/src/gajim.py
index c1512f3118f852005a8fce132d79abb9401cca86..60e1c5421b4efddb66de68bfcd90f3ae241044f7 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -356,10 +356,27 @@ class Interface:
 					# check OUR status and if we allow notifications for that status
 					if gajim.config.get('autopopupaway'): # always notify
 						show_notification = True
-					elif gajim.connections[account].connected in (2, 3): # we're online or chat
+					elif gajim.connections[account].connected in (2, 3):
+						# we're online or chat
 						show_notification = True
 					if show_notification:
-						notify.notify(_('Contact Signed In'), jid, account)
+						avatar_pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(
+							jid)
+						if avatar_pixbuf is None:
+							path_to_file = None
+						else:
+							avatar_pixbuf = gtkgui_helpers.get_scaled_pixbuf(
+								avatar_pixbuf, 'roster')
+							path_to_file = os.path.join(gajim.TMP, jid + '.png')
+							if not os.path.exists(path_to_file):
+								try:
+									avatar_pixbuf.save(path_to_file, 'png')
+								except gobject.GError, e:
+									path_to_file = None
+
+						notify.notify(_('Contact Signed In'), jid, account,
+							path_to_image = path_to_file)
+
 				if self.remote_ctrl:
 					self.remote_ctrl.raise_signal('ContactPresence',
 						(account, array))
@@ -378,7 +395,24 @@ class Interface:
 					elif gajim.connections[account].connected in (2, 3): # we're online or chat
 						show_notification = True
 					if show_notification:
-						notify.notify(_('Contact Signed Out'), jid, account)
+						avatar_pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(
+							jid)
+						if avatar_pixbuf is None:
+							path_to_file = None
+						else:
+							avatar_pixbuf = gtkgui_helpers.get_scaled_pixbuf(
+								avatar_pixbuf, 'roster')
+							path_to_file = os.path.join(gajim.TMP, jid + '_BW.png')
+							if not os.path.exists(path_to_file):
+								try:
+									avatar_pixbuf = gtkgui_helpers.make_pixbuf_grayscale(
+										avatar_pixbuf)
+									avatar_pixbuf.save(path_to_file, 'png')
+								except gobject.GError, e:
+									path_to_file = None
+
+						notify.notify(_('Contact Signed Out'), jid, account,
+							path_to_image = path_to_file)
 				if self.remote_ctrl:
 					self.remote_ctrl.raise_signal('ContactAbsence', (account, array))
 				# FIXME: stop non active file transfers
diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py
index 47e21bb211109722010eeb526adfce0ca4a4a699..ccf40ff1c825ab217a59cc52ea687687942ead74 100644
--- a/src/gtkgui_helpers.py
+++ b/src/gtkgui_helpers.py
@@ -464,3 +464,8 @@ def make_color_string(color):
 	'''create #aabbcc color string from gtk color'''
 	return '#' + hex(color.red)[-2:] + hex(color.green)[-2:] + \
 		hex(color.blue)[-2:]
+
+def make_pixbuf_grayscale(pixbuf):
+	pixbuf2 = pixbuf.copy()
+	pixbuf.saturate_and_pixelate(pixbuf2, 0.0, False)
+	return pixbuf2
diff --git a/src/notify.py b/src/notify.py
index 2d4ebc1faf7d05167a695aef1b79ce1331a41b38..1ca4443223764710c0cf81081cf09b165c0555fe 100644
--- a/src/notify.py
+++ b/src/notify.py
@@ -47,13 +47,15 @@ if dbus_support.supported:
 		import dbus.glib
 		import dbus.service
 
-def notify(event_type, jid, account, msg_type = '', file_props = None):
+def notify(event_type, jid, account, msg_type = '', file_props = None,
+	path_to_image = None):
 	'''Notifies a user of an event. It first tries to a valid implementation of
 	the Desktop Notification Specification. If that fails, then we fall back to
 	the older style PopupNotificationWindow method.'''
 	if gajim.config.get('use_notif_daemon') and dbus_support.supported:
 		try:
-			DesktopNotification(event_type, jid, account, msg_type, file_props)
+			DesktopNotification(event_type, jid, account, msg_type, file_props,
+				path_to_image)
 			return
 		except dbus.dbus_bindings.DBusException, e:
 			# Connection to D-Bus failed, try popup
@@ -99,7 +101,8 @@ notification_response_manager = NotificationResponseManager()
 class DesktopNotification:
 	'''A DesktopNotification that interfaces with DBus via the Desktop
 	Notification specification'''
-	def __init__(self, event_type, jid, account, msg_type = '', file_props = None):
+	def __init__(self, event_type, jid, account, msg_type = '',
+		file_props = None, path_to_image = None):
 		self.account = account
 		self.jid = jid
 		self.msg_type = msg_type
@@ -118,24 +121,18 @@ class DesktopNotification:
 			prefix = transport_name
 		else:
 			prefix = 'jabber'
-		'''
-		if transport_name == 'aim':
-			prefix = 'aim'
-		elif transport_name == 'icq':
-			prefix = 'icq'
-		elif transport_name == 'msn':
-			prefix = 'msn'
-		elif transport_name == 'yahoo':
-			prefix = 'yahoo'
-		else:
-			prefix = 'jabber'
-		'''
 
 		if event_type == _('Contact Signed In'):
-			img = prefix + '_online.png'
+			if path_to_image is None:
+				img = prefix + '_online.png'
+			else:
+				img = path_to_image
 			ntype = 'presence.online'
 		elif event_type == _('Contact Signed Out'):
-			img = prefix + '_offline.png'
+			if path_to_image is None:
+				img = prefix + '_offline.png'
+			else:
+				img = path_to_image
 			ntype = 'presence.offline'
 		elif event_type in (_('New Message'), _('New Single Message'),
 			_('New Private Message')):