Tiny Core Linux
General TC => Remasters / Remixes - Unofficial => Topic started by: m2 on September 19, 2011, 07:19:48 AM
-
I have a problem that can't find a solution how to run small script after tiny core is boot up in desktop.
Tryed this: (in bootlocal.sh)
----
sudo cp /opt/open.sh /usr/sbin
at now + 3 minutes < sudo –u tc open.sh &
#sudo -u tc open.sh &
----
last two commands isn't to do the trick...
(I want to do some things in tc user desktop... or after desktop has loaded up... also I want run that script only once at after boot...)
At manually everything is fine when in desktop open aterm and hit open.sh & ... thats OK, but want to automate that.
Thanks,
-
Sometimes I feel commanding a script is hit or miss, however
this usually works
in bootlocal.sh if required late in the boot process
sleep 5
/path/to xx.sh
-
at now + 3 minutes < sudo –u tc open.sh &
Try
echo sudo -u tc open.sh | at now + 3
-
.X.d
Please read the FAQ.
-
I always feel like the FAQ's leaves me searching for more info...
I mean "opera &" ?? for someone who already knows the answers this maybe all they need, but for someone new to tc could naturally need a few more examples... Just imagine all the possibilities here?? I remember searching for answers to questions like "well how about a script?" is the script expected to be found in a specific location? is path important? is the file extension important? etc. etc..
just saying is all.. :)
-
It's standard unix execution, just as if typed in a terminal.
-
It is not TC's aim to teach basic Linux or Shell scripting.
TC is a tool set, and craftsmen are expected to know how to use their tools.
-
Hi, and thanks to all about answers.
I tested and put those given commands in bootload.sh but that wasn't to solutions. In some cases (coreplayer2) command was run by sudo(root) and that isn't do the trick because script that I want to run must drive in tc user after desktop is up. And others command wasn't work in right way for my needs (vitex). Anyway thanks to all...
Yes, solution was one again in FAQ... actually found it in here, http to wiki.tinycorelinux.net/wiki:the_boot_process
curagas hint to .X.d or /home/tc/.X.d/ was right place to put that script file to run way that I need.
Some tune...
I also tryed put run command straight end of /usr/bin/xsetup.sh file put that wasn't solution. Because I actually try to made livecd for my teaching course needs and wanted hide that my scripts little more from students... now it is easier find from tc user home directory even it is "hidden" in .X.d directory... but you can see it right away with ls -la command...
-
I think the wiki is great, it's answered a lot of questions for me.. Was just saying that maybe the FAQ's could be merged with the wiki to provide a stop avenue for learning and resolutions..