How To: Use WhatsApp under Ubuntu
There are many ways to get WhatsApp Messenger to work on Ubuntu, some I have tried, such as a native WhatsApp replacement called WhosThere(Now Discontinued), or via emulator. You can read more about all that here: "WhatsApp and Viber in Ubuntu 13.04". But, we will now get WhatsApp to work using Pidgin, the universal chat client, whit a third party plugin called: whatsapp-purple. Due note that WhatsApp cannot be avtivated on your Desktop and Phone at the same time.
Yowsup is - simply put - A library to use WhatsApp from python. Not so simply put:
Yowsup is a python library that allows you to do all the previous in your own app. Yowsup allows you to login and use the Whatsapp service and provides you with all capabilities of an official Whatsapp client, allowing you to create a full-fledged custom Whatsapp client. - About Yowsup, github.com/tgalal/yowsup/
Yowsup depends on some packages, install them as follows:
sudo apt-get install python python-dateutil python-argparse. Codes below will download unpack, and open the Yowsup config file.
- wget https://github.com/tgalal/yowsup/archive/master.zip
- unzip master.zip
- cd yowsup-master/src
- cp config.example yowsup-cli.config
- nano yowsup-cli.config
You don't have to use nano, use an editor that you are most comfortable with. As you are editing the yowsup config file:
yowsup-cli.config, find the line phone=XXXXXXXXXX, type in you phone number with country code.
when you have done just that, we now have to make the file executable:
chmod +x yowsup-cli. When we are able to execute the file, we will request an authorization code:
./yowsup-cli --requestcode sms --config yowsup-cli.config.
After you received the code - usually in the following format: "XXX-XXX" - we will register it:
./yowsup-cli --register XXX-XXX --config yowsup-cli.config. It should display the information you need. In my case it displayed it immediately after running the command:
./yowsup-cli --register 503-417 --config yowsup-cli.config
Detected cc: 31
pw: EDITED OUT
price: € 0,89
price_expiration: EDITED OUT
login: EDITED OUT
Don't close that terminal window. I could not find the outputted information anywhere. Copy the information in the terminal like so: ctrl-shift-c. Save it somewhere yowsup.txt?
Now, we will install pidgin, and the pidgin-whatsapp plugin:
- sudo add-apt-repository ppa:whatsapp-purple/ppa
- sudo apt-get update
- sudo apt-get install pidgin pidgin-whatsapp
Select the WhatsApp protocol from, the drop down menu:
Your user name is your phone number, with country code, and password is in the file you previously copied and saved. pw: longpassword. Copy them both in, click add, then you should get all the groups you're in. Again, remember, this cannot work when you also have it activated on your phone. Either desktop, or phone, but not both, at the same time.
That was it. Hopefully in the future they will change the infrastructure so that both can be activated at the same time. Or even better, follow in the footsteps of Viber, and release a desktop client for Linux.