[issue320] ksmarttray does not check for updates as regular user

Sunny at Labix Tracker tracker at labix.org
Thu Jul 19 14:55:48 PDT 2007


New submission from Sunny <sloncho at gmail.com>:

Problem details:
If ksmarttray is running as a regular user, it can not run smart-update, as root
privileges are required. This is OK, and expected. As a workaround, I have a
cron job to perform smart update - so I can actually control how often I refresh
the channels.

Upon the first start of ksmarttray, it verifies the lastKnownSTatus, and because
it is empty, it goes and executes "smart upgrade --check-update", which can be
run as regular user, and displays if there are pending updates. But after that,
it never executes it again, even if another process (my cron job) refreshes the
channels, and there are actually updates.

There are 2 solutions to this problem, and each one has it's drawbacks:
1. Run "smart upgrade --check-update" on every timer callback (i.e. automatic
updates), even if the "smart-update" part fail. Can be easily accomplished, if
the lastKnownStatus is set to "" on every internalCheckUpgrades call. The bad
thing is, that it is going to "re-flash" the icon on every iteration untill the
updates are applied.
2. Run "smart upgrade --check-update" on manual check only, by setting the
lastKnownStatus="" in manualCheckUpgrades. The drawback is obvious - it requires
user's action.

Of course, it can be more complicated, so ksmarttray checks if it runs as root
or not, and decide based on this, but I do not have enough knowledge how this
should be implemented.

Anyway - this root/user problem is good to be solved somehow. I'm ready to
submit a patch for the above mentioned "simple" solutions, unless someone else
is willing to implement something more robust.

Cheers
Sunny

----------
messages: 1173
nosy: sunny
priority: bug
project: smart
status: unread
title: ksmarttray does not check for updates as regular user

_______________________________________
Labix issue tracker <tracker at labix.org>
<http://tracker.labix.org/issue320>
_______________________________________



More information about the Smart mailing list