On Thu, 23 Feb 2012, Nils Kneuper wrote:
# > But heres an idea instead -- the returned application or emitted .desktop # > could contain an invocation of a wrapper script (say), that would pop up # > zenity or whatever warning and then in turn possibly run pnd_run.sh proper; # > ie: pushing the effort to up front during discovery (which is already done # > and has parsed PXML) rather than burdening every app launch? # # Which is problematic with eg the new kernel. After a suspend to ram all apps # are rescanned. Now imagine one old "test prog" that a user almost forgot about # leading to those messages after every scan. IMO it is more sane to only issue # the warning when a user tries to launch the application. The best way for this # is probably storing the information in a file which is parsed/used by # pnd_run.sh meaning the generated .desktop files. Just store the version in # there and eg grep for the correct entries in the commented out area.
You misinterpret --
pndnotifyd rescans, and fills the Exec= line in the .desktop with a pnd_run_warning.sh instead of pnd_run.sh
Then when the user runs one of the 'old' apps, the warning comes up, and pnd_runm_warning.sh then runs pnd_run.sh with the same args, and everything goes.
ie: Easy change, no speed hit, just works ;)
# Eg we could add this at the end of each .desktop file: # # # automatically extracted OS version requirement information: # # REQUIRED_OS_MAJOR=1 # # REQUIRED_OS_MINOR=7 # # REQUIRED_OS_RELEASE=0 # # REQUIRED_OS_BUILD=0 # # In pnd_run.sh we could simply grep using these terms: # # grep "REQUIRED_OS_MAJOR" application.desktop | cut -d "=" -f2 # grep "REQUIRED_OS_MINOR" application.desktop | cut -d "=" -f2 # grep "REQUIRED_OS_RELEASE" application.desktop | cut -d "=" -f2 # grep "REQUIRED_OS_BUILD" application.desktop | cut -d "=" -f2
pnd_run gets run by .desktop, it doesnm't (currently) look back where it came from. It shouldn't really care about how it was invoked (via .desktop or directly, since it is not always run from a .desktop)
jeff
-- If everyone would put barbecue sauce on their food, there would be no war.