3

How can I display a message like:

eth1 interface has been enabled

each time when eth1 is enabled?

Let me know if my question make sense.

4
  • You don't get notifications when your network is enabled or disabled? All modern operating systems are doing this. Why you should let reinvent the wheel? Aug 22, 2013 at 15:02
  • I want to change that message. Aug 22, 2013 at 15:12
  • I don'd see nothing wrong with it. Aug 22, 2013 at 15:19
  • 2
    @RaduRădeanu There doesn't have to be anything wrong with it good grief. If he wants to change it, what is that to you?
    – Seth
    Aug 23, 2013 at 15:15

2 Answers 2

0

After some searches, I found a way how you can do it:

1
  • @AdrianGeorge So, it was useful the answer? Sep 21, 2013 at 5:07
0

You can add a shell script into /etc/NetworkManager/dispatcher.d that you might name 99-notification. Be sure to mark it executable with chmod +x 99-notification.

In that script, you will need to do something with the input to script, the interface name and the action.

#/bin/bash

if [[ "$1" = eth1 ]] && [[ "$2" = up ]]
then
    DISPLAY=:0.0 kdialog --passivepopup "eth1 is enabled" 3
fi

I have not tested this, but I think it will work, at least with KDE. For Unity/Gnome, you might have to exchange kdialog with zenity.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .