<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I was just typing something almost identical!&nbsp;<div><br></div><div>Check out /etc/init.d/README and use /etc/init.d/rc.local (if Mint correponds with /etc/ layout of Ubuntu Server).</div><div><br></div><div>Assuming you are in init 5 you can just TERM/HUP (can't remember which, don't use X much) the root X process and it will respawn... but doing via cron is kinda fugly.</div><div><br></div><div><div>Calculate the 'limit' and inject that into root's cron (root so the user can't disable it). &nbsp;Cron runs at specific times so you need to calculate when to run it and specify it exactly such that if I log in at 9:30am (today) the following happens (you need to generate the first four numbers [minute,hour,day of month,month, day of week as per crontab(5)]):</div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>echo "0 10 6 12 * pkill -TERM Xserver" | sudo crontab -e&nbsp;</div><div><br></div><div>Using at(1) is a better option but do it as a wheel priviledged user... does wheel even translate to Linux?? (sry.. BSD thing, if not use root).</div></div><div><br><div><div>On 2009-12-07, at 11:47 AM, Sean Walberg wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">A foot in the door for more unpaid work?<div><br></div><div>OTTOMH:</div><div><br></div><div>Your user is publicuser. Store your skeleton in /usr/local/etc/publicuser.&nbsp;</div><div><br></div><div>In rc.local or whatever Mint calls it:</div>
<div><br></div><div>rm -rf /home/publicuser</div><div>(cd /usr/local/etc &amp;&amp; tar -cf - publicuser) | (cd /home &amp;&amp; tar -xf -)</div>
<div><br></div><div>In the skeleton's .bashrc</div><div><br></div><div>echo "reboot" | at now + 30 minutes</div><div><br></div><div>I'd hate to be around when someone is typing an email at T+00:30:01 though. Maybe a few minutes googling for "linux kiosk" will find a far more elegant solution. Not sure if you chose Mint because you like it or you have a particular need, but there appear to be some custom distributions or packages made for this exact purpose.</div>

<div><br></div><div>This also assumes the user can reboot the computer from the command line. It works in Red Hat/Fedora.</div><div><br></div><div>Sean</div><div><br><div class="gmail_quote">On Mon, Dec 7, 2009 at 11:33 AM, Mike Pfaiffer <span dir="ltr">&lt;<a href="mailto:high.res.mike@gmail.com" target="_blank">high.res.mike@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> &nbsp; &nbsp; &nbsp; &nbsp;The CLL is setting up a public access machine in the next couple of<br>
weeks. It is installed with Mint 8 (a multimedia Ubuntu fork). I would<br>
like to set up a couple of init scripts. The first will delete the<br>
public account home directory and copy a "clean" version in its place<br>
each time the computer starts. The second will shut down the computer<br>
after half an hour of use.<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;I haven't touched on cron since university 20 years ago and I've never<br>
written an init script. Having written a few shell scripts I know the<br>
copy script should be very simple. I'm not sure how to set up the timer<br>
script or make them run on start up. Would anybody be able to fire off<br>
some quick directions?<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;This may be a "foot in the door" situation.<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Later<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Mike<br>
_______________________________________________<br>
Roundtable mailing list<br>
<a href="mailto:Roundtable@muug.mb.ca" target="_blank">Roundtable@muug.mb.ca</a><br>
<a href="http://www.muug.mb.ca/mailman/listinfo/roundtable" target="_blank">http://www.muug.mb.ca/mailman/listinfo/roundtable</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Sean Walberg &lt;<a href="mailto:sean@ertw.com" target="_blank">sean@ertw.com</a>&gt; &nbsp; &nbsp;<a href="http://ertw.com/" target="_blank">http://ertw.com/</a><br>
</div>
_______________________________________________<br>Roundtable mailing list<br><a href="mailto:Roundtable@muug.mb.ca">Roundtable@muug.mb.ca</a><br><a href="http://www.muug.mb.ca/mailman/listinfo/roundtable">http://www.muug.mb.ca/mailman/listinfo/roundtable</a><br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--&nbsp;</div><div>Sean</div><br class="Apple-interchange-newline"></span></span></span>
</div>
<br></div></body></html>