Find the answer to your Linux question:
Results 1 to 4 of 4

Thread: Auto Reboot

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Auto Reboot

    I have seen a command line that you can do that will boot the system wait a given lenth of time then reboot the system for stress testing, but is there a way to set it up so it just logs out of (KDE/GNOME) then log back in?

    I have a file that someone gave me called smon haven't looked in it yet, but the comman you type in for a reboot is ./smon boot sleep 7200 \; reboot then on the next line you type in reboot. Thought I would add that last part if it would help.


  2. #2
    Linux Engineer
    Join Date
    Mar 2003
    I was thinking more along the lines of using crond specifically cron daily, with the command file you want executed in it.

    This would only get you to the login screen but demo's the point:

    From within cron daily a file running "shutdown -r now"

    Could be much smoother and closer to what you want using perl. I don't know perl so someone else will need the help you out on that.

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  3. #3
    Linux Engineer
    Join Date
    Sep 2003
    Knoxhell, TN
    if you don't use this is in your .xinitrc,
    exec <window-manager command>
    and use this instead:
    <window-manager command>
    X will exit as soon as the window manager finishes loading.. 'exec' tells it to wait for an exit code from the program before continuing with/exiting the script.. you could just try writing a temporary .xinitrc that would simply loop loading the wm command, exit the X server, and reload over again... not sure how it would be done 'cause i don't know shell scripting (except what i gathered from setting up a gentoo system)... maybe someone can give you a little more help with that.. i think it would just take an if/elif/then statement to work.. not sure..
    Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr

  4. $spacer_open
  5. #4
    We ended up setting the system to just do the whole boot, we are trying to see what patterns Linux is writing to the memory at different times, we all just figured it would be best to just test the whole boot and shutdown process instead. But I am still curious on how to just get X to shutdown then back without the whole reboot. Thanks for the input, I will pass it on.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts