Snappy Packages on openSUSE Tumbleweed

openSUSE Snappy

I don’t see much on the webs about people using Snaps on openSUSE nor have I seen any experiences by openSUSE Users with Snaps so I thought I would see how it goes for me.

First off, the word “snap” appears in too many projects. A quick software search on opensuse.org gets you:

  • snapd
  • rsnap
  • snappy
  • snapper
  • esnappy
  • tarsnap

For this project, snapd is the right answer.

I prefer to use the openSUSE Packaging system for all my software but the idea of having a universal packaging system is seemingly a great idea and I can see this as a very practical method for 3rd party software distribution. Right now, we have three universal packaging formats: AppImage, SnapCraft and Flatpak. I have now used them all but for now I am going to focus on using Snaps.

Installation

https://software.opensuse.org/package/snapd

Using the “Experimental” package System:Snappy One-Click install

At the time of writing, I installed version 2.23.5. The install was without incident, as to be expected with openSUSE.

First run

I went to the SnapCraft home page and just wanted to check out a “featured application” and chose to try out Minecraft. I figure, if something is going to fail, it will be a game that requires 3D acceleration, and sound.

https://snapcraft.io/minecraft

For my first experience, I am already pleased to see that right at the top of the page there is the command to copy and paste into a terminal to install the software.

sudo snap install minecraft

It is simply beautiful that this can all be done in in the terminal too. No silly GUI front end required. Simple, straight forward, copy from the page and paste into terminal.

Unfortunately, I had to do some troubleshooting. I received an error when trying to install Minecraft.

error: cannot communicate with server: Post http://localhost/v2/snaps/minecraft: dial unix /run/snapd.socket: connect: no such file or directory

A quick search told me to check the status of the snapd daemon:

systemctl status snapd

The output from that:

● snapd.service – Snappy daemon
Loaded: loaded (/usr/lib/systemd/system/snapd.service; disabled; vendor preset: disabled)
Active: inactive (dead)

That told me I needed to start the service

sudo systemctl start snapd

Checked the status, once again:

snapd.service – Snappy daemon
Loaded: loaded (/usr/lib/systemd/system/snapd.service; disabled; vendor preset: disabled)
Active: active (running) since Fri 2018-05-11 11:21:40 EDT; 2s ago
Main PID: 7611 (snapd)
Tasks: 10 (limit: 4915)
CGroup: /system.slice/snapd.service
└─7611 /usr/lib/snapd/snapd

I wanted to be sure that the service starts at system boot, as well so I executed this:

sudo systemctl enable snapd

With the nice to see, somewhat interesting output:

Created symlink /etc/systemd/system/multi-user.target.wants/snapd.service → /usr/lib/systemd/system/snapd.service.

This is where I say the unpopular statement: SystemD is Awesome to use.

Now I could try to install Minecraft once again and received this upon completion:

minecraft latest from ‘snapcrafters’ installed

Success!

The first run launcher popped up and the next round of installation (presumably) commenced.

Screenshot_20180511_121456

I was interested in seeing the command the snapy package added in my applications menu and here it is.

env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/minecraft_minecraft.desktop /snap/bin/minecraft

First run, and it worked as expected but since everything defaults to the Intel GPU on my system, I wanted to test offloading Minecraft to the AMD GPU. It works well with Steam, Descent and any emulators, so now I wanted to see if I prepend the same command “DRI_PRIME=1” if it would work as well.

It did and did so glitch free.

Screenshot_20180515_083037.png

Conclusion

Although Snaps, or Snappy or Snapcraft is considered an experimental package in openSUSE, it seems to work perfectly fine within Tumblweed. There was just a bit of extra leg work required to start and enable the daemon but outside of that, it seems to work smashingly.

This is my first experience and I will continue to play with this as well as Flatpak and AppImage. My preferred method of software installation is still using the openSUSE software repositories but it is great to see that the option of Snaps are [nearly] effortless to get going.

See Also

openSUSE Project

SnapCraft Daemon Installation for openSUSE

Minecraft Snap Package

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s