1

I have Ubuntu 10.10 installed on a machine for my parents. The thing is they never request updates from Update Manager even the manager itself prompted them so. Moreover, when they are done with whatever they are doing on Ubuntu, they always leave the computer on. And I always have to come back and shut the machine down. Sometimes, the computer even sit idle for hours.

So I want to know whether this is possible in Ubuntu. I am thinking of a script that will be activated after the machine is idle for x minutes. When x minutes have elapsed, Update Manager will automatically update everything listed. (I recall that you need the admin password for this, so is there a workaround?) After all the updates are done, the machine will automatically shutdown.

Is this possible?

2 Answers 2

2

There are a few packages that may help with this:

  • unattended-upgrades installs security updates automatically

  • powernap suspends or shuts down the computer when there are no processes running from a given list

Although finding the right list of important processes may be difficult... powernap is more targeted at servers.

1

I am thinking that you could start with a screensaver, so you now get the hook for Idleness done for you, which then kicks off the update in background and shutdown. I say in background, with nohup so even if the screensaver is dismissed the update isn't killed stone dead (log this, and it's stderror somewhere you can get to though!). The shutdown however should be based on the update finishing AND machine being still Idle, so nobody gets a surprise shutdown.

Bear in mind that not all Ubuntu updates will run unattended - which may put a spanner in your works here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .