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

 

Wii U Pro Controller on openSUSE Linux

e6440-WiiU-Pro-Controller.pngI don’t do much serious gaming on Linux but I do like to play the occasional Steam or older games in an emulator. I have historically liked the PS3 controllers in Linux. There is nothing you have to do to get it to work. Plug the dongle in a USB, pop in some batteries and away you go.

The Wii U is now a deprecated gaming console, which makes me much more interested in it. I have had one for a little while but the Gamepad digitizer has been broken for some time. I originally set out to fix the game pad but the issue with some of the buttons not working along with the digitizer, it had me thinking I should just replace the whole thing so I can start using the console. On the hunt for the replacement Gamepad, I also acquired a couple of these Wii U Pro Controllers. I wanted these in order to play this “New Super Mario Wii U” game and compare it against my favorite of the franchise. I think putting “New” in the title is a bit silly because it isn’t new now.

Upon holding the Wii U Pro Controller in my hand, it felts so good… almost perfect for my somewhat long and gangly fingers. I wanted to try out these Wii U pro Controllers on Linux, play some Steam games but fully expecting the process to be a headache; you know, because Nintendo. I made the assumption that I would have to install xwiimote to get it to work but upon reading and some further understanding of all the work some incredibly smart people have done, I only need that for the Wii Remotes. The machine I tested this on is running openSUSE Tumblweed Kernel 4.16.0 and it is my understanding that the wiimote kernel drivers have been in place since 3.1.

Setting up the Wii U Pro Controller

Screenshot_20180402_122527Nintendo chose to use Bluetooth technology in the Wii and Wii U so I started off by Pressed the Sync button on the controller and it showed when selecting Add Device on the KDE Plasma Bluetooth configuration tool. It connected, the lights stopped flashing on the controller with one solid light glowing. I checked the capabilities of the controller, to see that it was usable, in the System Settings > Input Devices > Joystick. It was just as I would expect from any other controller I own.

I opened terminal to see the kernel messages concerning this device by running: dmesg

[86905.904160] wiimote 0005:057E:0330.000B: hidraw1: BLUETOOTH HID v0.01 Gamepad [Nintendo RVL-CNT-01-UC] on 80:00:0b:82:a8:1f
[86905.904169] wiimote 0005:057E:0330.000B: New device registered
[86905.981821] wiimote 0005:057E:0330.000B: detected device: Nintendo Wii U Pro Controller
[86906.011799] wiimote 0005:057E:0330.000B: detected extension: Nintendo Wii U Pro Controller
[86906.011889] input: Nintendo Wii Remote Pro Controller as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0/bluetooth/hci0/hci0:34/0005:057E:0330.000B/input/input33

Now I was excited.

I opened up Steam and started the game, “River City Ransom: Underground”, completely bypassing any of the configure input device to see what would happen. To my shock and blissful amazement, everything worked as expected. I hopped out of the game to see the controller settings and it was recognized it as a Wii U controller.

Detected Controller Wii U

I also checked out this “Desktop Configuration” setup with Steam. As long as Steam is running, I can use this Wii U controller to as an input device for controlling my Linux Desktop. I like this particular interface because I can define what each button does. This is a feature that KDE Plasma doesn’t seem to have built in and I don’t want to create an Xorg configuration for this either.

Desktop Configuration

This truly is a lot of fun to play with. Sure, it is probably just a novelty for now but I am thinking that I might want to make this a controller for my living room media machine along with the wireless keyboard/touchpad device as that is almost overkill when you just want to browse and watch some Netflix.

Final Thoughts

I really was expecting to do so more to do to get this working. On one hand I am very pleased on how easy it was to get working. On the other had I am a bit disappointed as I expected a bit of a project out of this and I was going to make the whole process “easy” and simple in a short write up. Instead, I get to tell you that the Wii U Pro Controller works great in Linux and is a great choice for modern (what little I do) and retro gaming. Best of all, no USB dongles to worry about losing!

External Links

XWiimote open-source Linux device driver for Nintendo Wii / Wii U Remotes

Wii U Pro Controller