Fixing Checkgmail

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
viking777

Fixing Checkgmail

Post by viking777 »

*******Edit. Nothing in this tutorial will correct the "Error: 200 OK" fault which first appeared on Jan. 18th (see later posts)********
*******Edit2. Fix now available for this error. See post by birchy below********

I don't read of many people complaining about this recently which might mean that I am the only one with the problem, or the only one not to have found a solution till now. I thought I would post it anyway, because the solutions are out there, but they seem to be all over the place, this at least puts them into one topic.

First of all you may as well update checkgmail:

Code: Select all

checkgmail --update
During the process it will ask you if it is OK to update the binary giving you a Y/n choice. Type a capital Y here because a lower case y usually doesn't work. When it has finished updating it will start up and then ask you to confirm your username and password - again and again and again - until you tire of it and press cancel. I suggest pressing cancel first time up!

Now go here http://sourceforge.net/tracker/index.ph ... tid=738663 and download 'checkgmail.patch' (if you haven't got it already). Save it somewhere safe and never delete it you will need it again in the future I guarantee. (This nonsense has been going on for years, why the developers can't just incorporate the patch I don't know? ). Anyway now apply the patch (assuming you have saved it in Downloads the code is):

Code: Select all

sudo patch /usr/bin/checkgmail /home/yourusername/Downloads/checkgmail.patch
If it tells you there is no such command install the 'patch' utility from synaptic.

That will make checkgmail stop constantly asking you for your username and password. That part of the fix has been widely known for ages, the next part not so much.

The problem with checkgmail now is that it will never work in 'preview' mode, ie it will let you read a few words of the message but no more, now we want to correct this problem. This is the solution.

First run the command:

Code: Select all

sudo apt-get install libsexy2 libsexy-dev
Next run the command:

Code: Select all

sudo perl -MCPAN -e ‘install Gtk2::Sexy’
Obviously you have to have perl installed for that to work (if you haven't it is in synaptic, but I think you will have). Be careful with perl commands because if you copy and paste any extra white space along with the command it will throw up some spurious error message and not run (in fact you may be better to type these commands rather than copy/paste them). It will also ask you a couple of questions, you can just press 'enter' here for the defaults except for the one asking about how you want to authorise downloads/installs for this one you type sudo followed by pressing enter.

I also ran:

Code: Select all

sudo perl -MCPAN -e ‘install Crypt::Simple’
In my case it said that was up to date, but it is probably worth doing anyway.

Finally you can start checkgmail and it should work properly, it did for me anyway.

Checked on LM14 Cinnamon and Ubuntu 12.10 Unity.

It is a ridiculous performance to have to go through to get a simple mail checker working properly, but that is what I had to do anyway.
Orbmiser

Re: Fixing Checkgmail

Post by Orbmiser »

Good write up and glad you shared the solution. And pointed out the lack of interest on developers to taking the time to patch/upgrade their little programs. And has a tendency to irk me quite a bit. If I was able to code I sure wouldn't leave people hanging like that.

I personally need a audio & screen notification so went with gnome-gmail-notifier as allows me to also plays an audio file if I'm away but withing hearing distance like sitting away from computer reading or watching tv.

But it also has a bug or two and can stop working just sitting there from time to time if Wifi connection is lost a couple of times in short period of time. Have seen it stuck at the blue down arrow on envelope indicating checking email And just sitting there never recovering. Have to end process and restart it. And like checkmail little in the way of recent bug fixing or upgrades for a very long time.
.
viking777

Re: Fixing Checkgmail

Post by viking777 »

As of today (Jan 18th 2013) all three of my checkgmail installations (on three different distros) have all failed (Error 200). Nothing posted in the tutorial above works to fix this error, the best I can do is to run it with the --no_cookies option, but since this removes most of the programs abilities to manage mail it is an extremely poor workround. I seem to remember something like this happened before (and was something to do with google's login procedures) I also seem to remember that there was no fix for it until the developers bought out a newer version that worked with google's new procedures. I don't know why or even if google have changed their procedures again, but I can't think of another explanation. Updating the program makes no difference.

So my tutorial worked for a whole fortnight :?
carniola

Re: Fixing Checkgmail

Post by carniola »

Having the same issue today after many months of problem-free use. It's a shame because checkgmail is the best notifier by far.. I hope there's a fix!
viking777

Re: Fixing Checkgmail

Post by viking777 »

Thanks for the reply, I can't find anything about it, I was beginning to think it was just me. You are right that checkgmail is the best by far, nothing to beat it. At the moment I am running it with the --no_cookies option which at least means it still notifies you of mail, but all the other functions (archive,delete, mark as spam, etc) are all gone, all you can do is open the mail (in a browser window, not in the preview mode). It drags checkgmail down to the same low standard as other gmail notifiers until it is fixed :(
linuxgameconsortium

Re: Fixing Checkgmail

Post by linuxgameconsortium »

I am having the exact same issue as viking777. Even with the fixes the issue still persists.
The whole Error 200 OK only started January 18th, so I do concure, something must have changed on Googles end.
Any help here would be greatly appreciated.

Best Regards,

Todd B.
Linux Game News &
Linux Game Consortium
viking777

Re: Fixing Checkgmail

Post by viking777 »

There is a bug about it on Sourceforge now:
http://sourceforge.net/tracker/index.ph ... tid=738663
No replies yet though.
All we can do is wait for the developers to address it.
cwsnyder

Re: Fixing Checkgmail

Post by cwsnyder »

This will work, but involves another device: If you have an Android device (phone, tablet) with the Gmail loaded you will get your audible alert, and you can manage your Gmail from either Android or Mint. Since Android is also Google's platform, this one may stay up-to-date. You might also look into running Chrome OS as a Virtual Machine and see if the notifier works there (I haven't checked this).
viking777

Re: Fixing Checkgmail

Post by viking777 »

I am wondering now if this is ever going to be addressed. If you go to the svn address (which is where your updates come from) the last time this package was modified was over 2 years ago. Does this mean it is abandoned? I really hope not because there really is no other gmail checker even half as good as this, but you can only wonder. Have a look for yourself:

http://checkgmail.svn.sourceforge.net/v ... l?view=log

Almost everything on the sourceforge site seems abandoned, the only active part is the bug tracker which has many replies to the original bug, but not even any acknowledgement of them from any official source. :( :(
birchy

Re: Fixing Checkgmail

Post by birchy »

Maybe a Perl guru can fix this? If you do the svn checkout, you get the source code. Checkgmail appears to be a single Perl script. If it was written in Python, I'd tackle it myself...

Code: Select all

svn co https://checkgmail.svn.sourceforge.net/svnroot/checkgmail checkgmail

EDIT:
Just taken a quick look at the source code. Although Perl is alien to me, logging in to Gmail in Firefox with the LiveHttpHeaders add-on running, it appears that the login URL has changed. This seems to fix the problem:

Code: Select all

1. svn co https://checkgmail.svn.sourceforge.net/svnroot/checkgmail checkgmail
2. cd checkgmail
3. gedit checkgmail
4. press ctrl-H to get the "replace" function
5. in the "Search for:" box enter: [b]https://www.google.com/accounts/[/b]
6. in the "Replace with:" box enter: [b]https://accounts.google.com/[/b]
7. click "replace all", then "close"
8. save file and close gedit
9. test the updated version: ./checkgmail
10 if all is well, run: sudo cp checkgmail /usr/bin/checkgmail
DLWood

Re: Fixing Checkgmail

Post by DLWood »

Thanks birchy, this does work on my Mint Maya KDE. I just edited the existing /usr/bin/checkgmail with Kate as root. Good to have it back...for a while!
birchy

Re: Fixing Checkgmail

Post by birchy »

DLWood wrote:Thanks birchy, this does work on my Mint Maya KDE. I just edited the existing /usr/bin/checkgmail with Kate as root. Good to have it back...for a while!
That's bad news. I'm running LMDE with Xfce and the above has fixed mine, so I assumed it would work on ALL versions of Linux as it is only a change of url and the main code is untouched. That is why I suggested getting the latest release from the svn and editing/testing it BEFORE touching the original version located in /usr/bin.

FYI, when/if the svn is updated, I edited this version...

Code: Select all

$ svn co https://checkgmail.svn.sourceforge.net/svnroot/checkgmail checkgmail
Checked out revision 47.
DLWood

Re: Fixing Checkgmail

Post by DLWood »

I made a copy of the orig first...thanks.
birchy

Re: Fixing Checkgmail

Post by birchy »

I wonder if the country makes a difference? I'm located in the UK.
linuxgameconsortium

Re: Fixing Checkgmail

Post by linuxgameconsortium »

Thanks for the fix birchy!!! Much appreciated.

birchy wrote:Maybe a Perl guru can fix this? If you do the svn checkout, you get the source code. Checkgmail appears to be a single Perl script. If it was written in Python, I'd tackle it myself...

Code: Select all

svn co https://checkgmail.svn.sourceforge.net/svnroot/checkgmail checkgmail

EDIT:
Just taken a quick look at the source code. Although Perl is alien to me, logging in to Gmail in Firefox with the LiveHttpHeaders add-on running, it appears that the login URL has changed. This seems to fix the problem:

Code: Select all

1. svn co https://checkgmail.svn.sourceforge.net/svnroot/checkgmail checkgmail
2. cd checkgmail
3. gedit checkgmail
4. press ctrl-H to get the "replace" function
5. in the "Search for:" box enter: [b]https://www.google.com/accounts/[/b]
6. in the "Replace with:" box enter: [b]https://accounts.google.com/[/b]
7. click "replace all", then "close"
8. save file and close gedit
9. test the updated version: ./checkgmail
10 if all is well, run: sudo cp checkgmail /usr/bin/checkgmail
viking777

Re: Fixing Checkgmail

Post by viking777 »

Poetry birchy, sheer poetry :D

Thanks so much. Email without checkgmail is a real pain.

I will amend the tutorial at the beginning of the topic to direct folks to your fix.

(It is a pity the maintainers couldn't be bothered to fix this though).
birchy

Re: Fixing Checkgmail

Post by birchy »

I see someone has now uploaded a patch that reflects my mods. Shame they didn't credit me though. :|

http://linuxdeal.com/how-to-fix-checkgmail
carniola

Re: Fixing Checkgmail

Post by carniola »

Thanks birchy! You're a gentleman and a scholar.

There should be a "buy this person a pint" button on this forum...
Lone.Wolf

Re: Fixing Checkgmail

Post by Lone.Wolf »

I'm trying to install and do the fix for Checkgmail. I installed it through the software manager and then in the terminal I entered Checkgmail -update and I get the following error:
Restarting checkgmail ...
Warning: Gtk2::Sexy not found ...

CheckGmail uses Gtk2::Sexy for clickable URLs in mail messages
Please download and install from CPAN (http://search.cpan.org) if you want to use this feature ...


not well-formed (invalid token) at line 17, column 21, byte 509 at /usr/lib/perl5/XML/Parser.pm line 187
Perl exited with active threads:
1 running and unjoined
0 finished and unjoined
0 running and detached

When I go to CPAN I can find out about the Gtk2 package but no link to download the package. Any help would be appreciated.
Shouldn't the software manager take care of all dependencies? Is this a bug?

By the way I'm using XFCE 13
Thanks
viking777

Re: Fixing Checkgmail

Post by viking777 »

Just read my tutorial - I am not typing it out again.
Post Reply

Return to “Tutorials”