Running a prog at startupForum: Apps Topic: Running a prog at startup started by: abacus Posted by abacus on April 04 2007,21:12
Just HD installed DLS on four old computers here and installed BOINC on each where it runs very well... one thing that I would like to know and that is I am starting the boinc manager manually at the moment but would like it to start automatically on boot-up?If anyone can write an idiots guide to doing this I would appreciate it. Posted by greenpete on April 04 2007,21:42
Yeah good question!I don't mean to high jack your post but I too would like to know how to add app's to the boot list, whatever where ever that is!? I would like ssh and vnc server to run at boot, I have both installed. Sorry if this is the wrong way to post about my needs! Peter Posted by Felson on April 04 2007,21:58
/opt/bootlocal.shworks for 90% of what you will want. Failing that, you can use ~/.xinitrc If it is something you need to start after X starts. Posted by greenpete on April 04 2007,22:21
Thanks for your reply, that was fast! I have been messing with the bootlocal.sh file but have only managed to get text to appear at boot which isn't much use! What is the syntax/command for getting something to run and how do you find out what file to invoke in order to make it run at all? If I right click on the icon I use on the desktop to run the VNC server it tells me the command is '/usr.local/bin/vnc4x0.sh' but even if I run that from the treminal it doesn't work! Do I need to put 'start' or something along with it somwhere? I have also tried .xinitrc but with the same results! I am learning Linux commands slowly but surely, but don't yet have the needed knowledge to do what I want to! Thanks for your help, Peter Posted by Felson on April 04 2007,23:08
'/usr.local/bin/vnc4x0.sh' should be '/usr/local/bin/vnc4x0.sh' Posted by mikshaw on April 04 2007,23:18
If the program works by clicking the icon, it should also work from an X terminal (or linux terminal if it is not an interactive/graphical program) by running the command listed in the icon file.One thing to check is if you actually used the correct command. After reading what you posted, I notice a typo in your command ("/usr.local..." should be "/usr/local..."). If you made that mistake here, you may have made the same mistake before. Also be sure to add "&" after most commands in bootlocal.sh and .xinitrc. Failure to do this may result in failure of programs to run when they are expected. Does your command require root privilege? If so, the command should be preceded by "sudo". Finally, when using .xinitrc make sure that user commands are adding BEFORE the section that starts the window manager. That would be the part that begins with "case $DESKTOP in". This is not a strict rule if you know shell scripting well, but it's a good thing to stick to for now. Posted by greenpete on April 04 2007,23:20
Ooops, typo here, not when I type it in the terminal, I've typed it a million times!So I'm still fummoxed! I have tried putting 'sudo' before the command though I haven't tried the '&' sign at the end of the command. Is VNC an interactive and graphical program? If it is, I guess there is another proceedure to get it to boot at startup? I do feel I have hi-jacked this thread! Please forgive me! Posted by Felson on April 04 2007,23:36
na, was the same question for the most part. Moslty the same answer anyway.As for interactive, only in so far as it needs X running. All this means is you are going to need to put it in you .xinitrc file. As Mikeshaw said, make sure it's before the "case $DESKTOP in" part. Also, I think that VNC should be /usr/bin/vncviewer unless you are trying to start the server app. Not sure about that one, as I don't ahve it installed. Posted by abacus on April 05 2007,13:14
Have fiddled about BOINC needs to go into the .xinitrc file using the following... /home/dsl/BOINC/boincmgr &>/dev/null & putting it in the bootcal file justs results in a gtk error on startup. Now running 8 DSL machines with BOINC starting on bootup... I think I'll call them the Felson Array... sounds better than SETI Farm Posted by Felson on April 05 2007,18:51
LOL glad I could help
Posted by greenpete on April 05 2007,22:19
Thanks guys, I now have the VNC server running from boot!I edited the .xinitrc file, which as I remember is in '/home/dsl/' in case anyone that reads this in the future needs to know! Now all I have to do is find out what the command/address is for the ssh server so I can add that too! Maybe you know? Thanks again! Peter Posted by mikshaw on April 06 2007,01:17
grep ssh /home/dsl/.fluxbox/menu
|