TimeStretch icon indicating copy to clipboard operation
TimeStretch copied to clipboard

replace runInTerminal with unixCmd

Open madskjeldgaard opened this issue 3 years ago • 3 comments

Hi !

On Linux, the runInTerminal method will most likely emit an error about not being able to find xterm (see https://github.com/supercollider/supercollider/pull/4994). Therefore, this is a PR with an alternative suggestion: unixCmd. This will always work :)

madskjeldgaard avatar Aug 06 '21 10:08 madskjeldgaard

Thanks for this Mads. I appreciate your feedback. The issue is that on the mac, this just does nothing. It just doesn't run. But you are saying that on Linux, it works? I guess the better fix would be to check which OS the user is on and execute the desired method. Do you know what works on Windows?

edit: Hmm. Maybe unixCmd wasn't working because of BigSur....I'll be back. edit2: No. I've run into this before.

Could you test this:

		if(thisProcess.platform.asSymbol=='an OSXPlatform'){
			AppClock.sched((1), {("sclang "++fileName++"_"++chanNum++".scd").postln.runInTerminal});
		}{
			if(thisProcess.platform.asSymbol=='a LinuxPlatform'){
				AppClock.sched((1), {("sclang "++fileName++"_"++chanNum++".scd").postln.unixCmd});
			}
		}{
			"stretch2PlusChannels only works on mac or linux"
		}

spluta avatar Aug 07 '21 14:08 spluta

Just a comment here: as mads pointed out, runInTerminal has this problem on Linux, but it will be fixed in SC 3.12 as it is already fixed in branch develop: https://github.com/supercollider/supercollider/issues/4893#issuecomment-894154491

elgiano avatar Sep 02 '21 22:09 elgiano

Just a comment here: as mads pointed out, runInTerminal has this problem on Linux, but it will be fixed in SC 3.12 as it is already fixed in branch develop: supercollider/supercollider#4893 (comment)

Yeah this is really fantastic but for fixed release linux distros it's going to be a while before they hit 3.12 (although Debian bullseye is already at 3.11.2 it seems). But yeah it's a tiny and perhaps theoretical problem now that 3.12 is out :)

madskjeldgaard avatar Sep 03 '21 14:09 madskjeldgaard