Tuesday 29 March 2016

No Facebook Chat Jolla? Hello Diaspora*

D* chat integration to Sailfish OS Messages

Comparing Facebook and Diaspora* as social media platforms and guiding how to integrate D* chat on Sailfish OS. The guide applies to both official and unofficial (ported) Sailfish OS devices. Sorry Facebook, but without Sailfish OS support you might be dropped out in this growing community.


Facebook Chat not working on Jolla's Sailfish OS? Hello Diaspora*


Worth a read? Please share:


After Facebook deprecated XMPP in their chat forcing people to use their proprietary Messenger app, Jolla Phone owners sadly lost one nicely integrated Sailfish OS feature. While no native solution has been made available for chatting with Facebook friend, and also this workaround have stopped working, it's time to call Sailfish OS users from Facebook to Diaspora*. This Open Source social media platform brings those green bars back for your online contacts, and hearing that nice IM-notification tone is nice too.

Short comparison, Facebook vs. Diaspora*


Facebook Diaspora*
Proprietary, centralized servers Open Source, decentralized pods
Profiling users, sharing Ads Privacy oriented, no Ads seen
Quite full user interface Content focused, minimalist UI
More cats and video clips More meaningful thoughts in posts
Messages/Groups/Chat Messages/Aspects/Chat(on selected pods)
#tag -search returns timeline #tag -search returns people and stream
word -search for pages and apps word -search for users
Group chatsNo group chats (MUC under work)
Lot's of people Not many users yet, but after you join...

From a basic point of view, FB and D* are still quite similar to each other. Both are social platforms for global content sharing. Both have Likes, Comments and Reshares. There's some difference in the terminology in use:

Facebook Diaspora*
Timeline: "What's on your mind?" Stream: "Start a conversation"
Groups, Friends, Messages My aspects, Contacts, Conversations
Interests Followed tags

Desktop layout is quite full in FB while D* tries to keep the screens clean with some empty space too. The mobile layouts are quite similar with focus on the recent activity, but on D* your chat contacts are on the right sidebar also on the mobile view. They can be hidden too. Facebook requires using another proprietary app "Messenger" for chatting on mobile.

In overall I've found D* to have more interesting content (thanks to the users) and I love the simple design (thanks devs!). Having not too many bugs and with already a nice set of features, steady growth suggests a functional service worth joining and checking out.

Joining Diaspora*


First thing: Pick your pod. From the many public ones available, any one of them can be your entrance. I suggest visiting https://podupti.me/ and pick one by the location, also having those connected services you might use. I picked "sechat.org" for these reasons:
  1. Support for XMPP (required for chat feature)
  2. location in Germany (nice governance in internet privacy related issues)
  3. Good integration with 3rd party services
  4. Nice address, having "chat" already in that
What are these pods then? D* is open and decentralized. Anyone can run a pod, which is a server offering login and features to D* users. You register to any of these pods when you start using Diaspora. The pods negotiate with each other via decentralized solution called "federation"

After registering to a pod, there's a nice on-screen guidance to get started. Maybe add some tags to your profile, write your first public post with #newhere tag and start looking for some old and new friends? Below, I'm focusing on the chat feature of selected D* pod and for Sailfish OS:

Enabling chat on Diaspora*


Required: Login to D* pod featuring XMPP support.

Navigate to Your Name on top bar and click on Contacts. Click on one of your aspects listed below "My contacts" or add a new aspect. Then click the chat icon on top. After activating, all contacts in that aspect (also those added later) can have a chat with you.

To chat on your web browser, navigate to your Stream (default front page) and click on bottom right where it reads "Offline". Pick any other status, and your chat contacts appears above with their current status. Those available for chat for both directions have another color but grey, and those online have a small green dot.

Note: On some mobile browsers the screen width might hide the chat bar on the right - use landscape orientation and toggle between mobile view a couple of times to make the bar visible.

But chat on Sailfish OS devices doesn't need any browser, nor any additional app:

Integrating D* chat to Sailfish OS


Note: If your Diaspora pod has a trusted CA for XMPP connection, you can jump directly to the last dot of this guide (after number 8.), only adding the account to your device. If that doesn't work (you don't see yourself online), just start again from the beginning of this guide. Sailfish OS might not recognize all trusted certs yet.

This guide will integrate D* chat into the Sailfish OS system, including notifications and online status of your chat contacts. The problem is that many Diaspora servers use a self signed certificate which needs to be saved to your device manually, as Sailfish OS does not support self signed CA's by default. The steps are easier with a computer, so the guide uses a remote connection. Root access is not needed, all the commands can be given as a normal user. Let's start with enabling connection between your Sailfish OS device and your computer:
  • On your device, navigate to Settings > System > Developer Mode and enable Developer Mode and Remote connection. Write a new password there, remember that, and also check the WLAN or USB IP address.
  • Using terminal on your computer (on Windows you can install Putty), connect to your Sailfish OS device with the following specs:
    • Host name = IP address of your device (visible in developer mode)
    • Connection type = SSH
    • Port = 22 (default for SSH)
Open the connection. You are now the remote commander of the Linux file system in your phone. All the commands to be entered have yellow background for clearance, having a short explanation of what you are actually doing below them:
  1. login as: nemo
    (default username for your Sailfish OS device file system)
  2. password: yourpassword
    (the one you wrote in the developer mode. Note the hidden writing)
  3. [nemo@Jolla ~]$: mkdir -p /home/nemo/.config/telepathy/certs/
    (makes a new folder into your device file system, used as a saving location later)
  4. [nemo@Jolla ~]$: pkcon install openssl
    (installs a needed Linux tool to negotiate with your D* server)
  5. [nemo@Jolla ~]$: openssl s_client -connect sechat.org:5222 -starttls xmpp -showcerts
    (connects to your D* pod and shows information about the CA. IMPORTANT: If you picked another pod when registering to Diaspora, replace the bold text with your own pod address)

    What we need from here is the FIRST (the one above) certificate. Scroll up to select and copy these lines (Ctrl+C on Windows):

    -----BEGIN CERTIFICATE-----
    ...
    ...
    -----END CERTIFICATE-----

    The similar one below is another certificate of the authority, that one is not needed to copy, only the one above. However, it does not matter if you have two different .crt files in the end.

  6. [nemo@Jolla ~]$: pkcon install nano
    (installs a simple file editor called "nano" into your device)
  7. [nemo@Jolla ~]$: nano /home/nemo/.config/telepathy/certs/anyname.crt
    (enters Edit Mode in a new file called "anyname.crt". You could name that to something else as well, but keep the ".crt" in the end)

    CTRL+V to paste the certificate lines into the file
    CTRL+O to save that file
    CTRL+X to exit from the editor

  8. [nemo@Jolla ~]$: exit
    (this last command closes your terminal)
  • On your Sailfish OS device, navigate to Settings > Accounts > Add account (menu) > XMPP
    • User ID: YourUserName@YourPod (example: "myname@sechat.org")
    • Password: the same you use to login to your D* pod
    • Server: can be left empty
    • Port: 5222 (default)
    • SSL errors: Don't ignore if you followed all the steps through
    • Priority: 0 (default)

      Save the account
Chat is now integrated into your device. You can find all your Diaspora* chat contacts in your People app, and after receiving just one IM from them, see their online status and send them an IM using your Messages app. Android support is not needed - this works as native solution on all Sailfish OS devices.

And how does it work then?


First, for any details on the steps or any related questions, just comment below.

Lot's of steps above, but with a rewarding end result in our test with mosen (thanks!) we discovered that chatting works great while you're logged in to one device only. You can also find all your online contacts in the People app under the globe icon, and each message received gives the IM-notification sound as it should be.

But when we tested having both a browser chat and a phone in use in both ends, things got messy. Only another device received IM's and we wouldn't know which one, making the IM history with your friend not nice to browse. All messages were received in the end, but we suggest you to close D* chat on your browser while chatting on mobile. Good enough!

Online status doesn't seem to sync between devices either. If you're online on mobile, changing status on browser is just another simultaneous info, and your friends device might pick either of those or even just show you offline. Avoid simultaneous use also for that reason.

Conclusion


This post was written to introduce an alternative platform to all Sailfish OS users who are missing the deprecated chat feature of Facebook, or for those looking for open source social media instead.
I can recommend Diaspora* as a great alternative, but you need to invite your friends there too to really benefit from this.
Personally, I disliked the decision of Facebook to drop support for XMPP, and my feelings only grew during the months on which FB have not showed any interest at all towards Sailfish OS users. I ended up with closing this blog's Facebook page for good, and stopped updating there personally too.

While it's up to FB if they want to support Sailfish OS or not, our community can now give them a few little "Sailor's Punches" joining an open source platform instead. "I'm on Facebook because everyone else are there to chat with" is a strong objection, but not for all of us.

The ultimately best solution would be that also Facebook finds Sailfish OS as an independent and popular platform. The user base is growing with new devices being manufactured and others being ported. How about you, do you still want to see an official Facebook client, or do you find D* as a better way to go? Please comment below.


Share and Shout! Your friends might read it.


By: Review Sailfish OS
Cover image: Datenfresses
Source: -
Published: 2016-03-29 04:30 UTC
Updated: 2016-04-04 12:51 UTC (clearance on which certificate to copy)

3 comments: