Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
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? –  Radu Rădeanu Aug 22 '13 at 15:02
    
I want to change that message. –  Adrian George Aug 22 '13 at 15:12
    
I don'd see nothing wrong with it. –  Radu Rădeanu Aug 22 '13 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 '13 at 15:15
add comment

2 Answers 2

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

share|improve this answer
    
@AdrianGeorge So, it was useful the answer? –  Radu Rădeanu Sep 21 '13 at 5:07
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.