Maintaining the Raspberry Pi Squeezebox server (aka Logitech Media Server)

This article describes how to maintain a Squeezebox server (or Logitech Media Server). All software used for this project is free and open source.

I wrote earlier about the Logitech Media Server (LMS), open source software that I’ve used to turn a Raspberry Pi into a music server for my Squeezebox devices. I’m using my Raspberry Pi based Logitech Media Server a couple of months and I’ve grown very fond of it. What started as an experiment now has become a device I’m starting to rely on. I guess that eventually I have to replace the USB-HDD that I connected to the Raspberry Pi with a better one. In the meantime however I do need to maintain the LMS. In this blogpost I’ll explain how I add and remove music files from the LMS and create a simple backup of your music files. Finally I provide a tip to debug problems with the Logitech Media Server. All software that I used for this project is free and open source.

Adding, changing and deleting music files

When I buy a new CD I want to add it to my LMS. All the ripping is done on my Thinkpad T40 laptop using Asunder, a low resource ripper for Linux. In the beginning I unmounted the USB hard disk from the LMS, removed it and connected it to the laptop and copied the albums. For new albums this proved to be be a clumsy method and I quickly found myself looking for an alternative.

I decided to use FTP to transfer files over the network to the Raspberry Pi. FTP is a network protocol to transfer files between a client and a server. The software that I’m using is either FileZilla or gFTP. They have basically the same functionality but gFTP is not available for Windows while FileZilla is available for GNU/Linux, OSX and Windows. Working with both is easy enough the only problem that I had was to set the ownership for the USB hard disk on the Raspberry Pi. Only root was able to write to the disk. The reason is a bit technical and maybe confusing but I had used the Windows FAT filesystem for the USB hard disk and when I mounted it on my Linux laptop (Puppy Linux distro), ownership of all files was changed by Puppy Linux to root. At this point it was impossible to change ownership and permissions with chmod and chown from the media server. To solve this problem I had to unmount and mount the USB hard disk using the following general command:

mount device mount-point -o uid=foo -o gid=foo

or in my specific case

mount /dev/sda1 /media/usb-drive -o uid=pi -o gid=pi

This command sets the ownership of all files on the USB hard disk to pi instead of root enabling me to use FileZilla and gFTP to copy files from a remote PC to the Raspberry Pi.

Adding Podcasts to the server

Podcasts can be easily added to the Logitech Media Server and there is no need to subscribe to a service. First the Podcasts app must be added to myApps on the Squeezebox player or players. Next to add podcasts to the list a plugin needs to be installed. To do this open the web interface in your browser and type:

<your_Raspberry_Pi_ip_address:9000> (in my case 192.168.178.69:9000)

Choose Settings at the bottom right of the web browser and then choose the Plugins tab. Now enable the Podcasts (v2.0) plugin and reboot the Raspberry Pi for the changes to take effect. The Podcasts plugin is now active and can be entered through a new tab in the Settings menu. In this tab new feeds can be entered that will immediatly be available on the Squeezebox players. To find a certain feed look for the rss feed of your favorite podcast and copy the link into ‘add a new feed’ in the podcast tab of the Settings menu mentioned above (e.g. http://feed.thisamericanlife.org/talpodcast for This American Life).

Creating a backup of the music collection

I invested a lot of time in ripping my CD collection so it would be a shame if I lost my music files due to a hard disk crash. I therefore use a very simple backup method, largely copied from the Raspberrypi.org website to ensure that my files are safe. First make sure that there’s enough harddisk space available with df -h. Next do:

tar -cvf backup.tar.gz ~/media/usb-drive

This creates a file ‘backup.tar.gz’ that contains files in /media/usb-drive, the mounting point of my USB drive and places it in the same map. Next I use (again) Filezilla to move the backup file to my desktop computer. Alternatively the ripped files on the PC they were ripped on can serve as a backup.

Debug problems with the Logitech Media Server

I didn’t encounter much problems with the LMS but if you do take a look into the log file of the server. This can be done opening a terminal on your PC and login into the Rasperry Pi with:

ssh pi@<your_network_ip_address_of_the_server>
cat /var/log/squeezeboxserver/server.log

The sudo ssh command prompts for the password of the Raspberry Pi. Now look for anything suspicious in the log, copy it and do an internet search with your preferred search engine. Chances are someone already encountered the same problem.

Creating a Raspberry Pi Squeezebox server

Create your own Squeezebox server (or Logitech Media Server) with a Raspberry Pi and a HDD in five steps.

If you, like me, own one or more Squeezebox players you can either choose between the service mysqueezebox.com, that streams music from the internet, or set up the Squeezebox server on your own network. The Squeezebox server software (aka Logitech Media Software) being free and open source software guarantees that you’ll take control of your Squeezebox players and the music that you’re streaming.

There many hardware options for the Squeezebox server software (or Logitech Media Server) but I decided to use the Raspberry Pi 2 that I had lying around because of it’s small footprint and massive support for the Pi. Within a couple of hours I had the Logitech Squeezebox Server up an running with my music playing.

Below I’ll show how to set up the Logitech Squeezebox Server on a Raspberry Pi in five steps. I got some important steps from the Variax Firmation website but I tested everything succesfully.

Raspberry Pi 2 with a USB-harddrive connected to my network with a (yellow) ethernet cable.
Raspberry Pi 2 with a USB-harddrive connected to my network with a (yellow) ethernet cable.

Step 1: Ripping CD’s and writing them on an HDD (choosing an audio format)

Before setting up a server rip the CD’s and write them to a HDD. For this project I used a small usb-harddrive that was also lying around. I formatted the HDD as FAT32. Next I collected all my music CD’s and ripped them. As ripping software I used the Asunder software on my Linux system but I guess that the’re good alternatives (fre:ac appears to be an free and open source alternative that is also available for OSX and Windows). As audio format I choose mp3. If I buy a larger drive I’ll probably move to flac.

Step 2: Installing Raspbian Lite

Next I installed Raspbian Lite (currently Raspbian Buster Lite) on the Raspberry Pi 2 by first downloading the image and writing the image to the micro SD card using these instructions for OSX (or these instructions for Windows and Linux).  I chose the lite version of Raspbian to make the server as lightweight as possible. I had no problems booting the Raspberry Pi and connecting it to my network using ethernet. To avoid potential problems connect the Pi to a monitor with an HDMI cable and make sure that it boots properly.

Step 3: Mount the HDD on the Raspberry Pi

Now with Raspbian Lite installed I mounted the HDD that we prepared in step 1. For this first connect the HDD to the Raspberry Pi (in my case I connected the HDD through a USB port of the Raspberry Pi), login remotely and retrieve the name of the drive. To login remotely we need another computer (Windows, Linux or OSX). Open a terminal (or Putty in case of Windows) and type:

sudo ssh pi@Raspberry_Pi_ip_address (in my case 192.168.178.69)

The default password is raspberry. Then type:

sudo fdisk -l 

Then look for the HDD that is just connected. This was /dev/sda1 in my case (but this may differ in yours). To make the files on the HDD accesible to the Raspberry Pi we need mount the drive. But before that we need to make a mounting point (in this example at ~/media/usb-drive).

sudo mkdir /media/usb-drive 

and mount

 sudo mount /dev/sda1 /media/usb-drive

You should hear some HDD activity. Now type:

cd /media/usb-drive ls -l

and a list of your music should be visible.
To unmount the HDD do:

sudo umount /media/usb-drive
 The list of folders with albums that I ripped. In this stage I only ripped a few albums to test the system.
The list of folders with albums that I ripped. In this stage I only ripped a few albums to test the system (click to enlarge).

Step 4: Installing Logitech Media Center on the Raspberry Pi

First we need to install a library to play audio files. Since you want mp3 only do:

sudo apt-get install -y libsox-fmt-all

This installes SoX, a command line utility that, among other things, plays various types of audio files. If you want to add flac support you’ll probably need to do this

sudo apt-get install -y libsox-fmt-all libflac-dev

Now with the audio libraries in place the Logitech Media Software can be downloaded. We want the latest version which is 7.9.2.

wget -O logitechmediaserver_all.deb $(wget -q -O - "http://www.mysqueezebox.com/update/?version=7.9.2&revision=1&geturl=1&os=deb")

Now install the server software with:

sudo dpkg -i logitechmediaserver_all.deb

With all the software installed we’re ready to go.

Step 5: Working with Logitech Media Center

To enter the web interface of the Logitech Media Center on the Pi we need a computer and a browser. In the browser url we type:

<your_Raspberry_Pi_ip_address:9000> (in my case 192.168.178.69:9000)

The Logitech Media Center is started for the first time and a script is started to set it up. Important is that the mounting point of the HDD (in my case /media/usb-drive) is entered. This way the Media Center is able to retrieve all the music files. This is done in the web interface by entering the path of the mounting point under Media Settings under Media Folders.

The Media Settings page of the web interface. Enter the path of the mounting point under Media Folders.
The Media Settings page of the web interface. Enter the path of the mounting point under Media Folders (click to enlarge).

The Logitech Media Server is now ready and every time the Raspberry Pi boots the Logitech Media Server is automatically started however the HDD is not automatically mounted so we need to change that. This is done by editing (with nano) the fstab system configuration file that can be found at /etc/fstab

sudo nano fstab

and add the following line

/dev/sda1 /media/usb-drive vfat& defaults 0

Save the file and exit nano. Reboot the Raspberry Pi. Now the installation is complete. The music can be played from the web interface (see above), with the remote controls that come with the Squeezebox devices or with a free app for Android. The Squeezebox Radio also has controls on the device to play the music. So, plenty of options.

Webinterface of the Logitech Media Server (click to enlarge).

Whats next

In a future blog entry I’ll explain how to maintain the Logitech Media Server e.g how to add music to the server remotely.

Create animated GIFs from MP4 with FFmpeg

Learn how to create an animated GIF that’s small enough to upload but with a decent quality.

Animated GIFs are after all these years still pretty popular. FFmpeg is a good FLOSS tool to create these animated GIFs. FFmpeg is available for Windows, Linux and OSX. A word of warning FFmpeg is a command line tool that’s very versatile but it’s not for everybody. In fact suppose this post is more for users that like to tinker a lot with their animated GIFs. Below I will explain not only how to create a animated GIF from an mpeg4 movie but I also provide instructions to improve the quality.

The basic command to create an animated GIF from a mpeg4 is:

ffmpeg -i input.mp4 output.gif

where the name of the input file is input.mp4 and output.gif is the name of the output file. Unfortunately gif images are large due to their lossless data compression. So you’ll end up with a file that’s much bigger than the original mpeg4 and probably something that exceeds the upload limit of Diaspora*, Friendica or Mastodon.

In order to reduce the size of the file we can reduce the size of the images or we can reduce the number of frames per second. To achieve this we need the following command:

ffmpeg -i input.mp4 -r 12 -s 320x180 output.gif

This command reduces the framerate to 12 per second and resizes to 320×180 pixels. For the size of the GIF make sure that the aspect ratio remains the same or the resulting GIF will be distorted.

When we look closely at the resulting GIF we clearly notice some shortcomings in the animation. This is due to the default GIF encoding in FFmpeg. Because GIFs only uses 256 colors the number of colors from the mpeg4 needs to be reduced. FFmpeg by default uses a generic palette of 256 colors that covers the widest range of content. This is in general not optimal for the specific video that you want to convert. Luckily FFmpeg allows us to create a custom palette for our specific video. To create this palette type:

ffmpeg -i input.mp4 -filter_complex "[0:v] palettegen" palette.png

When we look in the folder of our mpeg file well noice that a file ‘palette.png’ has been added. This is our newly created 256 color palette for our specific video which is generated by the palettegen filter. To use the new palette with our mpeg video type:

ffmpeg -i input.mp4 -i palette.png -r 12 -s 320x180 -filter_complex "[0:v][1:v] paletteuse" prettyOutput.gif

FFmpeg needs two input files (streams) in this case test.mp4 and our newly created palette.png. The paletteuse filter takes the two streams as input specified by [0:v] and [1:v] where v stands for video and the preceding number for the number of the stream. The output file is renamed to prettyOutput.gif to differentiate it from the earlier output.gif. The resulting video should be much … prettier. If your resulting video is still too large either reduce the frame rate or resize even further (or just reduce the length of the video of course).

Further reading:
http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/

EU Copyright Directive daydream

While Big Tech and Big IP holders are fighting the EU citizens are caught in the middle and are in danger of becoming the victim of this fight.

Article 13 and upload filters

In March or April the EU Parliament will vote for a new EU Copyright Directive. Recently France and Germany agreed on a proposal text for the Directive that according to the Electronic Frontier Foundation (EFF ) is the worst one yet. Earlier I wrote about the EU Copyright Directive and the threat it poses for average users like you and me. The reason is that Article 13 of the Directive will inevitably result in upload filters.

thanks for all this DRM

The EU Copyright Directive is actually a clash between Big Tech and Big IP holders and the EU citizens are caught in the middle. Worse they are manipulated by both sides for there own purposes. It reminds me of the Digital Rights Management (DRM) discussion where IP holders were trying to limit the access of software and multimedia content with technical means. Leaving the user with bad products and restricting their rights such a making a back-up. Instead of prohibiting DRM the legislators, influenced by the IP holders, tried to criminalize the circumvention of DRM, communication about such circumvention, and the creation and distribution of tools used for such circumvention.

history repeats

Now with Article 13 history repeats itself. On one hand there are wealthy technology companies such as Google and Facebook. They take the lion share of all the profits made on the internet. The winner takes all principle on the internet has denied other companies to enter the arena and gain a significant market share. Mean while Big Tech has gained access to user data and profited from this on an unprecedented scale.

On the other hand are the Big IP holders that exercise, in their eyes, unlimited and perpetual rights to all intelectual property and as we have seen with DRM enforce it with all means possible. In the middle is the internet user which in general is not a criminal and is not purposely trying to infringe copyright. Nevertheless this user has to pay in the same way as they did with DRM with access to the internet being subjected to upload filters that can reject any content that the user is trying to share.

let’s fight back

The solution to the DRM problem came from the community providing users with tools such as Handbrake enabling them to make that back-up copy. This time around the solution is likely to come from the community again and the tool is probably already available. For that we have to go back to 2010 and the origins of Diaspora. The initial inspiration for Diaspora came from a speech by Eben Moglen, Freedom in the Cloud, where he proposed a distributed system of pods, called Freedombox. The idea of Eben Moglen was for every user to have a server with his/her data in his/her home. This idea never came to fruition and currently Diaspora is a system of pods serving dozens or hundreds of users per pod. What if we were to go back to this original idea. It’s possibe. Freedombox is still here and the’re similar solution like Freedombone and perhaps others that I’m not familiair with.

Freedombox has a planned feature to create a Diaspora pod running on top of Freedombox and Freedombone allows the user to install a Friendica instance on it. Surely these homepods and instances will be free of all the restrictions mentioned in Article 13 as long as they are not-for profit. Your pod in your home therefore doesn’t need an upload filter and you can share all the information that you like as long as you’re respecting copyrighted material. It will create an iron clad distributed network where you detemine what you want to share without passing any third party upload filter. It is also a message to both Big Tech and Big IP holders that no matter what they think of the community will always come back with a solution to be able to share data in a way they want to.

Humble start of Bash scripting (part 3)

In Part III of my Bash scripting adventures I’ll write a script rename all .jpg files in a folder.

My third post on Bash scripting. This time I used a loop in the script. It’s still a simple script but also a very useful one. I regularly import photos from my digital camera or from my smartphone. The file names of these photos are either a number or a random string of characters. I like to rename these photos to give them a more meaningful name for instance summer2018.

The script lets me choose a folder and next asks for a file name. Then the script determines whether the folder exists and if it does it copies all .jpg files and gives the copied files a new name and a number starting with 0 and increasing the number with one for every photo in the folder. The files are copied so the old files still exists just in case a mistake was made. If I’m satisfied I delete the original files manually.

Question: I’d rather have a file name number with three decimals starting from 000 but I haven’t got I clue how to do that. Any ideas?

If you want to use this script, copy the code below and paste it into an editor like vim, vi or Geany. Save it e.g under the name rename and make this file executable by typing.

chmod 755 rename

To run the script just type.

./rename

Cheers

The script

  1 #!/bin/bash
  2 # written by Eric Buijs 29 januari 2019
  3 # rename changes all the jpg files in a user specified folder
  4 
  5 counter=0
  6 
  7 read -p 'type the name of the folder here (e.g: /Users/myname/Documents): ' dname
  8 
  9 read -p 'type the new name of the files (without extension): ' fname
 10 
 11 if [ -d $dname ]
 12 then
 13   echo directory exists
 14   cd $dname
 15   echo $dname
 16   files=$dname/*.jpg
 17   for file in $files
 18   do
 19     cp $file $dname/$fname$counter.jpg
 20     ((counter++))
 21   done
 22 else
 23   echo directory does not exist
 24 fi
 25 
 26 echo 'All done'

Click here to see my previous Bash post.

Movim, FLOSS Alternative for Hangouts

News is spreading that Google will replace classic Hangouts with Hangouts Chat and Hangouts Meet. Since Google had already decided to close G+ forcing me to look for an alternative this was a good moment replace Hangouts with a FLOSS alternative. I’m pretty happy with the Fediverse social networks as a replacement for G+ but I haven’t been able to find a chat service in the Fediverse. Luckily the’re other FLOSS options. Two of those are Matrix and Movim. I briefly checked the Riot client of Matrix as a guest so I can’t tell much about it. Maybe later more on that. I’ve spend a considerable amount of time with Movim which is actually more than just a webbased chat service. Movim is a distributed social network built on top of XMPP.

Movim logo
Logo of Movim

XMPP

XMPP is a communication protocol. It is, unlike for instance ActivityPub, a real-time protocol and therefore suitable for message oriented services like chat or IM. It’s an open protocol so any developer willing can use it in his/her application. There’s a sizeable list of application that support XMPP ranging from apps for the mobile phone to web oriented services.

Movim

Being build on top of XMPP, Movim has a good chat capability. You can create a public chatroom that anyone can join or have a private chat with another person. It also enables the user to create a community (or more) and a news stream. An advantage of Movim using the XMPP protocol is that with an Movim account you’re able to communicate with anyone with an XMPP account not just with Movim. To give an example I’ve been exchanging messages with someone that uses a Friendica server with a XMPP addon.

Movim is completely federated due to the underlying XMPP protocol which means that even when a server goes down the network keeps functioning and you’re still able to chat with your friends, as long as they were not logged into that specific server of course. The federated structure also provides privacy for the user. Your information is kept only on your XMPP server and information is being shared with other servers only if you decided to share it.

In the current version of Movim (0.14) end-to-end encryption is not implemented but it is planned for the next version. This means that currently Movim is not suitable if you need secure communication.

If you want more in-depth explanation about Movim and the technical choices that were being made check out this blog post from the developer of Movim: https://fr.movim.eu/?blog/edhelas@movim.eu/how-s-made-movim-part-i-the-architecture-CCA7If

You can check it out here: https://movim.eu/?lang=fr&hl=fr

Humble start of Bash scripting (part 2)

In Part II of my Bash scripting adventures I’ll write a script to resize an image.

As a follow up on my Bash scripting efforts that I started this year I wrote a script that resizes a photo to a specified width in pixels. The script should work both on Linux and OSX (tested on OSX, will test on Linux later). For this script to work ImageMagick needs to be installed. The script tests if an argument is specified (the original photo of course), if ImageMagick has been installed and if the file output.jpg exists. If output.jpg exists the user gets the option to overwrite the existing file or exit the script. Finally the user needs to specify the width in pixels of the output.jpg.

If you want to use this script, copy the code below and paste it into an editor like vim, vi or Geany. Save it e.g under the name resize and make this file executable by typing.

chmod 755 resize

Now if the photo is in the same folder as the script just type.

./resize yourphoto.jpg

Cheers.

The script

#!/bin/bash
# written by Eric Buijs 12 january 2019

if [ $# -eq 0 ]
	then
		echo You need to specify a file.
		echo e.g: resize photo.jpg
		exit 1
fi

if [ ! $(which convert) ]
	then
		echo This script requires Imagemagick!
		echo You can download it at http://www.imagemagick.org/
		exit 1
fi

if [ -e output.jpg ]
	then
	echo output.jpg already exists.
	read -p "Do you want to overwrite it? (Y/N) " answer
	echo $answer
	if [ $answer = "N" ]
		then
		exit 1
	fi
fi

read -p "What is the desired width in px: " width
convert $1 -resize $width output.jpg

Guide for GPlus refugees to choose a new social network in the Fediverse

If you’re still looking for an alternative social network to replace G+ here is a guide to the Fediverse that helps you choose.

Time is running out for GPlus refugees. G+ will close on April 2nd. So to help people that haven’t decided yet where to go in the Fediverse I made some pointers.

I divided this guide in a number of sections. Each section describes a certain use of social networks and which networks are most suitable for this specific use. Combine this with your preferred use of a social network and you should be able make a decision.

The Fediverse logo
Fediverse logo

Micro- or macroblog

In general a macroblogger writes longer posts with longer intermittent periods while a microblogger writes short bursts on a daily basis. Microblog networks typically have a maximum post length of hundreds of characters. The macroblogger can choose between Diaspora*, Socialhome, Friendicaand Hubzilla. The microblogger can choose between Mastodon, Pleroma, Misskey or GNU Social.

user interface

Arguably the most important part of a social network is the interface. Lot’s of G+ users like the smooth interface with the grid layout, the stream with updates on people, collections and communities that you follow and the lack of ads. G+ has an algorithm but unlike FB my stream felt mostly relevant with interesting posts (ok, lets forget about discover which I never used because it mostly served me rubbish).

First, none of the social networks of the Fediverse show ads or have some kind of algorithm to influence the stream of posts. All macroblog social networks (see above) have a stream only with updates on people and topics (tags in Diaspora*) that you! follow. The interface of Mastodon is very different from G+ and has more similarities with Twitter. It allows you the follow users but not topics (although the user can search for tags). Nevertheless the interface of Mastodon works very well and might be an important reason that this social network is currently by far the most popular of the Fediverse.

If the grid-like layout of G+ is important to you, Socialhome features a similar grid-like layout.

ease of use

The different social networks in the Fediverse have a widely different user experience. Now it’s up for debate which is easy to use and which is not but I’ll give my opinion on this. The most easy to use social networks are in my opinion Mastodon and Diaspora* and I recommend them for beginners in the Fediverse. Both have a relatively simple interface with easy access to the functions and concentrate on social interaction. On the other end of the spectrum are Hubzilla and Friendica. Both these social networks are packed with functionality and Hubzilla is even more than a social network (e.g it allows the user to create a website). The interface for both can be difficult to master with lots of options, menus and submenus. It took me a considerable time to find all the functionality in Friendica and after half a year I still find new options.

Mobile

If mobile is important it’s good to know that some social network are supported by multiple mobile apps while others (mostly the newer social network) current don’t have a mobile app. I believe that Mastodon is best supported with multiple mobile apps. Diaspora*, Friendica, Hubzilla, GNU Social and Pleroma have at least one mobile app. As far as I know Socialhome lacks a mobile app.

Support for Diaspora* protocol

If it’s important to connect with friends on Diaspora* it’s good to know that currently not all social networks in the Fediverse enable you to do that. Socialhome is based on the Diaspora* protocol while Friendica and Hubzilla support it. Friendica and Hubzilla are the only social networks that’s able to connect with (I believe) all social networks of the Fediverse.

Photo/Video

If photo’s are very important to you (think Instagram) Pixelfed is designed with photo sharing in mind. The same can be said about PeerTube for video.

Sharing/castinG

If your interested in sharing more than discussing or having a conversation you either need to choose for a social network with the largest number of users or a social network that can connect with all other networks. The best choice for that is either Mastodon or for the latter Friendica or perhaps Pleroma or Hubzilla.

Discover/be inspired

If you want to discover what’s going on in the Fediverse you’ll either want to choose Mastodon because of its size or a network that connects with most other social networks. I believe that in the latter case Friendica is the best choice but if you’re less interested in the Diaspora* side of things you can also choose Hubzilla or Pleroma.

Shared interest

G+ was the shared interest network and that gap is hard to fill. Nevertheless there are options. Mastodon has servers that are for people interested in specific topics like art (mastodon.art), open source (Fosstodon), Linux (linuxrocks.online), technology (mastodon.technology)) or science (scholar.social). Diaspora* takes a different approach where contacts can be ordered in aspects. By default the aspects are Family, Friends, Acquaintances and Work (social circles) but special interests aspects such as Science op OpenSource can very well be added. The groups in Friendica have a similar working.

Private message

Social networks such as Mastodon, Diaspora, Friendica and Hubzilla can be used for private messages but keep in mind that if you’re on Diaspora you can’t send a private message to someone on Mastodon vice versa.

Connect with G+ friends

G+ users went everywhere but the’re some likely places where you can meet old G+ friends. The most prominent is likely the Diaspora* instance (=server) Pluspora. As the name indicates Pluspora is especially created for G+ refugees so there’s a good chance you’ll find friends over there. It may be good to point out that Pluspora is part of the Diaspora* network. I’ve also seen some of my old G+ friends surfacing on either Mastodon or on Diaspora*.

There is no denying that G+ filled a gap in the market of social media networks. G+ was a shared interest network where the user could follow multiple persons on collections or I could join a community around a specific interest. This gap isn’t easy to fill by any social media network. Now my last tip is this. Take your time to look around in your new network, don’t expect it to be like G+ but keep an open mind and judge it on its own merits. After some time you’ll discover that this new social network has its own qualities that you start to care about and love.

Link to my blog post about FLOSS tools to create a community or forum: http://homehack.nl/floss-tools-to-create-a-forum-or-community/

Link to a blog post about distributed social networks: http://homehack.nl/distributed-social-networks/

EDIT 25 February 2019: I removed the Osada social network because the developers decided to abandon it. Instead they are concentrating their efforts on the Zap social network which is similar to Osada with one huge difference that Zap doesn’t support the ActivityPub protocol.

When to use Friendica over Diaspora*

This post contains some use cases where Friendica could be a better choice than Diaspora*

Lately I’ve came across discussions and questions about the difference between Diaspora* and Friendica. So, after an earlier reply today describing when it’s worthwile to use Friendica instead of Diaspora, I decided to expand on that post. On the surface both social networks look similar, they’re allow for blogging with a markup language to structure text, the interface shows similarities and they share most of the functionality. Although they were both released in 2010 Diaspora is much better known and has more users. So why use Friendica at all?

I therefore defined some typical use cases where Friendica could be benificial:

  1. Being able to connect and communicate with contacts from various social networks of the Fediverse. Friendica supports different social networking protocols and federates with Mastodon, Diaspora* and Pleroma and others.
  2. Being able to automatically post from Friendica to several social networks (even non-federated and even to your WordPress blog) e.g. important for people that cast on mulitple social networks at once. This service alone is one that some people are willing to pay for.
  3. Being able to follow and discuss certain hashtags over multiple social networks. See 1). Important if you don’t want to miss anything 😉
  4. To setup a forum for a certain purpose for multiple people to join.
  5. Being able to fine tune the Stream (/network in Friendica) in great detail e.g following a person but not on every topic, collapse all the images or collapse all reshares. I wrote an earlier blog post about this: http://homehack.nl/filtering-options-in-the-friendica-social-network/

The’re also features that Friendica is missing.

  1. A link to a website doesn’t show a preview on my current Friendica server squeet.me. This is for some people a very important feature that’s missing.
  2. The upload limit for a photo can be lower depending on the server. On the popular server squeet.me it is 781.25Kb this is way lower than the 4.2 Mb of Diaspora*. I guess the message is to carefully choose a server for your account.

All additional features of Friendica come at a price, complexity of the UI. This is I think the reason that Friendica is harder to master than Diaspora. Diaspora fulfills the needs of most people and the simplicity of the interface is in fact one of the strong suits of this social network. Friendica on the other hand is more for power users or people that absolutely need one of the use cases mentioned above.

Full disclosure I use both Friendica and Diaspora* and currently I don’t prefer one over the other.

Humble start with Bash scripting

2019 is a good year to start scripting with Bash

To kick off the year I started to learn Bash scripting, something I wanted to do a very long time. I humbly began with tutorials on the web like this one and I’m rewriting scripts from Smokey01, a fanatic Puppy Linux user. As an exercise I simply rewrote this script to work on OSX. If you want to use it you need to install exiftool. I installed exiftool with Homebrew and typed brew install exiftool but there’s also a dmg file available. If you don’t use Homebrew you do have to change the check if exiftool is installed.

Now for the script. It reads a jpeg file that must contain geocoordinates. After some checks for parameter and exiftool installed it reads the geocoordinates and stores them in the variable coord. This variable is then added to a Google search query and the result displayed in the browser.

Save the script e.g. with the name place and run with place /path/to/photo.jpg to display the location where photo.jpg was taken.

The script

1 #!/bin/bash
2 # Originally written by smokey01 28 May 2017
3 # Rewritten for OSX by Eric Buijs 9 Jan 2019
4 if [ $# -eq 0 ]
5 then
6 echo You need to specify a file.
7 echo EG: place photo.jpg
8 exit 1
9 fi
10
11 if [ ! -d /usr/local/Cellar/exiftool ]
12 then
13 echo “This script requires exiftool!”
14 exit 1
15 fi
16
17 coords=`exiftool -n -p ‘$GPSLatitude,$GPSLongitude’ $@`
18 read -e -p “Do you want to see the location in your Browser? ” choice
19 [[ “$choice” == [Yy]* ]] && open https://www.google.com/search?q=$coords || exit 1