How to disable notification from network-manager

12.10 - Dconf

Run these commands:

gsettings set org.gnome.nm-applet disable-disconnected-notifications "true"
gsettings set org.gnome.nm-applet disable-connected-notifications "true"

Or open dconf-editor and scroll down to orggnomenm-applet and check disable-connected-notifications and disable-disconnected-notifications settings there.

DConf


11.10 and 12.04 - Gconf

Gconf-editor lets you edit the network manager notifications.

To alter these settings, install gconf-editor from the software-center.

Scroll to / ▸ apps ▸ nm-applet and check disable-connected-notifications and disable-disconnected-notifications settings there. Check the attached image for clarifications.

gconf editor


In addition to jokerdino's way, you can change this in commandline too:

gconftool -s /apps/nm-applet/disable-disconnected-notifications --type=bool true
gconftool -s /apps/nm-applet/disable-connected-notifications --type=bool true

To see what can be changed:

gconftool -R /apps/nm-applet

The other answers might help you with getting rid of "you are connnected" messages, but there's a bug, at https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/445872 (see also https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/921717 and https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/835972 ), causing the disable-disconnected-notification setting to be ignored.

Until that's fixed, there is a workaround. Put this in /etc/pm/sleep.d/49_killall_notify:

#!/bin/sh

case "${1}" in
    resume|thaw)
    ( sleep 2 ; /usr/bin/killall /usr/lib/xfce4/notifyd/xfce4-notifyd ) &
    ( sleep 4 ; /usr/bin/killall /usr/lib/xfce4/notifyd/xfce4-notifyd ) &
     ;;
esac

then chmod +x /etc/pm/sleep.d/49_killall_notify. This is for Xubuntu, on regular Ubuntu I guess it would be /usr/bin/killall notify-osd or something like that. You might also need to tweak the sleep times.

But this is an ugly hack ;) it'd be better to see a real fix.