WhatsApp on the Linux Desktop

Some genius created a cross-platform “client” for WhatsApp on the desktop. It’s not actually a stand alone client, since WhatsApp doesn’t provide an open API. Rather, it’s a wrapper for WhatsApp Web, the company’s own web client. I had some problems getting it to work, though. There seems to be a user agent related problem. WhatsApp Web wants you to use mainstream browsers, apparently. The initial login worked, but after a restart, all I got was this:

WhatsApp failed login

Somebody else reported the same issue, and while there doesn’t seem to be an official fix yet, the workaround was posted in the comments. It works by deleting the cache. On Linux, this can be found under ~/.config/UnofficialWhatsApp/Application\ Cache. Removing this folder fixes the problem, and you’ll be able to log in again. It’s a hassle, though, having to do that every time before you start the client, so I wrote a little script called “whatsapp”:

#!/bin/bash
rm -r ~/.config/UnofficialWhatsApp/Application\ Cache
/opt/WhatsAppForDesktop/UnofficialWhatsApp

I placed this in my ~/bin folder, then copied the desktop file from /opt/WhatsAppForDesktop/whatsappfordesktop.desktop to ~/.local/share/applications and edited it to point to ~/bin/whatsapp instead of the original location. For now this seems to be working.

Other than that, it works great.


Leave a Reply

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