[SOLVED] Bash Script checking for mail

I have come up with this forsaken script...
#!/bin/bash
while :
do
NEWMAIL=$(curl -su "You'd wish." https://mail.google.com/mail/feed/atom | grep fullcount | cut -d ">" -f 2 | cut -d "<" -f 1)
echo $NEWMAIL
notify-send "Gmail" "You have $NEWMAIL new mails!"
sleep 10s
done
It does get the number of new mails perfectly fine - I'm sure there is a better method with cut... -, and it echos the number, but notify-send does not seem to work. From what I've read I need to set the environmental variable or something like that. Yeah, no clue. Any hint is appreciated.
Last edited by ThunderRush (2013-02-05 14:38:15)

I tried that aesiris, of course with some gnome things, but it did not work either.
And for jason: It's okay, thank you again for your help.
I will see what else I can do, and will post a solution if I find one - which I doubt.
What other alternatives to notify-send are there? Not a whole popup, but something more subtle?
#EDIT
As always, my own stupidity.
Since I had absolutely no right set on the file, since the password is there in clear text, ist had the Permissions 111.
But - gnome did not belong to my root.
ps aux | grep gnome
And I always started it as sudo, as root. So I changed the ownership to my user...
sudo chown thunderuser gmailcheck
and set the rights to 500. So I can execute and read it.
And it finally worked. Thanks again.
Last edited by ThunderRush (2013-02-05 14:37:53)

Similar Messages

  • Won't stop checking for mail!!! *fixed but not solved*

    Hey all, my iPod touch is stuck in a weird way. It's working fine in every aspect except it will not stop "checking for mail". It's been in that mode for about 10 hours now, it isn't' receiving mail, just got the little spinning wheel and saying "checking for mail". I even have the wi-fi turned off!
    It appears to be wearing my battering down much faster and I have tried everything I can think of, connected it to my mac, synced content, turned off wi-fi.
    Does anyone know of anything else I can do?
    Thanks in advance,
    Stephen
    EDIT: Forget it, tried turning it off and on and that fixed it. Sorry I didn't try that first...
    Still have no idea why it happened though...
    Message was edited by: halcyonseven

    Thanks so much for your reply!
    I should have also mentioned that I've deleted the account, did a reset, and even a restore (at apple's suggestion) and nothing has helped.  I just finished reentering all the account info after the restore and it still has the "checking for mail wheel spinning". I have 15 iPads in this office and haven't had an issue with any of them expect this one.
    It also has the "Load More Messages..." 29 messages total, 0 unread - at the bottom of the inbox, but it won't let me select it or "load" any more messages.  It does send and receive emails just fine though.  Slow, but fine.
    Any other thoughts?!

  • Constantly "Checking for Mail"

    My new iPhone is constantly "Checking for Mail" while I'm trying to delete or read messages that are already downloaded. It holds me up from deleting or doing anything until the operation is complete. I've got it set to check manually, and also tried 15, 30 and 60 minutes, but still it checks for mail everytime I open Mail. How do I get it to chill out and let me go through my mailbox and check only when I want it to?

    I've experienced this a few times. The problem was some kind of deadlock related to my Yahoo mailbox. The workaround for me was to log into my Yahoo account via the web, create a folder, move my Inbox content to that folder, delete and re-add my Yahoo account on the iPhone client, check email (nothing to download), then via the web move all my inbox messages back from the temporary folder to the inbox. On the next reload of my Yahoo email Inbox all messages were displayed and the "Checking for Mail" hang resolved. A client issue perhaps.
    I seem to recall that this Checking for Mail condition would also block the ability to download email from other non-Yahoo email accounts.
    This may or may not be the same as your issue.

  • How can I turn off Keychain from asking for my password EVERY time I check for mail?

    how can I turn off Keychain from asking for my password EVERY time I check for mail?
    This is really driving me nuts.....
    Thanks

    Choose Apple menu > System Preferences, click Security & Privacy, and then click General. 
    Open the General pane of Security & Privacy preferences
    2.     Select “Require password...NEVER after sleep or screen saver begins.”  You can adjust the amount of delay before a password is required in the pop-up menu.
    From what I am aware, you cannot turn off the keychain.
    I hope this helps.
    This is also a link that might help http://macs.about.com/od/systempreferences/ss/Mac-Security-Using-The-Mac-Securit y-Preference-Pane_2.htm

  • Tried setting up my verizon e-mail account on iPod Touch, 4th generation. Am able to send out e-mail messages but none of my e-mails on my Mac show up in the inbox. Just get the "Checking for Mail" endlessly.

    Tried setting up my verizon e-mail account on iPod Touch, 4th generation. Am able to send out e-mail messages but none of my e-mails on my Mac show up in the inbox. Just get the "Checking for Mail" endlessly.

    On the iOS array of devices, you need to make sure all of the settings are right. I have found an official Verizon webpage for setting it up on Apple devices right here:
    http://support.verizonwireless.com/clc/devices/knowledge_base.html?id=39930
    Hope this helped!

  • Constantly "checking for mail" and email settings freeze

    Since yesterday I've noticed that my mail app isn't showing any new emails and when I go in to it the "checking for mail" is continously running at the bottom and the internet spinning disc is spinning away.  I've tried switching it off and back on again (using the red slide bar) and new emails appear the first time it's restarted but only that once.
    I've got three POP3, a hotmail and Gmail account set up so thought I could try and disable them one by one to see which if any was causing the problem, but in settings going to the Mail, Contacts, Calendar option just freezes the screen.
    Have tried syncing with iTunes and a full reboot (home and power button together) but still no success. Also tried the suggestion made elsewhere about clearing the cache, closing all the open apps and doing a full reboot - unfortunately still without any joy.
    Internet and everything else seems to be working fine. Any other thoughts?
    iPad2 OS 4.3.5
    Thanks

    I've experienced this a few times. The problem was some kind of deadlock related to my Yahoo mailbox. The workaround for me was to log into my Yahoo account via the web, create a folder, move my Inbox content to that folder, delete and re-add my Yahoo account on the iPhone client, check email (nothing to download), then via the web move all my inbox messages back from the temporary folder to the inbox. On the next reload of my Yahoo email Inbox all messages were displayed and the "Checking for Mail" hang resolved. A client issue perhaps.
    I seem to recall that this Checking for Mail condition would also block the ability to download email from other non-Yahoo email accounts.
    This may or may not be the same as your issue.

  • When I open my mail account I keep getting the message "Checking for Mail". I deleted the yahoo account and set it up again and I am still getting the same issue plus I am not seeing any of my mail or folders. Can anyone help?

    When I open my mail account I keep getting the message "Checking for Mail". I deleted the yahoo account and set it up again and I am still getting the same issue plus I am not seeing any of my mail or folders. Can anyone help?

    This is how I fixed it on my new iPhone 5S. Using the standard yahoo setting on my phone.
    You will have to access  "managing your app passwords" on your account profile for yahoo. Generate password for your app. For example: "My iPhone 5S'
    Go to your Iphone and set up your yahoo mail account on your phone the normal way and you have to use the generated password.  instead of the yahoo account password.
    source:
    http://virtualizeme.net/iphone-5-yahoo-mail-server-unavailable-fix/
    I hope this helps,
    cheers

  • Where has the 'checking for mail' icon gone?

    Whenever I used to check my mail manually (Comand-Shift-N) an icon to the left of the Inbox would come up to show that mail was checking. If I remember correctly, it was a couple of triangles in a circle that would spin while the process was being executed. It's disappeared now - nothing come up and there's no way of knowing whether Mail is checking for mail or has finished doing so now. Any ideas where this visual indication of when Mail is busy checking for mail might have gone and how I can get it back?
    By the way, what do you call that icon - the one that comes up when a process is being exectued to show you so?

    Yes, that's right - no, it doesn't appear in the mailbox list. Where it used to be, e.g. if you're in Inbox and it's darkened to show it's the folder being viewed, it used to be the right of of 'Inbox' - where, when Mail is NOT checking for mail, there is a circle with a number in the middle of it to show how many unread messages are in the folder... It's that circle (the one showing the number of unread messages when Mail is idle) that used to turn into two spinning triangles when Mail was checking for mail. It's gone, but the circle displaying the number of unread messages is still there.
    It certainly is checking for mail, and receiving everything and doing everything else perfectly. In fact, that's the problem - it's such a reliable and well-behaved program that it seems such a waste of time to worry about silly, niggling little things. But still... Would be nice to have it back. I liked it and miss it.
    Nope, no enhancements; just as it was installed when I took delivery of the computer. Is it possible Firefox has somehow corrupted it?
    All current Apple and Mozilla (Firefox 3.0.11) updates are installed.

  • I can't access my Yahoo mail on Iphone 4s over wifi at work. "Checking for mail" is going on forever. Any idea?

    I can't access my Yahoo mail on Iphone 4s over wifi at work. "Checking for mail" is going on forever. Any idea?

    You cannot change the incoming mail ports on the iPhone,  As KiltedTim mentions, if it works elsewhere on 3g and wifi, then it almost certainly is your employers firewall blocking access.

  • How can I stop the spinner in the 'checking for mail' column?

    Whenever I ope my mail app and read the bottom left column, I see the spinner and 'checking for mail'.  Then I see 'sending 1 of 2'.  Then the bar fills in, as though 2 mails have been sent.  There is no mail sent.  Then later I open the app again and it starts all over.

    Hello TheTiger81:  You made a valiant effort to help me.  Yet I went back, opened my mail and the same thing happened all over again.  I appreciate your trying to get me beyond this.  Makes me sorry I complained about my iPad that kept turning off.  This spinner problem seems worse, as I feel it will take a toll on the battery.  Thanks very much.
    And if you have any other suggestions, I will try them.  Do you think I should try your suggestion more than just once?

  • Spell Check For Mail (10.5.7)

    Does anyone know of a good, reliable spell check for Mail?

    Ok. Not sure what I did - but I can now select "Show Spelling & Grammar.
    However, when I now miss-spell a word, it gets underlined in red (check spelling as you type).
    This where I need educating. I would have presumed that I could click the underlined word and be shown spelling suggestions (because I get this option in so many other software packages).
    Secondly, is there a way of doing the following:
    1. Automatically launch the spell checker before sending? Or do I have to manually launch the spell checker each and every time? If I check "Show Spelling & Grammar) it defaults to not showing it when I re-launch.
    2. Can I Customize a button for the toolbar in oredr to have Spelling be launched from a click of a button?

  • TS2621 Checking for Mail

    My Iphone seems to be stuck in "Checking for mail."  It always shows this at the bottom of the screen.  Is this normal? 

    This is happening to me too but only on 3G connection; the mail downloads ok when on Wi-Fi.  Did you find a solution to your problem?

  • Checking for Mail ... forever?

    For the past 2 days both my iPad 2 and my iPhone 4S have been in a constant state of "Checking for Mail . . ."
    I've deleted the accounts and reinstalled them, which has cleared out stuck messages that I had deleted on my iMac at home. But then the next time I open I get the same thing.
    I was thinking it was software related and was going to restore from backup on the iPhone when I realized I had the same problem with the iPad. That has to be something with the account, right? It doesn't matter how I access, home, wifi, or wireless. And it happens on multiple email accounts.
    Anybody seen this before and have a suggestion?

    I'm also one of the seemingly thousands of people who suffer from the problem where my iPhone hangs on "Checking Email" when checking my Pop and IMAP email accounts. This started after the 2.0 upgrade and was NOT fixed in the 2.0.1 release!
    I've tried switching push on and push off. I've tried restoring my phone completely. Nothing seems to work as a permanent solution.
    The only thing that temporarily works is turning my phone off and then on or holding the home button for 7-8 seconds. Who wants to do that every time they want to check their mail?!?!?!
    But even then it only works for about an hour ish. Actually, I've seen it work for anywhere between 5 minutes and 4 hours before hanging.
    This is a huge problem that a lot of people are suffering from. Please fix it!!

  • Mail Perpetually Checking for Mail and No sound when a New email is received.

    I have two accounts, iCloud and an IMAP. Both accounts are configured correctly. When I launch mail, it will retrieve new messages but continue to search for mail (as in the status bar at the bottom says checking for mail). I noticed that allowing Mail to remian open drains my battery quite quickly. In addition to this, Mail no longer plays sounds for either sending or receiveing but all other sounds work. Again, I checked the settings for this and indeed sound is on. What is most strange is that this just began happening today. I have not changed any settings and actually reset all settings to default (no change). Anyone else experience something similar?

    I get similar odd behaviour. Only since IOS5. Like you it will seem to continue checking for mail even after downloading although I do eventually get a sound albeit long after the emails downloaded. What's strange is Wifi email checking is more sluggish/unpredictable than if I am on cellular. It's not that my wifi is slower, Safari / store browsing is lightening quick under wifi but the email app behaves strangely! Sorry I haven't got a solution for you - just wanted to let you know that you are not alone with this type of issue.

  • Why does yahoo check for mail constantly on my macbook pro?

    yahoo constantly is checking for mail.  Then after a period of time it hangs up the mail app. 
    pleae help

    Back up your iPhoto library, Depress and hold the option (alt) and command keys and launch iPhoto - rebuild your iPhoto library database
    LN

Maybe you are looking for

  • Cleared and uncleared items

    Hi, I need to print both the cleared and uncleared items at the footer of the smartform. For this I need to pick dmbtr and zterm fields from BSID and BSAD tables.How can I print the cleared and uncleared items by picking the data from both these tabl

  • In pages(not the New version) footer is over to the left, so when i put the page numbers in they don't sit right. How do i move the footer

    In pages(not the New version) footer is over to the left, so when i put the page numbers in they don't sit right. How do i move the footer

  • ASA 5505 Slow download speed

    Hello, as the title states, I have an ASA 5505 at one facility that is only getting around 16mb down on a 100mb circuit. No errors on either interface, and we've tried manually setting port speed and duplex, and auto, (both sides show it negotiating

  • Footnotes and Bibliography?

    It appears that Apple has overlooked the ability to create footnotes and a bibiography in iBooks Author. (yet it's specifically targeted at the academic textbook market) Can this possibly be true???

  • Enable SSO APEX 4 and MS Active Directory

    Hi, I want enable SSO on my APEX applications. Actually, we use Microsoft Active Directory and Windows 2003 (tomorrow maybe Windows 2008). Regarding your experiences, what is the best solution that I can us in order to implement SSO ? Thanks for your