Google Talk Invisible

There have been some questions regarding Google Talk and its Invisible status. XMPP/Jabber didn’t support Invisible when Google Talk, which is based on XMPP/Jabber, added support for it. This was likely to create a uniform interface to the user who now had the ability to go invisible on their AIM account.

Well, there’s good news. I created a plugin to enable Invisible for Google Talk accounts.

Now, before you go rushing off to download and install that plugin, here’s the big caveat: I only made it work for one account. If you have more than one Jabber/XMPP/GTalk account, then it won’t work for all of them. Proceed with caution, because having multiple accounts may break it. I have tested it with one account, so no worries there Fixed, now supports multiple accounts (but no guarantees, this is open source software).

Instructions are available on my main site for both Windows and Linux.

Update 12/1/2011: I’ve updated the code with a patch from Khushman. It fixes the startup issue that would crash some people’s pidgins on startup, and also includes a 64-bit version of the compiled plugin. Hope it works!

 

Update 6/27/2010: Again, there have been many further comments as to whether it works or not. Seeing this much demand for only a few lines of code is very interesting. Until now, many of your problems have been either unfixable due to the way the plugin works (a hack) or too much work to reproduce. However, I’ve been notified of a better way to go about going invisible and I will try to update the plugin soon (no guarantees however) with that new system: http://chinmaykamat.wordpress.com/2010/01/22/google-talk-invisible-mode-in-pidgin/

Sorry to everyone who’s Pidgin crashes when using this plugin, there’s little I can do when I have the plugin enabled all the time and get no crashes. In fact, I’ve had Pidgin crash repeatedly on me before, but never since I enabled this plugin.

Update 3/19/2010: There have been a lot of requests for fixes/updates/rewrites to this code. I’m sorry to say, but I’ve moved on to newer projects. This was originally only a weekend project for me, little did I realize that there was this much demand for it. I’ve provided all the code I have for this, if anyone wishes I can provide the whole working directory as well as instructions to compile on both Linux and Windows, but beyond that I will not be making any more changes.

Now, I have a patch waiting in my email, and I will attempt to incorporate that sometime in the future, but as above, no guarantees.

Sorry to everyone who has posted with problems with this code, but it’s over a year old, meant for a much older version of Pidgin, and works with at least historically badly documented APIs (sorry Pidgin, but that documentation wasn’t easy to understand at all, I worked mostly off examples). Good luck with getting a real invisible implementation into Pidgin trunk!

97 thoughts on “Google Talk Invisible

  1. Hi, I’ve created .deb packages for linux, and put them on my PPA repository.
    However I had to change something in your code, to make it compile and actually work.
    All the patches are included in the .diff.gz file.
    Contact me if you need info about the changes, and thank you very much for your plugin! :-)

    Reply

    Fahhem Reply:

    Thanks a bunch! The changelog names one of the changes I was trying to get going. However, none of the links work on the page, could you fix that?

    Reply

    frasten Reply:

    Sorry, wrong copy&paste. This is the link to my repository, you can find the files under pidgin-gtalkinvisible link :-)

    Reply

    Raje Reply:

    @frasten,

    does this work in jaunty? I’m trying to install this on a system running Jaunty 64 bit and the 64 bit deb file doesnt work.

    Reply

    frasten Reply:

    @Raje,
    I’ve just built the packages for jaunty, but I can’t test if it actually works under 64bits, I’ve only created the deb packages.

    Reply

    Alex Reply:

    @frasten, Hi frasten.
    I installed the .deb file for i386 and when I try to enable it in Pidgin it get the error “ABI version mismatch 2.6.x (need 2.5.x)” I’m using Pidgin 2.5.8.

    Reply

    frasten Reply:

    @Alex, can you please try this package?

    Reply

    frasten Reply:

    @Alex, Silly me, I meant this package =/

    Reply

    smiki Reply:

    @frasten,

    had the same problem but this latter package works
    (using pidgin 2.5.5 ubuntu intrepid 8.10)

    Reply

    frasten Reply:

    @smiki, Thank you for reporting :-)

    Reply

  2. Hi, was searching this for quite some time! thanks a lot!!!! This works beautifully!!!
    Small request if I want add another XXMP, have u any work around for that?
    Smiles,
    Muthu

    Reply

    Fahhem Reply:

    It doesn’t crash if there’s more than one XMPP account, it just doesn’t work for one of them.

    To update the plugin, one just has to replace some of the lines with calls to GList functions and iterate over a loop. It’s pretty trivial if they know how to use GTK+ tools (I don’t).

    Reply

    Muthu Reply:

    Thanks for the prompt reply :)
    But the problem I faced when I was using two accounts was, I went offline but could not receive any messages from other persons. When I restarted the pidgin, I received those messages as offline messages! Any thoughts?

    Reply

    Fahhem Reply:

    Well, this plugin is for going invisible, not offline. Try going Invisible instead.

    Reply

    Muthu Reply:

    Hey I actually meant- When I chose invisible, i went invisible. When other person pinged me, I was not able to get the message. This was when I had two XMPP accounts.
    After I deleted one of the XMPP accounts, this worked fine. so thought would there be any modification required for the making one account go invisible when I have two accounts,

    Reply

    Fahhem Reply:

    The plugin adds the ability to go Invisible to the Jabber protocol in general, but only does the actual work (it has to send some text) for one of the accounts. I don’t think it does anything for the other account, so I’m not sure what’s happening.

    Reply

  3. Hi, Im having some issues with this plugin. It seems to work fine, but if I change my status to online, and then back to invisible other people can still see me as online. Im using franten’s repo.

    Reply

    Fahhem Reply:

    There’s nothing in the code that would remember whether you’ve gone invisible before or not, it runs the same code every time you go invisible. Do you have more than one XMPP/Jabber/GTalk account?

    Reply

    TrD Reply:

    Hello, thanks for the reply. I had 2 accounts, one gtalk and the other xmpp but I removed one and now I only have one account.

    Reply

    Fahhem Reply:

    Did you do the above test with one or two accounts? Also, how did you “remove” the other account? It may still cause problems, I’m not too sure about how Pidgin handles disabled accounts.

    Reply

    TrD Reply:

    I tested it with one account only. The other is not disabled, I removed it from the “Manage Accounts” menu. In this menu I only have one msn account and one xmpp (gtalk) account.

    Reply

    Fahhem Reply:

    I currently don’t have my normal computer, but once I get it back I’ll test it. Until then, could you check to see if this is consistent behavior? As in, does it fail to go invisible after one time, every other time, randomly?

    Reply

  4. I’ve been testing it and it doesnt happen every time, it seems random. And sometimes my gtalk contacts stay connected forever when im invisible, even if they are offline. I dont know if this is related to the plugin.

    Reply

    Fahhem Reply:

    can you get the XMPP Console plugin and view the XMPP data while going invisible and visible? When you go invisible, you should see two blocks, each with a 5 block and the second should say type=’unavailable’. Let me know if that shows up when you don’t go invisible.

    Reply

  5. I’ve removed pidgin and reinstalled and now all is working fine. The only thing missing is invisibility at startup, i hope that you are working on this feature, if it is possible to implement. Thank you for the plugin.

    Reply

    Fahhem Reply:

    I’m pretty sure frasten got Invisible to work on start up. If not, I’ll look into it.

    Reply

    Colin Reply:

    @Fahhem, any luck with this? I am using pidgin at work on windows with your 0.9 plug-in and it doesn’t go invisible on start up.

    Thanks,
    Colin

    Reply

    Fahhem Reply:

    @Colin, I haven’t changed anything, no. You just have to go Available then Invisible when you start up Pidgin. Sorry.

    Reply

    Colin Reply:

    @Fahhem,

    Thanks. I tend to get the odd drop-out and auto-reconnect puts me back on “visible”. A touch annoying when I get a message from the boss, when I thought I was invisible :-)

    Reply

    Colin Reply:

    @Fahhem, just looking at the source code and the purple library, wouldn’t it just require registering your “plugin_invisible_cb” function to the purple_signal_connect event “signed-on” as well as your “account-status-changed” event?

    Reply

    Fahhem Reply:

    @Colin, Thanks for commenting on that. I’ve added it in my experimental branch, when I eventually push it, how would you like credit? Your name, full name, some nickname, etc?

    Reply

    Colin Reply:

    @Fahhem, Great. Colin Enticott is fine, thanks :-)

    Reply

  6. I don’t think that’s how google talk does it. Not anymore, at least. You have to repeat the thing over and over if you want to see users’ updates. And, after you do that, you need to send a message to your buddy in order to him to be able to send you a message back. So it’s kind of broken.

    Reply

    Fahhem Reply:

    @Rafael, If you could provide some more details, I’d be happy to incorporate it into the plugin.

    What I’ve got is that I have to send something to the server every once in a while to see any updates.

    For the sending a message bit, I’m able to send messages to invisible buddies that use the official gtalk program. Are you sure that holds true?

    Reply

    Rafael Reply:

    @Fahhem, I haven’t used your program, I found your blog when I was implementing a similar feature to pidgin. Sending made it go online and then offline on pidgin clients. So I couldn’t use that, I had to send a probe to each buddy. If I allowed it to sit there as unavailable for a long period of time, then buddies eventually weren’t able to talk to me if I didn’t send a message to them. I’ve both implemented that and tried it on xmpp console, both with the same results. I see no reason why it would be different with your plugin, although I really haven’t had the time to test it :-(.

    Reply

    Fahhem Reply:

    Are you implementing it into Pidgin officially?

    Well, please let me know what you eventually find out. I’d be glad to provide a sort of backward-compatibility plugin if it does eventually go mainstream.

    Reply

  7. Hi,
    I’d be happy to use the plugin, but it simply doesn’t work for me. I’m using Pidgin 2.5.8-2. The plugin is on the plugin list and I have only one Jabber/XMPP/GTalk account – Google one that is. I don’t have “Invisibile” on status list in Gtalk account. What’s wrong?

    Reply

    zyguli Reply:

    I use Fedora 11.

    Reply

    Fahhem Reply:

    I’ve never tested this on Fedora, but I never got this problem. The plugin adds “Invisible” to the list of status for the XMPP account when it starts up, then when you choose Invisible it sends some messages to the server.

    Could you try closing Pidgin with the plugin enabled and then restarting it? Let me know if you have Invisible in the list now.

    Reply

  8. Well, I have the plugin active all the time and since installing, I had restarted many times. No luck here.

    Reply

    Fahhem Reply:

    @zyguli, sorry. I don’t have any idea why this would happen. This is a very simple plugin and one line of it specifically adds Invisible to the statuses of the XMPP account.

    Reply

    Vishesh Handa Reply:

    @zyguli,
    I seem to be facing the same problem. I’m using Kubuntu 9.10. :-(

    Reply

  9. Hi Fahhem,
    Is there a way for me to use your plugin with Adium? on Mac?
    I’d be glad to test it out if that’s a possibility.
    Good job on the plugin regardless.
    Cheers!

    Reply

  10. Hi Fahhem,

    Thanks for this plugin! A few things I came across:

    * The plugin would crash as soon as I changed my status to “Invisible” in the current version of Pidgin 2.6.4 on both Windows 7 and Ubuntu 9.10. I tracked it down to a seg fault in plugin_invisible_cb() around line 133. This fixed it for me:

    PurpleConnection *gc = purple_account_get_connection(account);

    * Also, using and does not work. Setting the presence to unavailable will stop the account from receiving presence updates and google:mail:notify will only check for new mail, not refresh the account’s roster. The documentation for the XMPP invisibility command can be found here: http://xmpp.org/extensions/xep-0186.html. I’m trying to figure out how to adapt this to your plugin–if you make any progress, please let me know.

    Thanks again!

    Reply

    Fahhem Reply:

    @Jason Croft, sorry about that segfault. I must have missed that when incorporating a patch. A new version has been uploaded with your change added.

    * My plugin is only for the GTalk Invisibility command because the base of Pidgin developers refuse to add the functionality because Google went off-standard to add invisibility. If the standard you mentioned didn’t say “Implementation of the protocol described herein is not recommended.” at the top I would have considered it more.

    Reply

  11. Right right, my mistake–it appears Google’s implementation for invisibility does not use one of the several proposed XMPP standards. The only method that seems to work is , but I do not believe querying google:mail:notify will update the buddy list, rather it will only notify of new emails.

    Reply

    Fahhem Reply:

    @Jason Croft, it seems you tried to type something after “that seems to work is” but WordPress removed it? What was it?

    The google:mail:notify probably does check new mail. If you know of a way to update the buddy list, I’ll try to add that in so the buddy list doesn’t go stale for more than a minute or so.

    Reply

    Jason Croft Reply:

    @Fahhem, oops, yes, it cut off an xml statement, the one you use in your plugin that uses google:mail:notify. I’ve tried this command using the XMPP console and it did not appear to update the buddy list. Unfortunately I don’t know of any way to force an update for the buddy list once the presence has been set to unavailable, since this alerts to stop all update notifications. The closest hack I’ve found is to set the presence to available, receive the updates, then set it back to unavailable. I’m trying to look over the XMPP RFC to see if there is a better way and I’ll let you know if I find anything.

    Reply

  12. For me it’s not working. I get invisible but my buddy list becomes static, so to me there is no difference between closing pidgin or become invisible.

    Is this normal or i’m the only one with this issue?

    Thanks for your work!

    Reply

  13. Hi,

    I want to point out one change, the path of the plugin folder is different in Ubuntu from the one that you have mentioned. It is /usr/lib/pidgin for Ubuntu Karmic Koala 10.04.

    Reply

  14. Hello,

    I am using Ubuntu karmic and pidgin 2.6.5 and the plugin version is .922. I am facing one problem, but am not sure about the reason. It often happens that although I have set invisible status, after sometime due to some reason my status is visible to others. For example, I set the status to invisible at evening time, and it worked. Now I keep the machine running and go off. When I come back in the morning, I see that people have pinged me claiming that I am online and visible to others.

    Reply

    marcho Reply:

    @Swarnendu Biswas,

    I’ve notice same thing ;)
    any workaround?

    Reply

  15. Hey guys,

    I’m running Arch Linux and Pidgin 2.6.5.
    I’ve moved the .so file to my Pidgin plugins
    directory, and it appears in the plugin list
    but I can’t seem to enable it. If I click on it,
    the checkbox beside it doesn’t become
    checked and the invisibility option doesn’t
    appear in the gtalk status list.

    Is anyone else experiencing this?

    Reply

  16. This is a great plugin! One issue I’m having, of which you may already be aware: it doesn’t work properly at startup. That is, if you go straight from “offline” to “invisible”… something goes wrong and Google Chat will complain that “you are using a client which doesn’t support invisibility blah blah blah.”

    I looked at the C source code and I see that the implementation is pretty straightforward: you send the necessary XMPP commands to turn on invisibility whenever the account status is changed to Invisible.

    It may be that a different technique is needed when the previous status was Offline. I’m not sure exactly how to figure out what this should be… perhaps someone has a trace from an official Google client that shows how to do it properly?

    Reply

    Dan Reply:

    Okay, I modified the code to fix this issue. Modified source code here:

    http://tonquil.homeip.net/~dlenski/gtalkinvisible.c

    Now it will properly enable invisible mode when you first sign on. What do you think?

    Reply

    undrline Reply:

    @Dan, could you compile your mod as a windows binary dll? I’m having some trouble doing it myself.

    Reply

    Dan Reply:

    @undrline: Sorry, I don’t know how to build DLLs for Windows. I use Linux exclusively…

    Reply

    Dan Reply:

    A couple outstanding issues, since I can’t figure out where else to send ‘em :)

    With my patch, there’s a very brief blip of non-invisible-ness immediately after sign-on, unlike with Chat in Gmail.

    With this plugin in general, the invisible-ness sometimes seems to “wear off”. I assume that Pidgin sends some XMPP commands to update presence information, and doesn’t know to signal invisibility as desired. I don’t know enough about XMPP to know how to fix this. Anyone?

    Reply

  17. I am also unable to enable the plugin in 2.6.5 with the new modified source code. Maybe I’m compiling it wrong? Please advise. Thanks!

    -George

    Reply

  18. Thanks so much! I’ve been looking for this forever! Finally I can constrain one more distraction while I am work but not being logged into my email!

    Reply

  19. I came across what seems like a bug just a few minutes ago. Pidgin was minimized to the tray for awhile, so I was inactive as well as invisible. When I brought it back to the forefront and IMed someone on gmail, I became Available, and I could not reset my invisible status until I signed off and back on. Does have anything to do with also trying to be logged onto AIM and invisible there? My IM was to someone on gmail.

    Anyway, just thought I’d mention it. Thanks again for providing support. I’ll donate a small price for your trouble when I can (in the middle of finding a new place to live, so not now).

    Cheers

    Reply

  20. I have problems with pidgin 2.6.5
    i am on ubuntu 9.10 and i moved the gtalkinvisible.so file to /usr/lib/purple-2
    but the plugin does not appear in the list.
    am i doing something wrong?

    Reply

  21. Hufff sorry
    I can see “invisible” in change status menu.
    but when i connect to an xmpp account, its not being shown.
    “invisible” option is available when i tick other accounts like aol.

    Reply

  22. I have problems with pidgin 2.6.5
    i am on ubuntu 9.10 and i moved the gtalkinvisible.so file to /usr/lib/purple-2
    I can see “invisible” in change status menu.
    but when i connect to an xmpp account, its not being shown.
    “invisible” option is available when i tick other accounts like aol.

    Reply

  23. Hi Fahhem,

    Thanks for doing this – it’s been something that’s irritated me for quite a while! Unfortunately one of my machines is a mac…

    I see you list Adium as being compatible.. However, after quite some searching and fiddling, I can’t seem to get it to work. Do you have any idea where I should put the .so?

    I have a directory tree listing of both the /Applications/Adium.app and ~/Library/Application\ Support/Adium\ 2.0/ I can mail you if that would help.

    ~ Jono

    Reply

    Joseph Reply:

    @Jono, Has anyone gotten this to work with Adium on Mac OS X? I’m not sure where to put the file. I do not have Pidgin as a stand alone app.

    Reply

  24. Thanks for the effort. However, the plugin does not work at all for me no matter if I am using only gmail account or with other accounts on pidgin.

    http://chinmaykamat.wordpress.com/2010/01/22/google-talk-invisible-mode-in-pidgin/
    The method described in the above link works but it requires sending several messages to the XMPP console (they are different than the messages posted in the ticket.)

    And I found another patch which works for pidgin 2.5.8 but since i’m using 2.6.6 I don’t bother to recompile my pidgin to implement the patch.
    http://developer.pidgin.im/attachment/ticket/4509/gtalk-invisibility.patch

    It would be greatly appreciated if you can fix your plugin / explain more in detail how to get it working.

    Reply

    Fahhem Reply:

    @Karen,

    Thank you so much for bringing this to my attention. This was only supposed to be a quick plugin for semi-working invisible but due to the extreme need for it I’m getting many comments that I can’t respond to. Using your first link, I will try to update my plugin to work correctly.

    Reply

  25. a bit of explanations:
    – this plugin does not implement any proposed standard for invisibility (like XMPP-00186 or by implementing XMPP-0016), it’s a simple ‘workaround’ not completely correct.
    – the only ‘correct’ way to implement invisibility in google talk is by using shared status that cannot be implemented via plugin. It requires a patch to libpurple like those in http://developer.pidgin.im/ticket/4509
    – what this plugin do is to change presence to unavailable. In this state, presence update from other contacts will not be sent to your account becouse they believe that your account is ‘unavailable’! The only way with this method to keep buddy list up to date is to send to every contact a presence probe (just like a polling).
    Hope this can help to understand the situation…

    Reply

  26. —–Original Message—–
    From: daniel.atallah@gmail.com [mailto:daniel.atallah@gmail.com] On Behalf Of Daniel Atallah
    To: Rui Araujo
    Cc: support@pidgin.im
    Subject: Re: Error opening Pidgin

    On Wed, May 5, 2010 at 12:15, Rui Araujo wrote:
    > I got a Windows error when I executed Pidgin after a trashfiles cleanup and windows update.
    > The error shows up and when I respond to it, the Pidgin aborts and ends…
    > I cannot use Pidgin since that time.
    > I tried to re-install pidgin but the problem continues…
    > Can anyone help?

    It looks like it is crashing in the “gtalkinvisible” plugin (which is
    a third party plugin that I’m not familiar with).

    Delete …\Pidgin\plugins\gtalkinvisible.dll and see if that fixes the crashing.

    If not, see the instructions at
    http://d.pidgin.im/wiki/TipsForBugReports for how to get a crash report

    Reply

  27. The plugin causes Pidgin on Windows to crash when setting the global status to “Offline.” This happens consistently, at least in Pidgin 2.7.0 and an earlier version (2.6.x). It is not necessary to be invisible prior to going offline in order for the crash to occur.

    Reply

  28. Using pidgin 2.7.3
    When I enable the plugin, it works, but then crashes when I quit and restart pidgin. Then I’ve to remove the plugin from ~/.purple/plugins

    OS: Arch Linux 32 Bit

    Reply

  29. Dude, I found the bug & fixed it.
    In plugin_invisible_cb, line 133,
    gc seems to be NULL when pidgin starts.
    So after assigining gc,
    I added one line:
    if(!gc) return;
    It works.

    Reply

    Fahhem Reply:

    @Nilesh, Thank you for the bug report and patch, I’m outputting v.923 with your changes now.

    Reply

  30. Fahhem

    Thanks for this great plugin. I was really wanting this. But its now supporting multiple account. I have three Google accounts configured on Pidgin 2.7.2 on Windows 7.
    Secondly when my friend sending offline message from his Gmail account, it’s not reaching my account which was invisible.

    Reply

  31. Hello thanks for your time creating the plugin

    I`ve noticed that when invisible the status of the contacts isn`t updated

    Am i doing something wrong here ?

    Reply

    Fahhem Reply:

    No, that’s the current status of the plugin. There are a few suggestions on how to fix it, but as always patches are welcome.

    Reply

  32. I cant use this plugin I dont know if because I am using Ubuntu amd64 but my pidgin doesnt detect this plugin. I put it in .purple/plugins and It detects others but not this.

    Thank you

    Reply

    Fahhem Reply:

    I didn’t upload a 64-bit version of the plugin, if someone else has a 64-bit compiling setup they can contact me with the binary and I’ll add it.

    Reply

    Khushman Reply:

    @Fahhem,
    I have a 64 bit compiled plugin, if you could email me at the provided address( while submitting the comment ), i’ll be glad to share it with you. I can’t seem to find your email anywhere.

    Reply

  33. Hello

    Is there a plugin for windows which will update the status of friends even in the invisible mode in gtalk.Or can any one point me how to update the plugin for windows .

    Reply

  34. Hey, i’ve solved the startup issue.
    I work on a linux 64 bit system so have it compiled for that only.
    You can see my code here.
    And probably update your package if you see fit.

    Reply

    Fahhem Reply:

    Thanks! I’ve put your code up and recompiled everything.

    Reply

  35. There is no .dll in the current/updated .zip file provided as of 2011-11-27, just to let you know. It is only the c source and the linux .so library.

    Reply

    Fahhem Reply:

    Yeah, I’m still trying to re-setup my Windows compile environment. I’ll let you know when/if I do.

    Reply

    NotEmul8d Reply:

    Thanks! I’m sure I won’t be the only one that appreciates the effort. :)

    Reply

    Fahhem Reply:

    Okay, fixed it.

    Reply

  36. Gday

    I use speeddate.com, and have downloaded your plugin for gtalk, and pidgin have set it to appear invisible.

    However my friends are telling me that it looks like I am online on the site 24/7. Which I am not.

    I have disabled gtalk in gmail, yet I am still appearing as online on speeddate.com.

    Is there a fix for this?

    Reply

    Fahhem Reply:

    @Fiery, this was made specifically for google-talk. Speeddate.com likely uses a different way of signalling invisible, which will need a different plugin. This plugin only activates for gtalk accounts anyway.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>