Build Audacity with mod-script-pipe on Raspberry Pi [SOLVED]

I’ve compiled Audacity 2.2.2 as well as mod-script-pipe.so. I’ve also run make install. For my installation, the audacity executable is located in /usr/local/bin/. I’ve tried all of the locations to copy mod-script-pipe.so to register it with no avail. When accessing the modules dialog, Audacity returns

No modules were found

So far, I’ve tried these locations:

/usr/local/bin/modules/
/usr/local/share/audacity/modules/
~/audacity-build-directory/modules/
~/.audacity-files/modules/
~/.audacity-data/modules/

When I execute audacity as root (i.e., sudo audacity) the module is read, but I don’t know which copy of the file is being read, nor how to fix the installation so I can run audacity as a non-priviledged user. Any tips on getting mod-script-pipe to load correctly?

It should work in:

~/.audacity-files/modules/mod-script-pipe.so

Note that after enabling it in Preferences, Audacity must be restarted.

That location doesn’t work. The only path I can get it to register is:

/usr/local/share/audacity/modules/mod-script-pipe.so

and ONLY when executing Audacity as root via sudo audacity. I have successfully registered and loaded the module when executing as root. The non-privileged user can’t see the file, probably because of a permissions problem.

You should not need to run Audacity as root.

/usr/local/share/audacity/modules/mod-script-pipe.so

should also work, but should not require running as root. Is your user account the owner of mod-script-pipe.so

I’ve got it mod-script-pipe in:

~/.audacity-files/modules/mod-script-pipe.so

and the permissions are:

-rwxrwxr-x 1 <user> <user> 409320 Mar 19 13:35 mod-script-pipe.so
$ ls -al ~/.audacity-files/modules/mod-script-pipe.so 
-rwxrwxr-x 1 pi pi 40552 Mar 19 15:55 /home/pi/.audacity-files/modules/mod-script-pipe.so

Still doesn’t work.
2018-03-19-160244_1024x614_scrot.png

and I presume that you are logged in as “pi”?

Yes sir. Sorry for the trouble, and thanks for the help!!

I don’t understand why it only works for you when running as root, so I’ve posted to the developer’s mailing list to see if anyone there has any ideas.

I’ve done some more checking and confirmed the following conditions:

  1. The module only loads when audacity is run as root, and will load if the module is located in either:

/root/.audacity-files/modules/mod-script-pipe.so
or
/usr/local/share/audacity/modules/mod-script-pipe.so

  1. The module will not run under the non-privileged user in any location that I have tried. I have confirmed permissions on files in all of the typical locations and am tending toward thinking it’s probably not a permissions problem.

  2. The location in the source where the module file paths are defined is in and about:

/src/AudacityApp.cpp (1275)

I can’t see anything wrong with the code (then again, I’m not a C programmer).

At this point, I suspect that the problem is seeing/loading the module requires a process that requires elevated privileges, although I don’t know what that would be. I’m going to do some checking along these lines, but there definitely seems to be a problem, either with the configuration of my Debian system (probably) or Audacity itself (possible).

What are the file permissions for your “/tmp” folder? (mod-script-pipe requires rw access to /tmp)

Launch Audacity from your normal log-in account, then look in “Help > Diagnostics > Show Log”. Anything in there related to the module?

Hello,
I have a quite similar issue. I have mod-script-pipe recognized in Preferences > Modules, and enabled, but it doesn’t seem to be loaded. The pipes are not created. Though it worked the first time after installation, it did not work anymore after the computer restarts.

Do you have an idea of what is going on ? :question:

Are you looking in “/tmp”?
On Linux, if mod-script-pipe is enabled (as can be seen in “Edit > Preferences > Modules”, but only after restarting Audacity), then you should see two files in “/tmp”:

/tmp/audacity_script_pipe.from.1000
/tmp/audacity_script_pipe.to.1000

The number at the end may be different (that depends on the logged-in user ID).

Yes, that is where I look for the pipes. I have this issue on two computers (Ubuntu & Linux Mint). No specific message related to mod-script-pipe in the logs. If I choose ‘ask’ for the module nothing shows up when Audacity starts.

Ixnay, If you launch Audacity and then open the Preference page for modules, does it say that the module “mod-script-pipe” is “Enabled”?

Yes, it does. (if I choose “Ask”, then if I start again I can read “Ask” in the preferences but actually it asks for nothing)

Like this?
ask.png

Oh I got the thing… It’s a problem of PATH too, it does not find the module but as the first time I started audacity from the installation folder, he found it the first time and saved it in the preferences. It works again when I start audacity from the installation folder. But now I fall into the same issue as the author of the thread…

Ok I put the module in ~/.audacity-files/modules/ and now it seems to work ! (I didn’t figure out why it does not work in the same folder as plugins) thnk you

“Modules” and “Plug-ins” are different. “Plug-ins” have to go in the plug-ins path, and “modules” have to go in the modules path.
If Audacity is properly installed at:

/usr/local/share/audacity

then Audacity should be able to find files that are in:

/usr/local/share/audacity/modules/<name-of-module>.so

However, I would recommend putting the module into:

~/.audacity-files/modules/<name-of-module>.so

as this is a “per user” installation and is independent of the installation path of Audacity.