Subj : Re: First World Problems. To : Accession From : Digital Man Date : Sat Mar 05 2016 07:35 pm Re: Re: First World Problems. By: Accession to Digital Man on Fri Mar 04 2016 04:27 pm > Hello Digital, > > On 03 Mar 16 18:21, Digital Man wrote to Accession: > > >> system.exec("/usr/bin/nano"); > >> bbs.exec("/usr/bin/nano",mode=EX_NATIVE); > >> > >> ..and neither of them seem to work. Synchronet runs as root so > >> permissions are not an issue. > > DM> Both of these will execute "/usr/bin/nano". But if you want the > DM> input/output to be intercepted and sent to the remote user, you'll > DM> need use either bbs.exec() with the EX_INR and EX_OUTR flags set (for > DM> input and output redirection), like > DM> so: > DM> bbs.exec("/usr/bin/nano", EX_NATIVE|EX_INR|EX_OUTR); > > This worked! And oddly enough worked awesome at that! > > DM> But the best way to run an external editor is to configure it as an > DM> external editor (in SCFG) and run it from JS with > DM> console.editfile(filename); > > Not sure I understand what you mean here. By "run it from JS" you mean nano? The editor. The console.editfile() method uses whatever editor the user has selected as their preferred editor to edit the filename passed. > I suppose I should explain what is going on. I asked Nightfox if he could > rip out the function in SlyEdit that reformats MSGTMP with quoted initials, > so I could offer up nano as a message editor as well (and possibly even vim > in the future), since they can be used in "restricted" mode where nothing on > the disk can be altered except the file loaded, ie: MSGTMP. > > So after all of that is done, and a new formatted MSGTMP is created, the JS > runs nano, where you can edit and save, and then the JS posts the message > and exits back to the BBS. > > So if there's a better way than the first option above you gave, by all > means explain it to me in laman's terms and I'll give that a shot as well. It sounds like you want to use SlyEdit as a quoter, but not an editor? There's really no built-in method in Synchronet to do that (support external "quoters"). If you just want to use nano as an editor and don't need anything from SlyEdit, the proper way would be to configure nano in SCFG->External Programs->External Editors. digital man Synchronet "Real Fact" #35: Synchronet's Windows DLLs are built with Microsoft Visual Studio/C++. Norco, CA WX: 59.6øF, 84.0% humidity, 3 mph ESE wind, 0.00 inches rain/24hrs .