Recording only as super user

Hello
I use Linux 18
The recording button works only if I start SC as sudo.
When I start SC without super user I can record but inly if I use the command s.record;

Is this a problem of installation?

Martin

OK, that’s really weird.

At first I thought maybe it was trying to record to the wrong location (where you don’t have write permission). But, if s.record works as a command, then obviously file permissions are not the issue.

In the source code, I see that what happens when you click the recording command in the IDE (I’m assuming you’re using SC-IDE) is ScIDE.defaultServer.record – which should not be any different from s.record.

  • Do you see any other on-screen feedback?
  • What if you run the IDE from the command line and try recording? scide in a shell. Maybe it will print some messages to the terminal that you don’t see in the interface.
  • Anything suspicious in system logs? /var/log/something…

I’m sorry I don’t have answer right now. It’s a very strange case.

hjh

If I run scide from a terminal it is the same. In my localserver GUI the only thing what works is the volume control (no CPU, Synths, Synthdef , Ugens), but in the main window, there I get the info about all this.
The "Boot " button is des-activated and when I try to boot again from the GUI I get the messages that the server is already running.
Also if I don’t start the server from startup.scd and open the server after scide is running with s.boot I have the same problem. Also running scide with an internal server want help.
As super user everything works fine.
Thanks Martin

Hm, I think we need detailed information about your configuration.

Which SuperCollider version? Current is 3.10.2. I don’t recall the packaging status for Ubuntu (is that what you mean by “Linux 18”? non-Ubuntu Linuxes have totally different version numbers, there is no “Linux 18”) but we have had problems with packaging. It’s quite likely that packages are far, far out of date. For Linux, presently, we recommend building from source. (I know, that’s not ideal.)

What is the result of "uname -a".unixCmd;?

If I run scide from a terminal it is the same.

Any printed messages in the terminal?

In my localserver GUI…

… which isn’t opened by default, so you’re doing something somewhere to open this window. (I assume s.makeWindow; in startup.scd?)

What else is in startup.scd? … e.g., “Also if I don’t start the server from startup.scd”… it would be really useful to know what you’re asking SC to do during startup. Maybe copy/paste your startup here.

the only thing what works is the volume control (no CPU, Synths, Synthdef , Ugens), but in the main window, there I get the info about all this.

That’s very strange. If it’s a local server, then both scide and sclang are supposed to be sending /status messages to the server, and they should both be receiving /status.reply messages. So either sclang isn’t getting the messages (unlikely) or the data aren’t getting to the window.

The “Boot” button is des-activated

That shouldn’t be the case. In ServerPlusGUI.sc, the only view that is ever enabled or disabled is the record button.

Unless… maybe you’re using a server GUI different from s.makeWindow?

Or do you mean the “Boot” command in the server menu? In the current version, when the server is booted, “Boot” in the menu changes to “Quit.”

I’m quite unclear which “Boot” button you mean.

and when I try to boot again from the GUI I get the messages that the server is already running. Also if I don’t start the server from startup.scd and open the server after scide is running with s.boot I have the same problem.

OK, so it isn’t the fact that you’re booting the server in startup.scd – but maybe there’s something else in startup.scd.

Also running scide with an internal server want help.

In that case, I’d expect s.makeWindow to be functioning while the IDE server status bar does not. (That’s a known issue for which there is no solution. The internal server does not open a network socket – it receives OSC directly from the sclang process that it belongs to. The IDE can communicate with a server only using network messages. Because the internal server doesn’t communicate on the network, the IDE can’t do anything with it.)

As super user everything works fine.

Again, very strange.

hjh

I hope this information helps

SC version 3.8.0
Built from branch ‘not a git_checkout’[na]

startup.scd // path: ~./config/SuperCollider
// =====================================================================
// SuperCollider Workspace
// =====================================================================
Server.default = Server.local;
s = Server.default;
s.options.blockSize = 16; // default 64
s.options.sampleRate = 441000;
s.options.numOutputBusChannels = 2;
s.options.numInputBusChannels = 2;
s.options.maxNodes = 65536;
s.options.memSize = 8192; // 1048576
s.options.maxSynthDefs = 16384;
s.options.device = “UA-22”;
s.boot;
s.meter;
s.makeGui(l);
“MARTIN HUG - CARMEN 2019”.postln;

uname -a
Linux drumanart 4.18.0-13-lowlatency #14-Ubuntu SMP PREEMPT Wed Dec 5 12:12:14 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

unixCmd command not recoginzed by my system

sudo lsb_release -a
Cosmic Release 18.18

As far us I can remember I built it from skratch.

If I start scide from the terminal I get:
scide
QApplication: invalid style override passed, ignoring it.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile

I’m quite unclear which “Boot” button you mean // The Boot button on the localhost server GUI

Martin

s.options.device = “UA-22”;

This is probably not relevant to the present problem, but device in Linux does not select the audio hardware to use. Device configuration is 100% through JACK. In Linux, device specifies the name under which this server instance will appear in JACK.

Again, this probably doesn’t affect the superuser issue, but it isn’t doing what you expected and you might as well remove it.

s.options.sampleRate = 441000;

Also not relevant (and appears to be a typo). JACK will override this, I believe.

SC version 3.8.0

This is quite old. Maybe there are some bugs in the server startup/handshaking process? Alberto de Campo did a lot of work on the server startup recently, so I’m pretty sure 3.10 is more reliable.

unixCmd command not recoginzed by my system

unixCmd is a sclang method.

I’m quite unclear which “Boot” button you mean // The Boot button on the localhost server GUI

I must be misreading you, then. GUI views have an enabled flag which prevents the user from interacting with the view. I thought you meant this one, but you must mean something else.

With apologies that it’s unclear – so, startup.scd boots the server and opens the GUI window, and the boot button reads “Boot” or “Quit”?

As a test, I added s.boot; s.makeGui; to my startup and: 1/ after library compilation, the window appears immediately with “Boot” in the button; 2/ a couple of seconds later, the server is up and running and “Boot” changes to “Quit.” The quit button does function as expected (as does the record button).

I’m afraid I still can’t guess what’s going on.

  • s.record works (so, not file permissions or missing directory).
  • “record >” button calls the same as s.record from within the same process, so it shouldn’t have a problem, but…
  • Or, “Start Recording” menu option in the IDE also calls the record method (but by way of IPC, so maybe something funky but I’ve never seen a problem on any of my machines).

Weird.

hjh

Hm… I remember now that s.makeGui was broken for a few years. 3.8 is probably affected not sure of that, but it’s definitely fixed in 3.10.x. If you really want to use the GUI window instead of the IDE server menu commands, I’d strongly recommend upgrading.

hjh

Do I have to remove the old version before installing a new one?

Martin

Yes, I think so. There are a lot of binary executables (scide, sclang, scsynth and UGen plug-ins). In Linux, it’s easier to keep them in the standard locations.

hjh