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.
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.
if you don't use this is in your .xinitrc,
and use this instead:
exec <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..
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.