"gtk-warning **: cannot open display: :0" while trying to launch ElectronPlayer

Solution 1:

Try updating your snap package.

To update snap package follow these steps from Zygmunt's answer on How can I update all Snap packages?

sudo snap refresh 

Will do this. It is part of snapd 2.0.8, which landed 2016-06-13 in xenial-updates.

snap refresh --list

Only lists the updates without refreshing the packages.

snap info <snap name>

Can show which versions are available for a particular package.