Re: Ecasound-list Digest, Vol 100, Issue 1
"Charlie Laub" <[email protected]> Fri, 26 May 2017 08:48:35 -0700
| Newsgroups | gmane.comp.audio.ecasound.general |
|---|---|
| Message-ID | <[email protected]> |
<https://sourceforge.net/p/ecasound/mailman/message/35840948/> [ecasound] Running ecasound within a script From: rocco <rocco556@ne...> - 2017-05-15 14:52:54 Hi, I've been writing a tcl/tk front-end for ecasound for quite a few years now. The whole time I've run it from the console so I can interactively work with the program for testing and such things. Then I finally got the brilliant idea (yes... that's sarcasm) to run it from an icon on the desktop. No matter what I do, I can't get ecasound to run within my front-end unless my front-end is started from the terminal. I use the mechanism in tcl/tk that allows me to create a pipe to ecasound that in turn allows me to send commands to ecasound. When I run my program from the terminal, I go to another terminal and issue the command... ps -C ecasound -o pid=,args= I get... 871 ecasound -c But when I run my front-end from an icon on the desktop, and issue the 'ps' command, I get... 956 [ecasound] <defunct> Since the program 'tkeca' is also written in tcl/tk and uses ecasound as the back-end, I looked at how that program established a pipe and even how the pipe was configured. It sets things up exactly how I do. When I tested tkeca, I got the exact same results... never works from an icon... but always works if ran from the terminal. I experimented with running ecasound (in interactive mode) from bash scripts and tcl/tk scripts in many different ways and I get the same results no matter what. I've done everything I can to solve this matter... I read both the ecasound and ecasound-iam manuals top to bottom... the tcl/tk manuals top to bottom... googled the topic... tried running ecasound in the background. Nothing works unless I run my front-end from the console. I know that for us linux audio people, it would be no problem having to start up a terminal and issue the command to run the front-end (and then have the terminal there permanently). But this is an attempt to create a legitimate DAW with complete DAW features that you see in all the other leading DAW's. It just wouldn't be very professional to ask the average user to run it from a terminal. Any suggestions on how to resolve this would be much appreciated... Thank You Rocco Re: [ecasound] Running ecasound within a script <https://sourceforge.net/p/ecasound/mailman/message/35843966/> From: rocco <rocco556@ne...> - 2017-05-17 06:56:21 On 05/15/2017 07:32 AM, rocco wrote: > I've been writing a tcl/tk front-end for ecasound for quite a few years > now. The whole time I've run it from the console so I can interactively > work with the program for testing and such things. Then I finally got > the brilliant idea (yes... that's sarcasm) to run it from an icon on the > desktop. No matter what I do, I can't get ecasound to run within my > front-end unless my front-end is started from the terminal. I didn't mark this as [SOLVED] because I just want to check with anyone that knows if this solution will be permanent and work with all systems. First... it took forever for me to find a way to capture the ecasound errors from tcl. When I did, it said "TERM environment variable not set." In tcl/tk I set TERM to 'linux'. Nothing I read told me how to properly set TERM. The subject is very confusing. Two questions... Will the value 'linux' work on all systems? Is it ok to set TERM in my tcl/tk script that runs ecasound? Thanks Rocco Hi Rocco, I had a similar problem and I figured out that I needed to both set the TERM variable and the COLUMNS variable in order for my ecasound script to work properly. Here are some more details. In my application, ecasound is to be run on a remote client (C) from server (S). To do that a script on S connects to C using ssh and runs a bash script file on C that contains the ecasound commands. When I was developing the code to do this I found that I could run the script file on C by physically logging into that machine and then manually running the script but if I tried to do this over ssh I got some errors (like your TERM not set message). It seems that the OS realizes that the ssh session does not have a physical display connected to it locally, so TERM is not set (it's unset, meaning it has no value assigned). Also, the number of columns in the text stream was for some reason set to 80, and sometimes my ecasound command lines were LONGER than 80 characters such that ecasound tried to read only the first 80 characters. Until I figured that out I got some confusing (to me) errors. I solved this problem by setting the TERM and COLUMNS environmental variables as part of the ssh connection string, which causes these values to be used for the ssh session. To figure out what I should use for TERM I simply executed 'echo $TERM' when physically logged into C where the script worked, and got 'xterm' as the value. For COLUMNS I just chose to set it to 140, a large enough value for my needs. You might be experiencing something similar with your icon-driven script. Try to set TERM and COLUMNS and see if that helps. -Charlie --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Ecasound-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ecasound-list