Hi,
How do I suppress the notification message box when I activate a module?
Thank you!
How to Suppress Notification from Activate Script [Solved!]
-
- Shogun
- Posts: 333
- Joined: 26 Jan 2011, 16:15
- Distribution: Porteus 3.2 and 4.0 64bit KDE
- Location: Malaysia
How to Suppress Notification from Activate Script [Solved!]
Last edited by cttan on 27 Nov 2012, 13:09, edited 1 time in total.
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: How to Suppress Notification from the Activate Script
If you look through the 'activate' script (/opt/porteus-scripts/activate), you will see that when you have an active Xsession, it calls another script, /opt/porteus-scripts/xorg/xactivate, which is what actually creates the notification. This is the line that is responsible for it:
So you can rewrite the script to eliminate this line. This is a quick way to comment the line out without removing the code (so it'd be easy to turn the notification back on:
This uses sed, the stream editor, to edit the files in place (-i), finding only the line that matches 'Well done', and within that line substituting Xdialog with echoing nothing and a comment to block the rest of the line. If there are any errors, etc., those popups would still appear.
Code: Select all
Xdialog --title "$TITLE" --no-close --no-buttons --infobox "Well done! $BASE: module activated successfully." 0 0 2000 &
So you can rewrite the script to eliminate this line. This is a quick way to comment the line out without removing the code (so it'd be easy to turn the notification back on:
Code: Select all
sed -i '/Well done/s/Xdialog/echo "" #Xdialog/g' /opt/porteus-scripts/xorg/xactivate
sed -i '/Well done/s/Xdialog/echo "" #Xdialog/g' /opt/porteus-scripts/xorg/xdeactivate
Please take a look at our online documentation, here. Suggestions are welcome!
-
- Shogun
- Posts: 333
- Joined: 26 Jan 2011, 16:15
- Distribution: Porteus 3.2 and 4.0 64bit KDE
- Location: Malaysia
Re: How to Suppress Notification from the Activate Script
Hi Ahau,
Thank you very much for this prompt and wonderful solution!!!
I have been looking for it for a long time. After my Porteus(copy to ram) start up, I ran some scripts which will activate 50+ modules. This has greatly reduced the waiting time and improved the usability of Porteus.
Thank you very much for this prompt and wonderful solution!!!
I have been looking for it for a long time. After my Porteus(copy to ram) start up, I ran some scripts which will activate 50+ modules. This has greatly reduced the waiting time and improved the usability of Porteus.