General :: Send Notifications From A Bash Script?
Sep 28, 2010
How to write to KDE's OSD or notification from console?
i want to send a notification to the kde4 notification area (in desktop panel) from a small script. Is there a program for? I cant find anything.
View 1 Replies
ADVERTISEMENT
Feb 23, 2016
I got some crontab records and everything works fine. I installed mail server recently and all cron notifications started to come into my inbox. I'd like to receive only notifications about cron errors. I would rather not filter all notifications off.
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
View 1 Replies
View Related
Jul 19, 2011
I have written a simple script that are sending some data to a plc. But i must end my sending with crlf for the plc to accept my sending. The script is started in inetd.
Code:
#!/bin/bash
i="0"
while [ $i -lt 1 ]
do
echo -n "1111111111"
[Code]...
View 3 Replies
View Related
Sep 10, 2010
I open up 2 xterms on my desktop, A(/dev/pts/0) and B(/dev/pts/1).I can write from A to B using redirection e.g. echo "test" > /dev/pts/1How do I run a command from A on B? e.g. "clear"Basically I'm putting the 2 terminals side by side, and using terminal B to display the contents of the current working directory, by running the following in A:export PROMPT_COMMAND="ls -a > /dev/pts/1"but this fills up the screen pretty fast. I was actually looking for a way to clear up the second terminal.
View 6 Replies
View Related
May 7, 2010
I'm trying to write a script that will continuously ping a server and then send out an email when the server is down, and then when it is back up. Then, continuing with monitoring. I would like to not run this in cron, because I don't want to script to run with multiple instances.
For example,
Ping a server every minute.
-If successful, do nothing.
-If failed to ping, then send out email stating that server is down.
-Once ping is successful, then send out email stating that server is up.
I only want it to send an email once after a failure, so the end user isn't get an email every minute that it fails. Once it is successful, then send the email (one time), stating that the server is up. Then, continue to ping and if fails again, repeat the process.
View 4 Replies
View Related
Jan 18, 2010
I have those notifications bubbles that appear right and top of my Screen.
Besides being RIDICULOUSLY big, i don't need them
I don't know if it is the same, but they look like this:
NOTE THIS PICTURE IS JUST AN EXAMPLE I FOUND ON THE INTERNETS - I WANT TO DISABLE ALL NOTIFICATIONS
View 14 Replies
View Related
Aug 16, 2009
Just recently I started using a cluster in my school to run some heavy tasks, which might require long periods to get done. The thing is that I can only send one task after the previous one has been completed (cluster use policies) and since I don't know in advance how much time each task will take, I'd like to have a way of knowing when one given task is already done (other than keep checking it).I am allowed to submit the jobs in bash scripts, so that's what I have at my disposal.
View 11 Replies
View Related
Jan 24, 2010
How I send clipboard to festival or what is wrong here? #!/bin/bash
text='xclip -selection clipboard -o'
echo '(voice_nitech_us_awb_arctic_hts) (SayText "$text")' | festival
Says only "dollar text" to me. Just this works, but I want other script with different voice: #!/bin/bash
xclip -selection clipboard -o | festival --tts Voice changed here: echo '(voice_nitech_us_awb_arctic_hts) (SayText "say this please")' | festival
View 3 Replies
View Related
Feb 13, 2009
I'm setting up a machine that's going to be used to test randomly connected tape drives one at a time, and as such, I'm writing the test routine using mt in a bash script, for user-friendliness. The problem is the block device name changes on occasion as tape drives are swapped out and busses are rescanned, so I can't "hard code" a block name into the script.
I know programs like lsscsi and hwinfo will give you block device names as part of their output, but I can't seem to grep anything in such a way as to have the final output be just the block name (ie /dev/st2, or optimally 'st2'), so that I can just have the script read said output, and drop it into the necessary variable.
View 2 Replies
View Related
Jan 20, 2011
in the middle of script, i need to send the output of (send command on line 8) to a file
#!/usr/bin/expect
spawn telnet 172.20.64.133
expect "ENTER USERNAM <"
[cod]....
i treid the below on line 8 :
1- send "show command;
" > logfile.txt : gives an error extra character after the "
2- logsave logfile.txt 'send "show command;
" ': error invalid command
3- i simply tried to send the output of the whole script to file logsave /home/logfile ./script : seems that logsave work under root only
4- ./script > logfile : the problem with this is that the output of echo or (read "enter your id") command will not be displayed on the screen (actually nothing will be displayed, i have to open the log file to see the output). is there any way to save the log of the "send" ? or to save the log of the complete script without hiding the output on the screen?
View 2 Replies
View Related
Apr 21, 2010
I have the following working script. It checks the directory for txt files, if files are there, it copies to another directory or gives error. I would like to exclude "file not found" errors and send them to /dev/null. All other errors should go to the email address as usual.
Code:
#!/bin/bash
function err
{
if [[ $? -ne 0 ]]
[Code]....
View 7 Replies
View Related
Apr 1, 2011
I have an Ubuntu 10.04 machine at home and apache setup on it (files are located in a Truecrypt volume). The reason for the web server being that I wanted to access my files wherever I'm at (i.e. hotel, work, hotspots, etc...). So far, it's worked out great for me seeing as a I can http download my files (or stream media files). However, I am often on a public hotspot and I know it's a matter of time before someone finds the webserver on my computer. I have the machine firewalled and password protected (via .htaccess), but either way I don't want people looking in on my computer.
The problem: I have used Truecrypt for a long time and completely trust using the program to encrypt/unencrypt a volume container to store my files. Usually, I would remote desktop into my computer and mount/unmount the volume when I needed it. However, after time it get's really annoying to do this. So I eventually figured out how to setup a bash script to automatically do this for me (which I put on the usb part of my phone). What I wanted to do was to be able send the bash script to my Ubuntu machine (via ftp from my phone) and have Ubuntu automatically run the script. Is this possible? What programs do I need on Ubuntu?
I was thinking about using something like cron, but that is for scheduled times. I don't really have a set time in which I need my files, it's pretty sporadic depending on how much I travel. Thus the need for being able to remotely mount the volume when I need it.
Summary: I need a way for Ubuntu to read a folder every minute or so to check for bash scripts to run. I want to be able to send the bash script via ftp from my phone, have Ubuntu run the script, then delete itself (so as to not store the password). I already know the script in which to mount the Truecrypt volume and how to send the file via ftp from my phone. It's really a matter of what program to use in Ubuntu to find and run the script.
View 8 Replies
View Related
May 11, 2010
I installed Lucid Lynx a week ago and I have a problem with the notifications. The notifications that appear on the screen stay for a long time, about 10 seconds. How to control these notifications so that I can reduce the time?
View 1 Replies
View Related
Nov 30, 2010
I'm running Nagios Core 3.2.3 in a CentOS 5.5 Server, i'm trying to set the notifications, however they don't go through. I'm Using Postfix, i also setup squirrel mail and i can send mails through it successfully, can anyone give me some advice about the logs to check or configurations to check?
View 2 Replies
View Related
Jul 23, 2010
Had anyone tried downloading a free SMTP server from the web and use it to send emails in nagios, when the services are down, an email notification will be sent.Right now i need a smtp server in order for me to send email notifications, are there any recommended ones?
View 7 Replies
View Related
Apr 6, 2011
I am using Kde 4.5 in Debian and I get some notifications after start that I need to update something. How can I disable it (I often don't want to waste bandwidth for such things)? I am using Debian Wheezy and Kde 4.5
View 1 Replies
View Related
Mar 11, 2010
I need a program which generates events when a file is moved, removed or its extended attributes are changed. I'm running Ubuntu Karmic Koala 32-bit desktop.inotify is the standard solution for such problems, but inotify cannot install a recursive watch, so the only option is to the equivalent of find on the filesystem, and add an inotify watch on each node. This is what e.g. inotifywatch does. This won't work for me, because my filesystem has 1 million files, and installing watches to all of them takes forever.
fanotify could work except that I would have to patch the kernel for that (I'm currently running 2.6.31-20), and maintaining patches to the Linux kernel is beyond my time commitment.I used to use rfsdelta (whose kernel module is similar to rlocate), but it just doesn't compile on 2.6.31, because it uses obsolete Linux security framework APIs.
View 1 Replies
View Related
Nov 29, 2010
I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:
Code:
#!/bin/bash
cat > ~/generateGridmix2data.sh << END
[code]...
View 6 Replies
View Related
Jul 17, 2010
below are the details of my system. I have bash as my current shell, some really common commands aren't working.
Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])
Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$
[Code]....
View 13 Replies
View Related
Aug 17, 2011
I'm writing a script that will send an alert email given certain conditions. I have the impression that sendmail is what I need to do that. I just don't know how to use sendmail at all. I assume I have to set it up like a typical mail client so that it has a mail server to log into to send from.
I've looked through the man pages, but I can't find anything in plain English there on how to set it up, or how to use it once it is set up.
View 14 Replies
View Related
Dec 3, 2010
What happens when the script executes is that the ssh connection works and parks me at the remote hosts's shell login. Therefore, the "firefox" command refuses to execute. I need to know how to make the "ssh" connection occur, stay open, and go into the background so that the rest of the script can execute.If I could also do this with the "firefox" line so that the entire term window could be closed would also be helpful.
View 3 Replies
View Related
Oct 13, 2010
I have open phoenix SL viewer and I get nagging notification who is on/offline and when I recieve a message. When I minimize it or change virtual desktop, I really dont want to see any notification from this application as it is distracting me.I first tried to find setting in phoenix but I couldnt find any. Notification widget cannot supress it completey, so I went to advanced application settings, but I couldnt find it there either.Is there a way to say to KDE that I dont want any notifications recieved from that application?
View 2 Replies
View Related
May 11, 2010
I installed Lucid Lynx a week ago and I have a problem with the notifications. The notifications that appear on the screen stay for a long time, about 10 seconds. How to control these notifications so that I can reduce the time?
View 1 Replies
View Related
Jun 3, 2010
I recently upgraded from Kubuntu 9.10 to 10.04, and I've noticed that all my KDE notifications now appear at the top of the screen, in the middle. Has anyone else experienced this? Is there an easy way to fix it?
View 8 Replies
View Related
Oct 9, 2010
Is there a way to log the notifications that show up in the desktop? For example:
a)When pidgin notifies you that you have a new message can you "save" that notification?
b)When transmission informs you that a torrent finished downloading can you log that notification?
Or if you can't log them can you make a script that "catches" those notifications? What I want to do is that when a certain notification pops it triggers an app or a script. So if I can log the notifications I can "watch" for changes in the log file and trigger something; or if can "catch" the notification I could also do that. I think it can, somehow, be done with d-bus but I can't find my way around the documentation.
View 1 Replies
View Related
May 4, 2011
In the previous version of Ubuntu (10.10) I got a notification of updates in the lower Gnome panel.Now I am using 11.04 with Unity. I have not seen a notification of a update since then.How can I get updatenotification for Ubuntu 11.04 with unity?
View 3 Replies
View Related
May 9, 2011
In ubuntu Natty with the notification pop ups like for when the song changes in Banshee, they are in my top right corner. Is there anyway to move them?
View 3 Replies
View Related
Jan 31, 2010
I installed Specto and created 2 watches. One for a gmail account, and one for a website. Both have changed since then but I have not received any notifications. There are no errors in the error log.I think this problem might have something to do with the fact that I altered the default Ubuntu 9.04 bars (long before installing Specto). I eliminated the top bar on the desktop. Would this somehow prevent Specto from functioning. Its logs indicate that it is doing its tasks, but I don't see the notifications.
View 2 Replies
View Related
Jul 8, 2011
I need to monitor PHP errors / warnings on few of our servers. The idea is to send email to developers / admins when PHP error/warning occurs on the server. Currently we run very ugly shell script from cron to do this which I want to replace with something better.I was thinking would logwatch be a good candidate for this. Run logwatch from cron every 5 minutes to check php service logs for the last 5 minutes?I've tried to get logwatch to check logs for last x minutes but so far without luck. Anyone already done this or should I go some other route with this?I'm using SLES as my test machine. I've installed the logwatch rpm and configured the PHP settings as shown here.
Currently I can get php log output when specifying '--range All' but how to tell it to display last few minutes logs?I've tried lot of range variations but nothing seems to work.I also tested adding 'for that minute / for those minutes' to the range command but then it won't output anything at all.
View 4 Replies
View Related
Aug 12, 2010
my monitor also doubles as my tv and i like to watch hulu videos and movies on it from my computer and i wanna be able to tell who comes online and who logs off, i want these notifications to appear on top of the videos that are playing in full screenis there like a plug in for this or special way of getting this kind of thing working i use my 20" tv as a monitor and tv.
View 2 Replies
View Related