LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do i run a script upon bootup, but in a terminal window (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-run-a-script-upon-bootup-but-in-a-terminal-window-673116/)

xmrkite 09-29-2008 01:10 PM

How do i run a script upon bootup, but in a terminal window
 
Hello,

I'm trying to create a backup script that will run upon bootup, but in a terminal window, after xfce has loaded, and run it as root.

Any idea on how to do this?

I know how to run the script at bootup, but it will only run before xfce loads, and it will run in the background so i won't be able to monitor its progress.

Is there some sort of command i use to get it to pop up in a new terminal window?

Any ideas?

-Thanks

ncsuapex 09-29-2008 02:28 PM

not sure about xfce but in KDE you would put scripts in ~/.kde3/Autostart

xmrkite 09-29-2008 02:34 PM

Thanks for the quick reply, but even in kde, the script would run in the background if i'm not mistaken. I want it to pop up after the user logs in so that I can see the terminal output while the script is running, since it takes a few minutes.

Any ideas?

ilikejam 09-29-2008 02:43 PM

Something like 'konsole --noclose -e /path/to/script' or 'gnome-terminal -x /path/to/script' should do what you're looking for.

Dave

xmrkite 09-29-2008 03:52 PM

Cool, but how would i do that in xfce, since i don't have the kde or gnome terminals?
-Thanks

ilikejam 09-29-2008 03:55 PM

Everyone should have xterm, so: xterm -hold -e /path/to/script

Dave

xmrkite 09-29-2008 03:59 PM

OK, i got it.

xfce4-terminal --hold -x /path/to/script

That opens a terminal window, runs a script, and keeps the window open even after the script is done.

-Thanks for your help, your replies helped a ton.


All times are GMT -5. The time now is 08:22 PM.