LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Auto start bash script after login to desktop (https://www.linuxquestions.org/questions/linux-newbie-8/auto-start-bash-script-after-login-to-desktop-798074/)

scripterJACK 03-26-2010 11:21 AM

Auto start bash script after login to desktop
 
Hi All,

I am using Fedora and trying to auto run a script soon after the unit boots to desktop. I found many suggestions and finally decided to use the Sessions->Startup Programs option (under System->Preferences->Personal->Sessions menu). I added my script in the Startup Programs with the command 'sh myscript.sh'. Now I have two questions here:

1. When I use the command 'gnome-terminal -e myscript.sh', I get 'There was an error creating the child process for this terminal' message after logging into the desktop. Can any one tell if I am missing something here?
2. Even if I use sh instead of gnome-terminal, I still want to see the script executing. In other words, my script has certain echo statements indicating the flow of the script. But I don't see any shell opening up with these echo statements showing up, after the unit boots to desktop. But the script was still executed with no problem.

Can anyone throw some light here?

Thanks

Samotnik 03-26-2010 05:21 PM

I think that output is directed to a terminal tty1. Try to redirect it to some file.


All times are GMT -5. The time now is 06:13 PM.