AppleScript

defaults write com.apple.notificationcenterui bannerTime -int 2