Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: christully on January 22, 2019, 07:58:25 AM
-
So, Google lead me to this:
http://forum.tinycorelinux.net/index.php/topic,6783.msg35691.html#msg35691
from which I gather that many years ago, the accepted method to do what I want to do is to put a simple script in ~/.X.d
I have done that:
/home/tc/.X.d/menu
#! /bin/bash
source /opt/bin/menu.sh
/opt/bin/menu.sh does exist and is part of core.gz (added by me), and runs if I just type menu.sh at the command line. And, i have just tested that from the command line I can type ~/.X.d/menu and get the result I expect.
So, my analysis is that my script in ~/.X.d is being ignored?
Or, Am I going about this all wrong?
-
Hi christully
Try changing the script in ~/.X.d to just:
/opt/bin/menu.sh &
-
Hi christully
Or does your program need a terminal to execute? Then maybe something like this:
exec cliorx /opt/bin/menu.sh &
-
Hi Rich,
Thanks for the suggestions!
Option 1 - no dice... Trying Option 2... also no dice...
Both options just dump me at the command line. I've tried several variations on the options you posted, including making sure that the file is owned by tc.
If I manually execute the ~/.X.d/menu file in either configuration that you posted, my scripts run. But none of the variations I have tried get it to run on boot.
:puzzled:
-
And, I think I may know why the ~/.X.d/ option is not working for me. From the wiki:
http://wiki.tinycorelinux.net/wiki:the_boot_process (http://wiki.tinycorelinux.net/wiki:the_boot_process)
#.xsession
…the file ”.xsession” in /home/tc, is called. It starts X, the X desktop, and also autostarts any custom scripts in /home/tc/.X.d.
I don't even have X installed. I am working with a "Core" install of TC. No GUI, just CLI.
-
Hi christully
Then place the command at the end of your /opt/bootlocal.sh file.
-
Rich - :)
That worked... But not quite.
My script runs but does not pause for user input like it is supposed to. Instead it just quits and drops me back at the command prompt.
Chris
-
Hi christully
Then try it like this at the end of your bootlocal.sh:
/opt/bin/menu.sh
-
Hi Rich. Is it possible the interactive script is expecting BASH and bash is not installed?
Just a thought..
Sent from my iPhone using Tapatalk
-
Hi coreplayer2
I don't think so. He said:
... If I manually execute the ~/.X.d/menu file in either configuration that you posted, my scripts run. ...
I think what may be happening is his menu script was being backgrounded and control was returned to bootlocal.sh instead
of waiting for input. I think that explains this result:
... My script runs but does not pause for user input like it is supposed to. Instead it just quits and drops me back at the command prompt. ...
-
For command-line scripts that expect user input, try ~/.profile. It gets executed on the tc user login.
-
Rich-
Thanks for the suggestions of why things are working the way they are - that makes sense.
curaga-
I will try that now!
-
And an update- curaga's suggestion worked like a charm!
I just added:
/opt/bin/menu.sh[\code]
to the end of my ~/.profile and my script runs like I expect it to run.
THANK YOU