Non-snap version for linux

Tell us about your experience, ask if you're unsure of something, let us know if you have a problem.
Lenbok
Posts: 11
Joined: Sun 24 Mar, 2019 9:38 am
x 2

Non-snap version for linux

#2921

Post by Lenbok »

Many linux users (me included) do not like snap packages (in my case it is because snap doesn't let you have control over when/whether to update packages, as well as the fact that's it not fully open source). Do you have another option, such as Flatpak or (my preference) AppImage?
User avatar
kaffelogic
Site Admin
Posts: 514
Joined: Thu 18 Oct, 2018 9:38 am
x 74
Contact:

Re: Non-snap version for linux

#2923

Post by kaffelogic »

At this time we do not have any other option available. We appreciate your concerns with snapcraft, and frankly we have no great love for it. However, for better or worse that is the system we have made the investment in, and just now we can't justify the developer time involved in configuring another release system.
Lenbok
Posts: 11
Joined: Sun 24 Mar, 2019 9:38 am
x 2

Re: Non-snap version for linux

#2955

Post by Lenbok »

Can you put the code for studio on github so we can build our own?
fatalsaint
Posts: 7
Joined: Sun 04 Jun, 2023 5:50 pm
x 1

Re: Non-snap version for linux

#3004

Post by fatalsaint »

I also refuse to use Snap but can completely understand the world of Linux is messy and Kaffelogic doesn't have the personnel to try and make their software with all of them.

What I did was build on the awesome work from @flaper87 here (https://kaffelogic.com/community/viewto ... f=17&t=397) and made a Docker container that builds from the latest snap release.

This is not a 100% optimized or perfect Dockerfile, yet, I've only been working on this (and had my roaster) for 1 day - but I was able to connect to my USB-C roaster, upload the Raost V5 Boost profile, do 3 roasts, and then download the logs and review them in KL Studio so, it works well enough. There is a current issue with the "sync folders" which are part of a postinstall script from the Snap that I still need to reverse engineer, but, it didn't stop me from working with the device.

Code is here if you wanted to try:
https://github.com/fatalsaint/kaffelogi ... -container
Lenbok
Posts: 11
Joined: Sun 24 Mar, 2019 9:38 am
x 2

Re: Non-snap version for linux

#3029

Post by Lenbok »

Legend, this looks very promising. I gave it a quick go and have two issues:
  • I've got an older kaffelogic that uses a memory stick, and I can't work out how to make the app see the stick. I actually never directly used it with my stick even in older versions, I always manually copied firmware to the stick and rsynced roast logs. However from what I can see it looks like you need kaffelogic to see the stick in order to run the boost activation function.
  • I noticed that if you quit studio and try to start it again, there's an error message about kaffelogic-studio already running. I had to do a:

    Code: Select all

    docker rm kaffelogic-studio
    to get it to run again.
Lenbok
Posts: 11
Joined: Sun 24 Mar, 2019 9:38 am
x 2

Re: Non-snap version for linux

#3030

Post by Lenbok »

Actually, maybe the inability to see usb sticks is this general problem, https://kaffelogic.com/community/viewto ... ?f=6&t=447
fatalsaint
Posts: 7
Joined: Sun 04 Jun, 2023 5:50 pm
x 1

Re: Non-snap version for linux

#3034

Post by fatalsaint »

As for restarting kaffelogic, you *can* just do a "docker start" on the container to get it back, or a RM and re-launch works too.

For the USB, since I don't have the Stick model I can't test, but just to double check you did implement the udev rules along with the docker image correct? For my USB-C model it refused to see my device as well until I added the udev rule and did the udevadm trigger (or reboot) on my laptop. If you did that, probably the general problem in the other thread but since this is "technically" an unsupported way to run it, could also be something else missing from the postinstall scripts.
fatalsaint
Posts: 7
Joined: Sun 04 Jun, 2023 5:50 pm
x 1

Re: Non-snap version for linux

#3035

Post by fatalsaint »

Actually the udev rules may be specific to the USB-C model.

Running the docker image with --privileged and mounting in /dev should be enough to access the /dev/ttyUSB0 device.

However as I look at the postinstall script and try and figure out snap it's running:
snap connect kaffelogic-studio:removable-media :removable-media

Some quick searching around seems to indicate snap is monitoring /media, /run/media, and /mnt directories for removable media. Maybe mounting the USB drive on the host and adding in a:
-v <USB_PATH_ON_HOST>:/media/<USBDRIVE> \

Line to the kaffelogic-studio script in the docker run section might help? I am not sure if there is a specific path needed in there.
fatalsaint
Posts: 7
Joined: Sun 04 Jun, 2023 5:50 pm
x 1

Re: Non-snap version for linux

#3038

Post by fatalsaint »

Pushed an update to make the "docker rm" no longer necessary.
Lenbok
Posts: 11
Joined: Sun 24 Mar, 2019 9:38 am
x 2

Re: Non-snap version for linux

#3039

Post by Lenbok »

Awesome, that was the hint I needed. Mounting the stick on the host and adding:

Code: Select all

    -v "/media/$USER/USB DISK/":"/media/kl/USB DISK/" \
Along with the existing docker mount options did the trick. I've now managed to activate my boost kit. (I'd previously also changed the dockerfile to add --channel=beta to the snap download step, I'm not sure whether that also helped, but it certainly wasn't enough on its own.)

Cheers!!
Post Reply