-
Junior Member
registered user
Getting a program started at startup??
I need to start a program TRY.OUT which I have made using g++ in knoppix-autoconfig, but when I specify ./TRY.OUT in knoppix-autoconfig it gives "/etc/rcS.d/S00knoppix-autoconfig ./TRY.OUT file not found".
I copied TRY.OUT in /etc/rcS.d/TRY.OUT as well as /etc/init.d/TRY.OUT ; but still the problem is there.
Can anybody please help me.
ThankYou in advance...
-
Senior Member
registered user
You may not want it running as part of knoppix-autoconfig, especially if it depends on other services such as networking components and the like.
Best is to create a startup script for it.
cd /etc/init.d
vi tryout
(Use another editor if you don't like vi)
This will be a very simple shell script to start your application.
#!/bin/sh
cd /dir/where/TRY.OUT/is/saved
./TRY.OUT
Save it and exit. Make it executable.
chmod +x tryout
Now link it into your default run control folder (rc5.d for a graphical boot).
cd /etc/rc5.d
ln -s ../init.d/tryout S99tryout
You link will start with S##, which indicates it is a script that starts a program/service, and the numbers indicate the order compared to other services that it will start. S99 would make it the last thing to start.
-
Junior Member
registered user
Thank you !
Thank You for all your help. Hope this works. One question that still bother's me is, are these scripts kept in /etc/rc5.d started as root, and if I have installed Knoppix on my hard drive, are this scripts started before I login ??
Thanking you in advance ...
-
Senior Member
registered user
Yes, these are started as root and they start before you login.
change the last line of the script to-
su -c "./TRY.OUT" knoppix
if you want it to be started by the user knoppix.
Similar Threads
-
By atrick-pay in forum Hdd Install / Debian / Apt
Replies: 1
Last Post: 05-03-2005, 05:04 AM
-
By sirknot in forum MS Windows & New to Linux
Replies: 3
Last Post: 02-10-2005, 08:34 PM
-
By sirknot in forum MS Windows & New to Linux
Replies: 3
Last Post: 02-10-2005, 06:35 AM
-
By s10237 in forum General Support
Replies: 0
Last Post: 01-09-2005, 03:08 PM
-
By hokeypokey31 in forum General Support
Replies: 7
Last Post: 09-23-2004, 03:22 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Beelink GTR AMD Ryzen 9 5900HX 32GB RAM 500GB SSD Mini PC New In Plastic
$380.00
A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G
$13.99
EDGE SK Hynix 16GB (2 x 8GB) PC3L-12800S DDR3 SODIMM Laptop RAM NEW
$16.95
[ BULK LOT OF 20 ] UNITS of 8GB DDR4 Laptop RAM SAMSUNG, HYNIX etc.
$179.99
Team T-FORCE VULCAN Z 16GB (2 x 8GB) 288-Pin PC RAM DDR4 3200 (PC4 25600) Intel
$33.99
SK Hynix 8GB DDR4 1Rx16 -PC4-3200AA/ HMAA1GS6CJR6N-XN SODIMM
$10.00
Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3
$22.45
HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin
$15.90
HYNIX HMT31GR7BFR4C-H9 8GB PC3-10600R DDR3-1333MHZ 2Rx4 (LOT OF 8) DRAT-3
$86.00
128GB Kit 4x 32GB PC4-17000 LRDIMM DELL POWEREDGE R730xd R730 R630 Memory RAM
$127.96