Summary: | Launching the app specified by Exec= in .directory files when entering a directory | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | probono <probono> |
Component: | general | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | wishlist | CC: | faure, finex, krzysiek, martinkunev, rdieter |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Implementation of the feature |
Description
probono
2004-05-18 00:31:02 UTC
Please re-read the specification. The Table "Standard Keys" under the topic "Recognized desktop entry keys" as a column "Type". There are four types of different .desktop files: Application(1), Link(2), FSDevice(3) and Directory(4). The column "Type" specifies for what type of .desktop file this Key is for. In the row for the Key "Exec=" you will find that it is only for application desktop files (type 1). So I'm changing this to wish. Thanks for pointing this out. Still, having Exec= work in .desktop files of type "Directory(4)" would be very useful (e. g. for creating self-contained AppDirs that launch an application if clicked), so I still vote for it. (http://freshmeat.net/articles/view/247/ explains why AppDirs are useful, and on http://klik.berlios.de/architecture/ I explain an implementation which I am currently working on and would need Exec= for.) I did an error in describing: Instead of ".desktop" it should read ".directory" above. See for example, the (imaginary) file $HOME/kommander/.directory as follows: [Desktop Entry] Encoding=UTF-8 Icon=$HOME/kommander/kommander.png Exec=$HOME/kommander/kommander <-- this should get executed instead of opening the directory in Konqueror This way, the Kommander AppDir would have the kommander icon and would execute kommander when clicked (like .app bundles do on the Mac). (I am working on "useraland-apt" which will be the backend to easily create AppDirs from debian packages - so this is really needed, not just a vague idea) Apple describes it this way: "A bundle is basically a directory that contains an application. Unlike normal folders, however, it appears to the user like an ordinary file. The user can double-click a bundle, and the application will launch. Since the bundle is really a directory, it can contain all the support files that are needed for the application." http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/distributing/chapter_9_section_2.html It would be great to have the functionality described in KDE. This sounds interesting... And it's not too hard to do - see attached patch. I chose to do it in lmbClicked() instead of KonqMainWindow::openURL() so that it's still possible to type the URL of the directory in the location bar and open the directory as usual. Created attachment 7482 [details]
Implementation of the feature
Please test if that's the way you wanted it.
This sounds like a security risk to me, though. What happens when someone drops a .directory file in /tmp? > This sounds like a security risk to me, though. What happens when someone drops a .directory file in /tmp?
Excellent point. It sounded like a security problem to me too, but I couldn't pinpoint a bad case.
Your example is a perfect one :/
The question becomes: how is this handled on MacOSX, e.g. what do they do differently
that prevents this from happening?
Afaik there is an execution rights system for directories on Unix. So I do not understand the problem. The +x right for directories means "enter directory", not "execute". Here is the solution, Apple does it like this: Exec= is only executed if the name of the directory ends in .app - otherwise Exec= is ignored. (Apple doesn't display the .app suffix in their file manager, so that the end user doesn't notice it.) This imho resolves the security issue described above. David, what is rhe feasibility of adding the check that probono suggest? Only execute on directories ending in .app ? Can we use the .app solution? I don't think it is secure to add such a feature. Maybe the apple way is safer but I still don't think it is a good idea. All reports about file management mode reported against KDE 3 (konqueror) has been closed: konqueror in KDE 3 is no more developed and mantained. All bugs and wishes which could be interesting for Dolphin in KDE 4 (the new KDE file manager) has been collected into a specific list. Please try the new file manager before request new features and report bugs. Before submitting new reports check carefully the already opened KDE/Dolphin reports in order not to add duplicates. Many thanks. |