Bug 182210 - Open with... Auto choose best app
Summary: Open with... Auto choose best app
Status: RESOLVED INTENTIONAL
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_filetypes (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-28 22:48 UTC by Lukas
Modified: 2009-05-15 19:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas 2009-01-28 22:48:56 UTC
Version:            (using Devel)
Installed from:    Compiled sources

Hello :)

My suggestion is to make a list with preferred applications to open particular mime type (like *.mp3) (similar as it is now), BUT before opening choose the best option available according to currently running applications. Following example would explain the idea beter (I hope :))

Lets say I want to open an .mp3 file. Usually I use Amarok to play music and manage my audio collection, sometimes I use banshee to view movies and play music, and I prefer VLC when I want just to play single file.

The problem:

If I have set default app for mp3 as Amarok, and I open mp3 when Amarok IS already running, there are no problem, but is Amarok IS NOT running I get a 3-15 seconds lag while Amarok starts, that is very annoying, especially if I want just to open single joke.mp3 and later continue browsing internet without music.

Reverse: If I have set default app for mp3 as VLC, and I open mp3 when Amarok IS already running, there I get 2 sources of sound I hear nothing more than noise. Again If Amarok IS NOT running there are no problem.


Mp3 example is just one of man possible: .mpg (VLC vs. banshee vs...), .png (Gwenview vs. digiCam vs....), .php (heavy and powerful Aptana for major job vs. kate for single modification); mailto:; even http:// (Heavy addons loaded firefox vs. konqueror)  etc.



The solution:
In system configuration add some sort of lag "Use this if previous app is not running" and before launching app simply check each associated apps in a row and pick the first found running or flaged.
Comment 1 David Faure 2009-05-15 19:20:04 UTC
This is too specific to be a job for the KDE mime/application-starting system itself. However you could make a shell script that does exactly that, and associate that shell script with mp3 files (as the top one). The script would check if amarok is running (using qdbus), if yes then use it to open the file, otherwise use something else. Ask on IRC if you need help writing such a script.