Install WhatsApp webapp on Ubuntu

πŸ’β€β™‚οΈ You can create your own whatsapp app

πŸ—οΈ Creating Your Own Whatsapp Desktop App

  • πŸ‘¨β€πŸ’» Type terminal sudo -H gedit /usr/share/applications/whatsapp-webapp.desktop
  • πŸ“‹ Copy following text to opened screen

πŸ“£ This answer assumes that you have Google Chrome installed, and that it is at the path /opt/google/chrome/google-chrome which may not be the case for everyone (thanks ascendants)

  • πŸ’‘ Δ°f you using Chromium, you need to change /opt/google/chrome/google-chrome with your Chromium path
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=WhatsApp
GenericName=WhatsApp
Comment=WhatsApp desktop webapp
#Exec=webapp-container --store-session-cookies --webappUrlPatterns=https?://*.whatsapp.com/* --user-agent-string='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36 Edg/85.0.564.44' https://web.whatsapp.com %u
Exec=/opt/google/chrome/google-chrome --app=https://web.whatsapp.com/
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
# If you want icon, type path of icon
# Icon=
Categories=Network;Application;
Keywords=WhatsApp;webapp;
X-Ubuntu-Gettext-Domain=WhatsApp
StartupWMClass=web.whatsapp.com

πŸ“’ If anyone see 'update your browser' warning, you have to update --user-agent-string on line 6 respect to User Agent String (thanks Gangadhar Jannu)

⌨️ Making keyboard shortcut (Optionally)

You can follow the instructions below or just look my other answer about Making Shortcuts topic.

wmctrl command used for focus or create app, type sudo apt install wmctrl to install it

  • βž• Open shortcut window, click + the bottom of the window
  • πŸ”¨ Set name Whatsapp Chrome
  • πŸš€ Finally, keyboard shortcuts to open | create
bash -c "wmctrl -xa web.whatsapp.com || /opt/google/chrome/google-chrome --app=https://web.whatsapp.com/"

NOTICE: It is NOT SUGGESTED to use this mechanism as this is not an official application and may be laden with adware or other malware.

The answer is left here for historical reasons however it is recommended that you DO NOT follow this answer's instructions.

Instructions:

  • Download the WhatsApp webapp DEB installation file from the link here

  • Double click on the DEB file to open and install with the Ubuntu Software Center, or from the command line with:

      sudo dpkg -i whatsapp-webapp_1.0_all.deb
    
  • SelectΒ WhatsAppΒ from your Dash or Applications menu to start.

Imgur

  • Now Scan the QR code with your phone using the WhatsApp application.

reference here


Best way I think is: https://web.whatsapp.com/ . It asks to open your whatsapp in your mobile and let it to scan the codebars to the phone. So, simply open your whatsapp in mobile> select the option whatsapp web > focus your phone camera to the monitor where the browser shows a codebar. That s all. Then Browser opens your whatsapp in itself. Nothing to install . Easy


I think the best alternative today is to use whatsapp-linux which is an Electron wrapper for WhatsApp's web: https://web.whatsapp.com/

You can find the latest version in the Release section of GitHub: https://github.com/cstayyab/whatsapp-linux/releases

It comes handily packed as an AppImage, so it's as easy as downloading, changing the execution permissions of the file and running it.


Some people face the problem that the App shows you some browsers you should install instead of working correctly. If that happens to you, this is the fix:

  1. Once logged in, go to:

    /.config/UnofficialWhatsApp/"Application Cache"
    
  2. Close the app

  3. Remove index file
  4. Change permission for Application Cache to make it inaccessible

    sudo chmod 000 "Application Cache"
    

Reference