Tiny Core Base > Micro Core

Microcore auto-start application after boot and keep it running

(1/2) > >>

skyp:
Hi,

I'm quite new to Linux and shell scripts, so i got some (hopefully easy) problem.
I need to run an interactive proprietary full screen console audio application after the system stands up. ALSA and dependencies are provided through TCE without problem. The executable is located on a cf-card (/mnt/sdc1) wich is mounted at boot time.

I've added the software to the /opt/bootlocal.sh with its full path and all necessary switches. Although its started at the end of the boot, but the cursor keeps blinking in the lower right corner: the program exits and if I hit Enter it gives me back the prompt. :o why?

If I type in manually (the same string I put in bootlocal.sh) it starts normally and stays working until I quit from it. I checked after boot if its maybe running in the background but its says nothing in the background. How can be managed this to work?  :-[

nitram:
Believe /opt/bootlocal.sh items run as root fairly early in the boot process. Should the software run as root? If not, remove the bootlocal.sh entry. Instead create a non-executable file in tc/.X.d/ with your executable command(s), reboot and test. For example, create /home/tc/.X.d/startups, 'startups' contains:

--- Code: ---firefox &
emelfm &


--- End code ---

If the partition that contains your executable auto-mounts at boot, then this should work okay. Be sure to provide the full pathway for the executable.

skyp:
Hey nitram thanx for reply!

The executable is a CLI application, its not using X, its character based. There is no graphical window manager on (Micro)Core, so there are no "/home/tc/.X.d/startups", not needed for this. 
BTW it's an embedded system without network connection, and limited keyboard interface, it doesn't matter if its root or not, as long as it has permission to write to the CF card...

curaga:
bootlocal.sh is run on /dev/console, which is not a normal terminal like a ncurses app would expect. Please launch your application in either root's or tc's ~/.profile.

skyp:
Thanx curaga!

Could you please help me with an example? As I told, I'm just scratching the surface of shell scriptin'.  :P So what does this mean "in ~/.profile"? Do I need move the executable into one of this folder? 

Navigation

[0] Message Index

[#] Next page

Go to full version