Scripts after startx

I want to autorun a shell script which
inculde start two java programs and some shell scripts

I using fedora 9 and I had put in Personal > Sessions
/bin/sh /myscript.sh

but it got a problem when I start firefox from one of the java program, it said "Firefox is already running but not responding..."

However, if I run the script from terminal manually, it works well.

Is there any other conf file I can set so that the script can run after I login and startx into a xwindow?

how do you start your program?
did you try puting your script in /etc/rc.local ?

  • nilesh

Thanks your reply.

I tried two different code to put my script in /etc/rc.local

Here is my /etc/rc.local

#!/bin/sh
 
touch /var/locak/subsys/local
 
/bin/sh /folder/script.sh

or

#!/bin/sh
 
touch /var/locak/subsys/local
 
cd /java_folder
java java_program

Both no response.

  1. Did you check logs why its not running?
  2. Are those script executable?
  3. You can also try putting them into your bash_profile.
  4. Are you using any environment variable, if yes you have to specify that path and export while running your script.
  • nilesh