WhatsApp is likely one of the hottest messaging purposes on this planet, but for some purpose, they nonetheless don’t formally help the Linux platform with an official desktop utility. So, in order for you to use WhatsApp on Linux, you’ll want to make your personal utility.

On Linux, the most effective and quickest manner to create an internet utility is with the Nativefier program. To put in Nativefier, head over to this information and comply with alongside to learn the way to arrange WhatsApp on your Linux PC. Then, when Nativefier is about up, proceed with this information to learn the way to create your personal WhatsApp app on Linux!

Obtain the WhatsApp icon

Each program on Linux wants a correct icon. Since we’re making a WhatsApp net app for Linux, we’ll want to obtain the correct app emblem from the web. To do that, launch a terminal window by urgent Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, use the wget command to obtain the WhatsApp emblem to your own home listing (~).

wget  -O icon.png

Generate a WhatsApp Linux app

Now that the WhatsApp icon is finished downloading, we have now all the sources to create a brand new Linux WhatsApp app. To start out the creation course of, open up a terminal window and transfer the shell from the house listing (~) to the “/tmp” folder. The shell should be in “/tmp,” as its the most secure place to generate recordsdata that don’t want to stick round for very lengthy. Utilizing the CD command, transfer to “/tmp.”

cd /tmp

As soon as within “/tmp” you’ll want to create a construct folder. This construct folder will home all the sources for our WhatsApp program generated with the Nativefier device. To create the brand new construct folder, use the mkdir command under.

mkdir -p whatsapp-build

After creating the brand new “whatsapp-build” folder, you’ll want to transfer the terminal session into it, as Nativefier will probably be working in it within the “/tmp” folder. To maneuver to the “whatsapp-build” folder, use the next CD command.

cd whatsapp-build

Now that the terminal session is within the “whatsapp-build listing, you need to obtain a JavaScript file to patch the WhatsApp binary. With out this file, the WhatsApp net interface will refuse to work on Linux, and ask you to replace Google Chrome. To get the script, use the wget command under.

wget 

Now that the patch is finished downloading name Nativefier to generate a Linux-compatible binary centered round WhatsApp’s webchat interface.

nativefier -p linux -a x64 -i ~/icon.png --inject whatsapp_fix.js --single-instance 

Let the Nativefier utility generate the WhatsApp binary on Linux. It could take a few minutes. When the era course of is full, run the ls command within the “whatsapp-build” listing, and also you’ll see a sub-directory with the label of “whats-app-web-linux-x64”.

Rename the binary and folder

Now that the WhatsApp is created within the “whatsapp-build” folder, some recordsdata and folders want to be re-named, as Linux shortcuts don’t work as properly with convoluted folder names.

The very first thing that should be renamed is the WhatsApp binary file. Utilizing the CD command, transfer into the “whats-app-web-linux-x64” listing that has the “whats-app-web” binary, and utilizing mv rename it to “whatsapp.”

cd whats-app-web-linux-x64
mv whats-app-web whatsapp

After renaming the binary file within the generated app folder, the app folder itself wants to be renamed. Utilizing the CD command transfer again one folder in order that the terminal session is again in “whatsapp-build.”

cd ..

As soon as within the “whatsapp-build” listing, use the mv command to rename the generated app folder to “whatsapp.”

mv whats-app-web-linux-x64 whatsapp

As soon as the recordsdata are all renamed, use the mv command and place them within the /decide/ listing.

sudo mv /tmp/whatsapp-build/whatsapp/ /decide/

Be certain to replace the permissions of the “whatsapp” folder, or the app gained’t launch.

sudo chmod 755 -R /decide/whatsapp/

Creating the desktop shortcut

Now that the laborious half is over and we’ve efficiently generated a brand new WhatsApp Linux app, it’s time to make the desktop shortcut in order that it’s straightforward to launch WhatsApp from the Linux desktop.

Step one in making a WhatsApp desktop shortcut is to create the desktop file. Utilizing the contact command, create a file labeled “whatsapp.desktop” in “/tmp/whatsapp-build/.”

contact /tmp/whatsapp-build/whatsapp.desktop

After producing the desktop file, code wants to be added to it so that it’s going to launch this system efficiently. Open up the brand new desktop file within the Nano textual content editor utilizing the command under.

nano /tmp/whatsapp-build/whatsapp.desktop

Paste the code under into the Nano textual content editor and reserve it with Ctrl + O.

[Desktop Entry]
Remark[en_US]=WhatsApp for Linux.
Remark=
Exec=/decide/whatsapp/whatsapp
GenericName[en_US]=WhatsApp for Linux.
GenericName=WhatsApp
Icon=/decide/whatsapp/sources/app/icon.png
MimeType=
Identify[en_US]=WhatsApp
Identify=WhatsApp
NoDisplay=false
Path=
Classes=Community
StartupNotify=true
Terminal=false
TerminalOptions=
Sort=Software

Exit Nano with Ctrl + X. Then, replace the permissions of the desktop file utilizing chmod and set up it to the applying folder with the mv command.

sudo chmod +x /tmp/whatsapp-build/whatsapp.desktop

sudo mv /tmp/whatsapp-build/whatsapp.desktop /usr/share/purposes/

Z

As soon as the WhatsApp desktop shortcut is within the utility file, you’ll give you the option to entry WhatsApp on Linux at any time in your app menu by looking for “WhatsApp.”



Source link

Share.
Leave A Reply

Exit mobile version