Patch to have krun correctly handle scripts.

Ian Reinhart Geiser geiseri at
Thu May 6 19:53:00 BST 2004

This is my initial attempt at helping KRun deal with scripts better.  This 
patch does the following:
	1) Checks if the url is local
	2) Checks if the desired file has the executable bit set
	3) Checks a list of known script mimetypes to see if its able to run it.
The desired effect is that scripts that are remote, or are not set executable 
will be opened with what ever is their mimetype handler.  This should 
insulate us from the ever popular "click on this love letter" issue other 
desktops suffer from.  This also allows users who have applications written 
in javascript, ruby or python to execute script based applications normally.

The only immediate issue with this solution at this point is there are a 
hard-coded list of mimetypes we can handle.  Can anyone think of a sane way 
that we can make this list flexable without opening ourselves up to attacks, 
or users trashing their system.

Currently I'm using this patch with no issues, and its nice to have PyQt 
applications that now run when clicked. =)

	-ian reinhart geiser
-------------- next part --------------
A non-text attachment was scrubbed...
Name: krun_scripts.diff
Type: text/x-diff
Size: 1716 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list