Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 04 Apr 2020, 20:29
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
How to auto start programs on boot-up?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
nitrobanshee

Joined: 06 Aug 2008
Posts: 18

PostPosted: Sun 14 Dec 2008, 19:35    Post subject:  How to auto start programs on boot-up?  

Please someone help I am running puppy 4.1 and need to find out how to autostart a program on boot up. The program is here http://www.efianalytics.com/TunerStudio/beta/ This is for my car PC. The file that starts it is called TunerStudio.sh witch is a start up script for it. I think that my main problem is that I can not start it from the terminal. I start it by clicking on the TunerStudio.sh file in ROX. I read the sticky on starting programs but still do not under stand it. I think that the reason for this is I cannot start it from the terminal by typing TunerStudio, or TunerStudio.sh. Buy the way this program runs with Java.

Please help me!!!!!!!!!!!

Thanks Jeremy
Back to top
View user's profile Send private message 
vtpup


Joined: 15 Oct 2008
Posts: 1327
Location: Republic of Vermont

PostPosted: Sun 14 Dec 2008, 21:16    Post subject:  

If it has an .sh at the end of it, it is a script.

To start a script from the terminal you need to put a dot and a slash in front of the name of the script, like this:

Code:
./TunerStudio.sh


In most cases, you also need to be in the directory where TunerStudio.sh is before you type in the command to start it.

To move to a directory you use the command cd

Example:
Code:
cd /usr/share/sbin

moves you to the /usr/share/sbin directory.

If your script was in that directory, you could then start it with the command given earlier.

Try that out first to see if it works.

That won't autostart it, but will verify if it works by that method from the terminal.

If it does work, create a link to that script by opening up your home folder twice. In one of those windows hit the Startup folder to open its window.

In the other window click on the green up arrow at the top of the window. That will bring you upwards one directory. Navigate to the directory where your script is. Click on that script with your left button and hold the button down and drag it to the other Startup window you opened. That should put a link (symlink as they call it here) in that other directory.

If you don't know where your script is prior to these steps, you can find it with Pfind (Puppy's Find) in the main menu.

Hope this helps.
Back to top
View user's profile Send private message Visit poster's website 
SirDuncan


Joined: 09 Dec 2006
Posts: 836
Location: Ohio, USA

PostPosted: Sun 14 Dec 2008, 21:21    Post subject:  

A script must also have execute permissions to run. They usually have only read and write permissions when you first get them.
_________________
Be brave that God may help thee, speak the truth even if it leads to death, and safeguard the helpless. - A knight's oath
Back to top
View user's profile Send private message Visit poster's website 
perellicippo

Joined: 15 Dec 2008
Posts: 3

PostPosted: Mon 15 Dec 2008, 05:59    Post subject:  

in the /root dir there is the Startup directory and from the README.txt file located there...

Any executable or scripts (or symlink to) placed in this directory
will be executed after the X desktop has loaded.

This is handy if you want something to run automatically.

You can easily create a "symlink" (symbolic link) to an executable.
For example, say that you wanted to run /usr/local/bin/rubix (a game)
everytime Puppy is started. Use ROX-Filer (the file manager) and open
two windows, one on /usr/local/bin, the other on /root/Startup.
Then just drag 'rubix' across and a menu will popup and ask if you want
to copy, move or link, and you choose to link.

Note, if you want to execute something at bootup and prior to X desktop
loading, edit /etc/rc.d/rc.local.

that's all Wink
Back to top
View user's profile Send private message 
nitrobanshee

Joined: 06 Aug 2008
Posts: 18

PostPosted: Mon 15 Dec 2008, 23:23    Post subject:  

vtpup wrote:
If it has an .sh at the end of it, it is a script.

To start a script from the terminal you need to put a dot and a slash in front of the name of the script, like this:

Code:
./TunerStudio.sh


In most cases, you also need to be in the directory where TunerStudio.sh is before you type in the command to start it.

To move to a directory you use the command cd

Example:
Code:
cd /usr/share/sbin

moves you to the /usr/share/sbin directory.

If your script was in that directory, you could then start it with the command given earlier.

Try that out first to see if it works.

That won't autostart it, but will verify if it works by that method from the terminal.

If it does work, create a link to that script by opening up your home folder twice. In one of those windows hit the Startup folder to open its window.

In the other window click on the green up arrow at the top of the window. That will bring you upwards one directory. Navigate to the directory where your script is. Click on that script with your left button and hold the button down and drag it to the other Startup window you opened. That should put a link (symlink as they call it here) in that other directory.

If you don't know where your script is prior to these steps, you can find it with Pfind (Puppy's Find) in the main menu.

Hope this helps.


The ./ infront opens it in the terminal, but the system link does not open it up on startup. Do I need to edit the system link file to put ./ infront of TunerStudio?


perellicippo Thanks but I already read the readme and tried it but it still does not open it on startup.
Back to top
View user's profile Send private message 
vtpup


Joined: 15 Oct 2008
Posts: 1327
Location: Republic of Vermont

PostPosted: Wed 17 Dec 2008, 00:56    Post subject:  

I'm not an expert on Rox symlinks, but I didn't think you did have to do that. I checked out a couple of other scripts symlinks and I didn't see that, or in fact a way to add it -- but there are people here far more expert than me.

It is possible that your symlink isn't set to execute. Do a properties on the symlink in the "exec" column all three checkboxes should be checked, and at the top the owner and group should be root,root.

Same thing with the script itself.

Anybody else here who can help nitrobanshee get off the starting line?

EDIT:
PS Nitrobanshee, that's a pretty interesting application -- I just had a look at the website. I thought (from the name) it had something to do with car stereo, but actually it is EFI engine tuning. Very cool.

I was kinda wondering--this guy uses a computer in his car as a radio tuner?? And he needs it to start right away on boot? Now I get it.

If nobody can answer your question, maybe I'll be able to find the time tomorrow to download it and see if I can get it to start.

We'll fix your problem one way or another -- hopefully somebody beats me to it.
Back to top
View user's profile Send private message Visit poster's website 
nitrobanshee

Joined: 06 Aug 2008
Posts: 18

PostPosted: Wed 17 Dec 2008, 10:30    Post subject:  

I got it working Very Happy

I had to put the path to tunerstudio directory in the tunerstudio startup script. I tried this many times but is was not putting the path in the right spot. The new version of TS tells you how to insert the path in the startup script.

Here is what mine looks like

Code:
#!/bin/sh
#*****************************************************************************
# This script is used to start TunerStudio
#
#*****************************************************************************

# To launch from a desktop or toolbar icon you may need to
# uncomment this cd command and change the director to whereever you untared to, where the jar file is
 cd /usr/lib/TunerStudio/

# use this line if you are having problems with port scans hanging. Make sure your port is in the list!
#java -cp .:./plugins/:lib:./lib/*.jar -Djava.library.path=lib -Dgnu.io.rxtx.SerialPorts=/dev/ttyS0:/dev/ttyS1 -jar TunerStudioMS.jar

java -cp .:./plugins/:lib:./lib/*.jar -Djava.library.path=lib -jar TunerStudioMS.jar


So I added the cd /usr/lib/TunerStudio/ to the file close to the middle of it.

Thanks for everyones help
Jeremy
Back to top
View user's profile Send private message 
vtpup


Joined: 15 Oct 2008
Posts: 1327
Location: Republic of Vermont

PostPosted: Fri 19 Dec 2008, 00:15    Post subject:  

Glad you worked it out. Very Happy
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0572s ][ Queries: 12 (0.0184s) ][ GZIP on ]