Author Topic: How to set up regular automatic upgrading in KDE 4  (Read 1262 times)

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4037
How to set up regular automatic upgrading in KDE 4
« on: October 14, 2009, 08:29:32 AM »
Two years ago I wrote an application called AutoUpgrade to make it easy to set up cron jobs for a weekly upgrade of pclos with varying degrees of automation.

Since then, Update Notifier has appeared and so has KDE 4. AutoUpgrade is not compatible with KDE 4. However, KDE 4 has an excellent task scheduling interface which makes the job almost as easy, so AutoUpgrade is not really needed anymore and I don't plan to fix it.

For those who like to install the latest as and when it becomes available, Update Notifier is the way to go.

If you prefer to upgrade weekly, perhaps because you want to schedule rkhunter to check your system before the upgrade and then reset its MD5 sums after the upgrade, here's how:

First, ensure kdeadmin4 is installed (use Synaptic) and crond is set to run on boot (PCC).

Alt+F2 and type "kdesu systemsettings" to bring up root's Settings dialogue. Then go to System -> Task Scheduler and click New Task. Enter "apt-get update" as the command and choose the time you want it to run every week (or month or day). Click "Enable this task".

If you want the upgrade to be fully automatic, add " && apt-get dist-upgrade" to the end of the command. If you want Synaptic to open without requesting a password (so anyone sitting at the machine can alter what's installed), add " && export DISPLAY=0: && synaptic" instead. If you just want to ensure your package lists are always reasonably current to save reloading when launching Synaptic by hand, choose to update at least once a day but leave the rest of the command blank. Similarly if you want Synaptic to require a password. Click OK and Apply and close the Window.

If you just want package lists updated or want a fully automatic upgrade, you have now finished. If you want Synaptic to launch automatically you now need to open systemsettings as your normal user from the "Configure your desktop icon and navigate to the Task Scheduler once more. Open up a New Task.

If you want Synaptic to launch without requiring a password (from the root task you've just set up) set the command "xhost local:" to run just before the time you set for root's task. This will allow root to open the Synaptic window on your screen.

If you want Synaptic to require a password, set the command "export DISPLAY=0: && kdesu synaptic" to run five or ten minutes after the time you set in root's schedule.

You should now have automatic weekly (or whatever frequency you chose) upgrading set up the way you want it. Now you can forget all about it and enjoy using the computer.


« Last Edit: April 21, 2010, 06:07:06 AM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline newbi462

  • Hero Member
  • *****
  • Posts: 629
Re: How to set up regular automatic upgrading in KDE 4
« Reply #1 on: June 01, 2010, 02:56:58 AM »
Is there a way to keep shutdown or restart from killing the process if it is running? and is there a way to display some sort of notification during the upgrade process?
« Last Edit: June 01, 2010, 03:03:08 AM by newbi462 »

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4037
Re: How to set up regular automatic upgrading in KDE 4
« Reply #2 on: June 01, 2010, 03:01:18 AM »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline zakoz

  • Jr. Member
  • **
  • Posts: 21
  • Postatem Obscuri Lateris Nescitis
    • Web Profile
Re: How to set up regular automatic upgrading in KDE 4
« Reply #3 on: June 06, 2010, 07:01:43 PM »
... AutoUpgrade is not really needed anymore and I don't plan to fix it.


.. that's too bad  :'(

AutoUpgrade was a Killer App for me and I'm sure gonna miss it terribly; esp the part where I just called my less CLI-inclined kinfolk on the phone and told them to 'order AutoUpgrade from the App Store'  (their reference for getting things from Synaptic).

They'll just have to update their PCLinuxOS by hand now. Your app spoiled me to the point that I'm not willing to travel set up a Cron Job.