A Linux Facebook Client – made in the time it takes to boil the kettle.

One thing that really gets to me about Linux is the lack of applications for simple online services. Facebook, BBC Iplayer, BBC News and Hundreds more simple web services that I use. On basically every other platform, you visit the app store install the application then a minute later it’s ready to open. They come with system integration such as notifications, sound controls etc. Linux just doesn’t have this. It’s not that it’s not possible it’s just doesn’t seem to be have been done for lots of services. Many companies think it’s not worth developing apps for the relatively smaller Linux market.

Ok so there are other ways to access them, such as Browser Shortcuts, In the end, it’s just opening another browser window or switching between tabs, but that’s it. There are some native applications that interact with some services, but many of the most popular such as Facebook don’t have one. What if we want a simple application that runs in its own window with a desktop shortcut icon, a tray icon, notifications and the possibility of expanding more… Then let’s make one using Electron and Nativefier

Create The Application

So let’s not waste any time, fill the Kettle up with water turn it on and install the prerequisites, open a terminal and enter

sudo apt-get install npm
sudo npm install nativefier

Next, let’s run nativefier and pass the arguments required to make the app.

nativefier --tray --single-instance --file-download-options '{"saveAs": true}' --name "Facebook" "https://www.facebook.com"

Once the process is finished, open the new facebook-linux-x64 folder created in your home directory and double click on the facebook icon.

Next step, check the Kettle if it’s finished congratulate yourself on making an application by making a nice hot drink. If the kettles still steaming away lets integrate it into the system.


Making a Launcher

Let’s move the application out of our home folder to /opt

sudo mv /home/Your User Name/facebook-linux-x64 /opt/facebook

Now create an application launcher so we don’t have to wade through the file manager to launch our new application.

Open your favourite text editor, copy and paste the following:

#!/usr/bin/env xdg-open

[Desktop Entry]
Name=My Facebook App
Comment=Is The Kettle Ready?

Save the file to /home/User/.local/share/applications/myfacebook.desktop.

If you haven’t already, finish making your drink and enjoy chatting, following friends, reading news, playing games or whatever you use Facebook for.

This example shows how Nativefier can simplify application creation for non-developers, Nativefier does, however, provide more options to those willing to expand simple apps further check out the API list here for more options.

Do you have a favourite online service with no native Linux application, let us know in the comments.

%d bloggers like this: