SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
running slackware 10
I would like to have a program run when I log in from the non GIU interface, the basic one with slack. I just dont know where to add the script. Its a program that all users have access to.
I see alot of post regarding starting a program at boot, but few regarding login, that have helped.
One post did say it does not matter to start a program at login, that you can just start it at boot, and every user will be able to access it
PS it needs an internet connection to work, so I would need it to run after my internet connection has been established
Is it called "run_client"? If so, is run_client a binary?
Don't type "echo $PATH run_client &". Only type "echo $PATH" to see what directories are currently in your path. It is used for information only.
If "run_client" is a binary and if it is in your path then you will only need to type "run_client" without the quotes. If "run_client" is in a directory that is not currently in your path then you need to put the directory (not the program) in your path. For example, if "run_client" is in the /usr/bin directory then you would do "export PATH=$PATH:/usr/bin". After that you will be able to type "run_client" and the program will run.
Another way to determine whether "run_client" is in your path is to type "which run_client" without the quotes. If it is in your path it will show you the directory it is in. If it's not in your path it will say something like "no run_client found in this directory, that directory or that other directory".
If you know exactly where "run_client" is, can you type "file /path/to/run_client" and then post back here what it says?
with regards to file /usr/BOINC/run_client I get this result...
/usr/BOINC/run_client: ASCII text
It's a text file and it runs when you type run_client & ?
Must be a script, I guess. Still, it should say something like "Bourne again script, executable".
Anyway, if you want it to stay in your path after you log out and in then you should do this:
1. Go to your home directory and type "touch .bashrc" without the quotes.
2. Open .bashrc with your favorite editor and type the following:
Then save the file. From then on every time you log in and open your xterm "run_client" will be in your path. If you ever decide to take it out of your path, for whatever reason, just comment it out by typing a "#" at the beginning of the "export" line.
One thing though...be sure that your .bash_profile says:
if [ ! "$BASHRC" -a -f ~/.bashrc ]; then
If it doesn't then put that in the .bash_profile file exactly as quoted.
didnt work. input exactly as you have it, in both files.
is it possible that when I log in from the CLI (runlevel 3) that its not even looking for .bash_profile ???
I thought I read somewhere that .bash_profile was for logging in with a GUI.