Automatic script execution

Hardware, coding, music, graphic and various applications

Moderators: Mug UK, [ProToS], lp, moondog/.tSCc., Moderator Team

Latz
Captain Atari
Captain Atari
Posts: 232
Joined: Tue Mar 08, 2011 6:02 pm
Location: Germany
Contact:

Automatic script execution

Postby Latz » Tue Oct 16, 2018 1:33 pm

Hi,

this is with EasyMinT + current FreeMinT update + TeraDesk:
I want to create a shell script which is executed automatically by TeraDesk after start, but it don´t work like "the linux way", e.g:

Script (example), created with QED, unix lineendings, saved as "test.scr" on ext2 fs and set it to "executable".

Code: Select all

#!/bin/bash
#
ls -AR ~/ > /tmp/index_home.txt
echo "Listing complete"

- This script works correct on Ubuntu, doubleclick on "test.scr" creates a correct file /tmp/index_home.txt.
- With FreeMinT, the script works correct when i run it from bash(toswin2) with command "/home/test.scr", but it don´t work
when doubleclick on file "test.scr" in TeraDesk window: First, "enter parameter" dialog opens, after "OK" TosWin2 console window
opens with message "Process terminated. Hit Return.,..". And /tmp/ is empty, no file created.

Tested another way: Script not set to "executable", *.scr files assigned to /bin/bash in TeraDesk: This works as expected, but
normal files (non-executable) can´t be assigned as "Autostart" in TeraDesk.

What am i doing wrong? Any ideas?

Thanks,
Lars
Falcon/CT60 90MHz, 14+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 80GB IDE HD, DVD-RW.
Falcon/CT63 95MHz, 4+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 16GB IDE CF card, CD-RW.

ThorstenOtto
Captain Atari
Captain Atari
Posts: 417
Joined: Sun Aug 03, 2014 5:54 pm

Re: Automatic script execution

Postby ThorstenOtto » Tue Oct 16, 2018 2:44 pm

Latz wrote:What am i doing wrong?


Maybe nothing. Looks like this is just not supported by teradesk.

Any ideas?


You could try to manually create an entry in teradesk.inf. It might look similar to

Code: Select all

   app=
   {
      path=C:\bin\bash
      cmdl=%f -c c:\test.sh
      atype=
      {
         appt=3
         flag=0x2010
      }
   }


However i couldn't figure out yet how to get the parameters passed, bash is started but does not execute the script.

Latz
Captain Atari
Captain Atari
Posts: 232
Joined: Tue Mar 08, 2011 6:02 pm
Location: Germany
Contact:

Re: Automatic script execution

Postby Latz » Wed Oct 17, 2018 9:04 am

Hi,

thank you, Thorsten, i found it works like this:
- script as executable
- copy and rename /bin/sh to sh.tos (for not asking for parameters at start)
- In TeraDesk, assign sh.tos with parameter "-c /c/test.scr" (no placeholder like "%f"; backslashs DON´T work!)
- sh.tos can be set to autostart in TeraDesk and executes the script correctly.
- Assign "*.scr" to open with sh.tos and running the script with a doubleclick works, too.

Latz
Falcon/CT60 90MHz, 14+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 80GB IDE HD, DVD-RW.
Falcon/CT63 95MHz, 4+128 MB RAM, CTPCI/Radeon 9250/RTL8139, Carte Eiffel+LCD, 16GB IDE CF card, CD-RW.


Social Media

     

Return to “Professionals”

Who is online

Users browsing this forum: No registered users and 7 guests