Problem with appimage accessing a USB port

Hi All,

Installed Aurora a couple of days ago, as I’ve been keen to have a crack at an immutable distro for a while. All working well until I ran into a problem with Saleae’s Logic Analyser 2. It’s only available as an appimage. After much mucking around and searching I finally got it to install, however it needs to access a device plugged into a USB port. Normally (on other distros) it automatically finds the port and opens it. On Aurora however it just pops up a message saying “Error connecting to port”. I’m assuming this is to do with the program not automatically being granted access to critical bits of the OS, as it’s an appimage and the OS is immutable.

So my question is, how to I allow Logic Analyser to access a USB port?

All advice gratefully received. :slight_smile:

Edit: have the same problem with two other apps too; VS Code (to program microcontrollers connected via USB), and EdgeTX to program R/C model transmitters (also via USB). Thanks.

Nice to see a hardware geek around these parts :slightly_smiling_face:

There are a couple of things mentioned on their website that you could try, if you haven’t already:
——

Issues with Running the AppImage File

Starting Ubuntu 24.04, you may need to run our app with the --no-sandbox argument like so. Otherwise, the app may fail to launch.

./Logic-2.x.xx-master.AppImage --no-sandbox

In other error cases (not common), you can attempt to extract the Logic binary from the AppImage file with the following command.

./Logic-2.x.xx-master.AppImage --appimage-extract

This will dump the contents to a new directory called squashfs. You can then try to run the Logic binary directly from there.
——

from here

Just saw this.
For VSCode, are you using the -dx variant of Aurora, with VSCode built in? That would work better than a flatpak, if that’s what you’re trying to use.

Not sure about EdgeTX, but perhaps knowledge gained from working on the other two will help.

@JohnAtl thanks for the replies.

Adding --no-sandbox didn’t help unfortunately, but it did throw up an interesting error. No idea what it means, but maybe I need to correct it?

ATTENTION: Sandboxing of this app has been disabled since the user namespace feature of your OS is disabled.
Please enable user namespaces or use the deb package.

Good idea about using the dx version, but I suspect it will still not allow access to USB ports, as vscode is mainly about developing proper apps, not fiddling around with stuff that needs to talk to other devices plugged into USB. There are plugins that do it (PlatformIO and MicroPro f’rinstance) but I’m assuming it’s the plugin that talks to the USB port.

But vscode is actually not my preferred weapon, that would be Pycharm, which I suspect will have the same problem, as Micropython is again handled by a plugin (which is still a bit alpha I have to say). Or the old standby, Thonny. Always works but has a really basic editor, and some other quirks. It has a problem with users and groups, and I’ve posted a separate query about that.

Live and learn,

:wink:

Managed to add the Saleae Logic rules to /etc/udev/rules.d, restarted the PC, but still get the same error.

Tried the Arduino IDE as well, but it couldn’t upload to a microcontroller either, even with the udev rules, so it doesn’t seem to be a udev problem.

No idea what to try next…

:-\

Just for fun I installed Sigrok Pulseview, which does the same thing as Saleae Logic Analyser, but is a foss tool. Not as sophisticates as the Saleae tool, but incredibly it works, whereas the Saleae tool doesn’t. At least I can’t get it to work.

Pulseview is also an appimage, so I don’t know why it can talk to a usb port and Saleae LA can’t. So, clearly not Aurora’s problem. It must be something to do with the tool itself. Thonny couldn’t talk to a device plugged into a usb port until the user was a member of a particular group. Maybe Saleae has the same requirement?

:wink:

2 Likes

I have been trying to get an appimage to work (Saleae Logic Analyser), but it won’t start. It shows a screen with the company logo and the message, error connecting to socket. I’m assuming this is because it’s trying to open a device (the actual logic analyser unit) plugged into a USB port?

I’ve been through a number recommendations from Saleae about how to solve this problem, and one of them suggests that libnsl may be missing. Following the instructions given I found that indeed, that library was missing. The instructions then suggested installing the library using yum, but that isn’t possible with Aurora. If you try it you get a rather terse error message suggesting you RTFM.

I tried brew install libnsl, and it worked. The library was installed. So I logged out and in again and tried Logic Analyser again but it failed with the same error message. So I rebooted the computer and tried again, with the same result. Running the same check again for the presence of libnsl showed that it was still missing. So I tried brew install libnsl again, but it told me it was already installed.

So how do I get the library installed so Logic Analyser will recognise it?

All advice gratefully received. :slight_smile:

!?!? I managed to do this:

I’m on Bluefin.
I downloaded and ran:

./Logic-2.4.29-linux-x64.AppImage --appimage-extract

Then I started my Ubuntu distrobox, I think this will download and create it, if you don’t already have it:

distrobox enter ubuntu

Then I did this (because it complained earlier about this lib when I tried it):

sudo apt update
sudo apt install libnss3

Then I changed into the folder where the application was extracted, and ran it.

cd squashfs
./Logic

And it ran.

Thanks John,

Tried running it from a distrobox as you suggested, and after a lot of faffing around, it worked! I can’t quite believe it. There are lots of errors popping up when I start it, but it seems they don’t matter.

This is what it’s supposed to look like when I run a test.

So it seems it’s also found the other library I found was missing, libnsl.

So I tried running the appimage from the Downloads folder, and that worked too. It complains about not finding any udev rules, but they are there, in the distrobox’s /etc/udev/rules.d folder. (and in Aurora’s rules.d too, if that means anything). So maybe it’s running as root in the distrobox? Does that matter? Dunno.

Now I just have to figure out how to add it to my application launcher. I’m still not real clear about how distroboxes interact with Aurora, so I’ve got a bit of RTFMing to do.

Once again thanks so much for your help, much appreciated. :smiley:

You’re welcome!
From inside the distrobox:

distrobox-export --app Logic

You can also export command line binaries:

distrobox-export --bin /your/binary
1 Like

Yeah, I’ve just been experimenting with that. Haven’t got it to work yet… Originally I had downloaded the appimage and used Gearlever to “install” it. Using that launcher the app doesn’t work. I’ve tried deleting it with Gearlever, then adding it again, but it still won’t run.

Not sure what export does. I didn’t want to leave the app in distrobox’s (Debian in my case) Downloads folder, so I moved it to AppImages. If I run it from there from within the distrobox, it works.

I tried distrobox-export --app Logic. It seemed to work, and said the app would appear in my application list in a few minutes. Well, it did and it didn’t. It isn’t displayed in the list when I hit the application launcher button, but if I search for it in the list of applications it comes up. If I right click on it to edit the launcher it displays the Edit Applications menu, but then I can’t find it in the Edit Applications function. So no idea what I’ve fouled up there. And there seems to be no way to remove it…

There is also some stuff in .local/share/applications, which probably shouldn’t be there.

Bit fed up of it today, I’ll have another look tomorrow.

:wink: Ian

Well, finally got it set up. I ended up not using export as it seemed to be doing some weird things. Instead I used the menu editor to manually create a launcher. Turned out to be really easy. Just put distrobox in the program and enter --name debian -- '~/AppImages/logic.appimage' in the command line arguments.

The program in the AppImages folder was originally created by Gearlever, and it turned out it runs fine if it’s launched in a debian box but not directly within Aurora.

I checked out pulseview as well, which is also launched from debian distrobox, and its setup is slightly different. It ha distrobox-enter in the program name, and -n debian -- /var/home/ian/AppImages/pulseview.appimage in the command line arguments. Although interestingly it also works if launched directly within Aurora. This launcher just has /var/home/ian/AppImages/pulseview.appimage in the program name and nothing in the command line arguments.

I’m so impressed by distrobox. Makes it possible to run any linux app at all from within Aurora. Barking frilliant.

Now I just have to get Wine to work…

:wink: Ian

Noticed another weirdness lately that may be a bug. I set up the launcher with the command /usr/bin/distrobox-enter (and the usual command line stuff), and then tried to launch it but it didn’t launch. So I put the exact same command into the console and it worked perfectly. Mucked around with the menu editor and eventually discovered the “run in terminal” option on the advanced tab, so I checked that checkbox and ran the launcher again. It opened a console and displayed an error message program distrobox--nter not found. What th…? Double checked the definition in the launcher and it was absolutely positively /usr/bin/distrobox-enter

Here’s the command setup

Here’s the output:

Fortunately the workaround is pretty simple. Just put /usr/bin/distrobox in the command line (or just distrobox I guess), and enter -n <distrobox name> etc in the command options. Works fine.

:wink: