77

How can I install Whatsapp web app on Ubuntu? I found a similar question How to install WhatsApp?, but here I am asking for the WhatsApp desktop webapp so that I can directly access the application without opening a browser.

Zanna
  • 70,465
Ravan
  • 9,379
  • WhatsApp Web is the only finest solution out of all as, whatsApp don't have their official distro for linux i.e ubuntu etc. – Haisum Usman Nov 20 '19 at 08:03
  • 1
    Its 2023 and I am still quite confused as to why they don't support Linux. It's not like Microsoft's situation who don't provide MS Office on Linux (as that can cause a loss of their market share). – Anshuman Kumar Feb 19 '23 at 06:11
  • I don't have sufficient rep. yet to put this in an answer so... If you do have Google Chrome installed you can: go to WhatsApp Web; open the Chrome application menu; click on "Install WhatsApp Web". This will give you a native application-like experience. Yes, it is still using Chrome under the bonnet, but WhatsApp is presented in its own, minimal window and behaves like an Ubuntu app in most other regards. – Holf Aug 25 '23 at 09:50

9 Answers9

97

‍♂️ 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/"
yEmreAk.com
  • 1,289
  • 7
    I wish I could +1 for every nugget that I learned from this post. I had no idea this system even existed in Ubuntu. – drmuelr Jul 01 '19 at 17:05
  • 1
    If you want to do this basicly from CLI, download this script https://drive.google.com/uc?id=1anlXv7obm3ahy7pJmsd7XC7EmN46iHYm , and if you want to make shortcut to open | toggle some app (with WM_Class), take a look my script which is https://stackoverflow.com/a/56327729/9770490 – yEmreAk.com Jul 02 '19 at 06:16
  • 2
    well, only /opt/google/chrome/google-chrome --app=https://web.whatsapp.com/ this much is enough for me, Thanks – Mohammed Sufian Oct 03 '19 at 07:56
  • 1
    This should be the accepted answer! – Gangadhar Jannu May 03 '20 at 20:25
  • 3
    If anyone see 'update your browser' warning, you have to update --user-agent-string on line 6 with the updated user agent string. Use http://useragentstring.com/ to get your current browser user string – Gangadhar Jannu May 03 '20 at 20:27
  • 1
    Accept this answer please! – zimmerbimmer May 18 '20 at 04:46
  • Could you please add a link or something and mention what this is known as? This did not seem to be Electron or Chromium Embedded Framework (CEF) to me, but I'm not so sure yet – Eagle Oct 28 '20 at 00:33
  • how do i change the icon of the application? – Thulashitharan D Nov 02 '20 at 08:36
  • Uncomment Icon line and add path of your icon like: Icon=~/wapp.png – yEmreAk.com Nov 02 '20 at 16:26
  • You can add the icon by adding this line Icon=[path to your icon] – Praditha Jan 15 '21 at 03:08
  • 1
    Just in case this doesn't work for others on the first try: 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. Replace that path with the output of which chromium-browseror which chrome. Note that Firefox will not work without further modification since Firefox lacks the --app option that Chrome has: http://manpages.ubuntu.com/manpages/xenial/man1/chromium-browser.1.html – ascendants May 10 '21 at 00:54
  • one of the few ubuntu answers that work exactly as explained in this answer. updated my chrome version to 91 and hurray. – Gautam Jun 08 '21 at 03:31
  • When I executed the very first step of these instructions (sudo -H gedit ...) I get the warning: (gedit:7359): dconf-WARNING **: 20:23:10.332: failed to commit changes to dconf: Failed to execute child process “dbus-launch” (No such file or directory). Is it safe to proceed? Has anyone faced the same? – Bruno Ambrozio May 28 '22 at 19:27
  • As far as I understand -H is useless in sudo command for the current usage, am I wrong? If not, editing the answer accordingly would make sense. – Benjamin Loison Jan 20 '23 at 21:12
  • why not just install a PWA ? – Anurag Parmar May 12 '23 at 19:38
  • Does this allow calls? – Jaideep Shekhar Mar 03 '24 at 20:58
62

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

Ravan
  • 9,379
  • 16
    after some days, this becomes full of commercial adverts. – Débora May 21 '16 at 14:50
  • 41
    This is not an official distribution. – Sachith Muhandiram May 10 '17 at 18:48
  • 4
    Unfortunately, this is exactly what Ravan does not want ("without opening a browser"). That WhatsApp command just starts Google Chrome. And, on top of that, Google Chrome is a Trojan Horse. – Papou Dec 17 '17 at 20:21
  • 1
    @Papou This answer was written by Raven so.. I assume they know what they want ;) Can you elaborate on the trojan horse? I inspected the .deb file and it's just a .desktop file that opens the browser to web.whatsapp.com – Seth Jul 01 '18 at 16:51
  • 6
    Do not install this, it's not official as well it's not open-source. – Gaurav Gandhi Dec 24 '18 at 04:34
  • If someone has actually validated the contents of this Debian package and is willing to vouch for it (e.g., Seth vouched for it above), please provide either an md5sum, sha1sum, or sha256sum of the DEB file you reviewed so future readers can verify that the version you are vouching for is identical to the version they downloaded. – Spencer D May 19 '19 at 22:33
  • @SpencerD Can vouch as well. You can extract the .deb yourself. It's just some package info a changelog, icons and a .desktop file. – NullDev Aug 08 '19 at 16:52
  • The right answer should be this one – yEmreAk.com Dec 28 '19 at 22:25
  • 2
    do NOT install .... who knows what this thing does – Mr.P Jan 12 '20 at 08:32
  • The command not working for me – Dinith Aug 02 '20 at 08:57
  • 1
    DONT use this. Use the most voted answer before this one from @Yedhrab here -https://askubuntu.com/a/1144265/898692 – Gautam Jun 08 '21 at 03:38
51

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

Débora
  • 629
  • 1
  • 6
  • 5
  • What I dont understand is why this answer is not the top one. And a possible security threat is the top voted answer ?? – ForeverLearner Jan 01 '19 at 14:40
  • 9
    Because the question specifically asks for a desktop app, not web browser :) – Nagabhushan S N Jan 20 '19 at 13:52
  • Does not work... requires having a "phone" to "Scan the QR code" – Michael Aug 30 '19 at 21:20
  • May I add, you can then go to tools and create shortcut as a window. It becomes an application and shows in the application list. – Bernard the Bear Dec 20 '19 at 18:11
  • 1
    @Michael yeah, whatsapp is only a phone app. You cannot run WhatsApp without having a phone. – Aurelius Dec 28 '19 at 23:13
  • @NagabhushanSN - Is there a major difference between the desktop app and the web page running in a browser (especially one in "web app" mode; even Midori has that)? Can the "desktop" app do more? – cipricus Apr 14 '20 at 09:29
  • @cipricus may be not, except convenience (that depends on the user). I just said this answer is not top voted, because it doesn't answer what is asked. Note that, in one of the answers that the questioner tagged has whatsapp web solution. So, I guess the questioner knows about whatsapp web and is interested to know if there is a desktop app for ubuntu. – Nagabhushan S N Apr 14 '20 at 16:02
  • 1
    @NagabhushanSN - after trying for some time the desktop app (WALC, appimage), I find it much better than the web page; the former stays connected, while the latter disconnects often, asking for the phone app to be re-opened. – cipricus Apr 28 '20 at 19:51
  • 1
    @Michael actually, you may install whatsapp into an android-x86 virtualbox machine, then use your 'phone' to activate it via sms (whatsapp requires sms-verification), then use your webcam to activate web.whatsapp.com by scanning the qr code from browser into webcam attached to virtualbox - this works for me, no smartphone with camera needed - desktop with webcam is sufficient. this works even on ubuntu for me – whyer Jul 20 '20 at 10:16
  • @whyer can you explain what you mean by "use your 'phone' to activate it via sms"? how do you do this in an android virtualbox? – Michael Jul 20 '20 at 20:31
  • @Michael whatsapp requirement is: install mobile app on a smartphone with working camera, keep the smartphone on (and whatsapp app running) while you use the web version. i suggest lower requirements: install mobile app on a desktop with working webcam (and android virtualbox), using your sim card that can receive sms, and then keep the virtual machine up while you use web version. my method allows you to use a simple phone just once during installation and authentication, not a smartphone every time you use the web version - for me, it is much more convenient. and for you? – whyer Jul 22 '20 at 10:06
  • 1
    @Michael see my comment above (i forgot to mention you when posting it). and also i want to mention that my method allows you not to have a phisical phone at all - you just need a phone number and the ability to receive an sms on it. some services allow you to buy virtual sim cards - this is sufficient for my method. this is why i put the word 'phone' in quotes – whyer Jul 22 '20 at 10:09
  • @Michael and to clarify the process: 1. install whatsapp mobile app on virtualbox. 2. it asks you a phone number. 3. enter yours. 4. whatsapp will send sms. 5. the app will try to automatically receive it inside the vm - but will fail. 6. it will ask you to manually enter the code. 7. you receive your sms on your number. 8. you enter the code manually into vm. 9. etc – whyer Jul 22 '20 at 10:13
  • 1
    @Michael my main point was to correct Aurelius. they said: "You cannot run WhatsApp without having a phone" - this is actually not true. you cannot run whatsapp without having read access to phone number that can receive sms. you don't have to have a phone device - this is the point. – whyer Jul 22 '20 at 10:23
4

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.

Lucas
  • 665
  • For me this is the best option. Comes as apppimage, no new repo and no installation required. Works in my 18-04-based distro. Unlike the whatsapp web page, which disconnects and forces re-opening of the phone app very often in order to re-connect, this stays connected after the initial procedure. – cipricus Apr 29 '20 at 21:11
3
Unknown Bug: This solution may result in high cpu load for a single thread

WhatsApp Web Application

On GNOME/Ubuntu Desktop without installing any additional software

enter image description here

The Web Application feature of Gnome Web (formerly known as epiphany-browser) can be used to create your personal container for WhatsApp.

  • Automatic icon generation
  • Separate container, window, app
  • Always up-to-date via package-manager

Steps to configure:

  1. Open Gnome Web and go to https://web.whatsapp.com
  2. Select 'Install Site as Web Application' from the burger menu
  3. Name the app as you like e.g. WhatsAppWeb or Whatsie

I recommend to log out from all devices, then open the created desktop app.

enter image description here

  1. Finally scan the QR code.

Remove WebApp:

Type about:applications in GNOME Web address bar to manage/remove Web Appliactions

Details:

By habit, mine is called "Whatsie" and the process creates the file ~/.local/share/applications/epiphany-whatsie-eeb...321.desktop

Official website: https://wiki.gnome.org/Apps/Web/

Official instructions: https://help.gnome.org/users/epiphany/stable/browse-webapps.html.en

Please, be careful installing apps from sources you don't trust!

2

This is an old question but now I need to use WhatsApp in my Ubuntu environment, and I found this solution based on a third-party WhatsApp Linux Client called Whatsie. This client works for Debian 8, Ubuntu 16.04 LTS and Linux Mint 18. Whatsie is a simple but helpful wrapper for WhatsApp Web, available for Linux, Mac OS X and Windows.

How to install Install Whatsie?

The recommended way to install it is through the latest deb package.

Ubuntu, Debian 8+

  1. Download whatsie-x.x.x-linux-arch.deb
  2. Double click and install, or run this command in the terminal:

    dpkg -i whatsie-x.x.x-linux-arch.deb

  3. Start the app with your app launcher or by running whatsie in a terminal

You can also use apt

  1. Open a terminal window, then download the gpg key to make sure the deb you download is correct:

    sudo apt-key adv --keyserver pool.sks-keyservers.net --recv 6DDA23616E3FE905FFDA152AE61DA9241537994D 
    
  2. Add the author’s repository to your sources list by running the following command. :

    echo "deb https://dl.bintray.com/aluxian/deb stable main" | sudo tee -a /etc/apt/sources.list.d/whatsie.list
    

    Replace stable if you want to pick another channel like beta or dev (pick stable if you're unsure).

  3. Finally, update local package index and install Whatsie:

    sudo apt update
    sudo apt install whatsie
    

Once installed, you can start Whatsie from Unity Dash or Application Menu.

karel
  • 114,770
Teocci
  • 4,665
1

I used Applicationize.me to install WhatsApp web (and other web apps) as a Chrome apps.

Just enter the URL http://web.whatsapp.com/ into the field, and it will create a downloadable extension that you can drag to Chrome's extension window (chrome://extensions/).

You can find the newly installed app on Ubuntu's app launcher.

RZKY
  • 131
1

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

Zanna
  • 70,465
0

General Notice: There is no official WhatsApp desktop app for Linux. That's why it is more secure to use one of your favorite browsers and create a web app using the official https://web.whatsapp.com service. Third-party apps from non-trusted sources may flood you with ads, hijack your session or introduce a backdoor to your client. Even if they currently don't, you can't be sure in the future. Please do not use the "accepted" answer!

You might choose one of the following:

  • Web, the default Gnome browser (formerly known as epiphany), which would be my favorite, if someone fixes the cpu load issue. The WebApp feature is very advanced, e.g. you can configure cookies, tracking and ad blocking and even css style can be modified. Described in more detail here: https://askubuntu.com/a/1156446/45131

  • Brave, (Ungoogled-)Chromium, Chrome and Edge browser works exactly the same. No one is wondering, because under the hood they are quite similar. Go to the hamburger menu > More tools > Create shortcut and make sure you tick the checkbox "Open as window". This is also described here: https://www.techrepublic.com/article/how-to-create-web-apps-for-the-brave-browser/ Btw.: At time of writing Edge from flathub does not run on Fedora 38 using wayland.

The post with "most votes" is definitely overrated, because it is basically the same, explanined more complicated. Because in the past you had to create such .desktop files manually, which is no longer the case for browser shortcuts.

Firefox had an experimental feature, but they dropped it ( https://www.thurrott.com/cloud/web-browsers/mozilla-firefox/246039/tip-use-firefox-for-web-apps). If you can live without having a separate window you may pin the web.whatsapp.com tab and create and/or use a simple bookmark.

Of course you can do the same with other web sites. Although for other messengers you may better look for well-maintained linux clients, e.g. Signal, Threema, Element, Slack, ...