Default file manager and folder associations
Dear kcd, I am thinking for a possible fix for bug #293576 [1], but I could not make up my mind so far. As far as I understand the situation is as follows: - There is no explicit way of setting the default file manager for the KDE workspace; however, there is an implicit way of doing that by selecting the desired program as the default file association for folders. - When the user adds a new file association by rightclick > open with... > other + tick “remember file association” the newly added program is set as default for the corresponding mimetype. This two behaviors together sum up to bug 293576: a user wants to open a folder with a random program (that is VLC in the br); he therefore adds the corresponding action via the rightclick business described above. This selects VLC as the default file association for folders, and forces applications to believe that VLC is our default file manager. In particular the device notifier is easily fooled by this situation, and opens every device with vlc :( The reporter was kind enough to document this with a video [2] So far I came up with a couple of solutions, but all do require some feedback: 1) Create an explicit way to set the default file manager (which might or might not necessarily be the default association for folders) so that the user cannot change it without noticing. 2) “Protect” folders as a special type of file and disallow to set a random application as default unless explicitly requested using the kcm My first thought was that this was really a corner usecase, and it very possibly is; however, I must admit that this behavior is indeed quite bizarre (please do have a look at the video) and, unless you really know what is going on, it does seems to make little or no sense at all. Other solutions are of course most welcome. Thanks, Jacopo [1] http://bugs.kde.org/show_bug.cgi?id=293576 [2] http://www.youtube.com/watch?v=tPQaUKIBwCc
Re: Default file manager and folder associations
On Sun, Jun 17, 2012 at 11:13 AM, Jacopo De Simoi wrote: > Dear kcd, > > I am thinking for a possible fix for bug #293576 [1], but I could not make > up my mind so far. As far as I understand the situation is as follows: > > - There is no explicit way of setting the default file manager for the KDE > workspace; however, there is an implicit way of doing that by selecting the > desired program as the default file association for folders. What about system settings -> Default Applications -> File Manager? -Todd
Re: Default file manager and folder associations
That doesn't quite work, for me at least. See the bug I reported https://bugs.kde.org/show_bug.cgi?id=297720 Nobody seems to care though. On Sun, Jun 17, 2012 at 12:21 PM, todd rme wrote: > On Sun, Jun 17, 2012 at 11:13 AM, Jacopo De Simoi wrote: >> Dear kcd, >> >> I am thinking for a possible fix for bug #293576 [1], but I could not make >> up my mind so far. As far as I understand the situation is as follows: >> >> - There is no explicit way of setting the default file manager for the KDE >> workspace; however, there is an implicit way of doing that by selecting the >> desired program as the default file association for folders. > > What about system settings -> Default Applications -> File Manager? > > -Todd
Re: Default file manager and folder associations
On Sunday 17 June 2012 12:21:07 todd rme wrote: > On Sun, Jun 17, 2012 at 11:13 AM, Jacopo De Simoi wrote: > > Dear kcd, > > > > I am thinking for a possible fix for bug #293576 [1], but I could not > > make > > up my mind so far. As far as I understand the situation is as follows: > > > > - There is no explicit way of setting the default file manager for the KDE > > workspace; however, there is an implicit way of doing that by selecting > > the > > desired program as the default file association for folders. > > What about system settings -> Default Applications -> File Manager? Hey, I actually never happened to use this kcm, and did not find any reference to it by googling around “change default file manager in kde”. Todd, thanks a lot for the insight! So, I need to take back my observation about the lack of an “explicit” way of dealing with this setting. Still, it seems that this kcm is a simply another way to set the default association for folders, that is, it suffers from the same issue that I described before. Any comments on the proposed solutions? Perhaps we could somehow decouple the kcm Todd mentioned from the default folder association? Thanks again, __J
Re: Default file manager and folder associations
afaics the original forum request turns out to be a misassumption about what "remember" does when "opening with..." -> the should or could be "add to associations" checkbox (even if that would be done automatically, just for disambiation) a mounted media /is/ inode/directory, if you want to treat things differently you'd need sth. more advanced that inspects path or content and runs a special app in case. -> bash script + service file or write sth. with a nifty config gui.
Re: Default file manager and folder associations
On Sunday 17 June 2012 17:51:26 Thomas Lübking wrote: > afaics the original forum request turns out to be a misassumption > about what "remember" does when "opening with..." -> the should or > could be "add to associations" checkbox (even if that would be done > automatically, just for disambiation) Yes, I agree that the checkbox text does not properly explain what is going on. It does make sense when opening never-seen-before types of file with konqui, but does not when adding a rightclick action… > a mounted media /is/ inode/directory, > if you want to treat things differently you'd need sth. more advanced > that inspects path or content and runs a special app in case. -> bash > script + service file or write sth. with a nifty config gui. Let me stress that this is _not_ an issue restricted to the device notifier, and the fix does not belong there. krunner also uses the default file association when opening files, so that if the default folder association is messed up, opening ~ in krunner will use VLC (or whatever has been set as default). What we need to do in the device notifier (and in krunner) is to open a path using the default file manager; that is, we need to trust that the default association for folders is something sensible or, alternatively, have somebody else tell us which is the default file manager. __J
Re: Default file manager and folder associations
Am 17.06.2012, 18:18 Uhr, schrieb Jacopo De Simoi : a mounted media /is/ inode/directory, if you want to treat things differently you'd need sth. more advanced that inspects path or content and runs a special app in case. -> bash script + service file or write sth. with a nifty config gui. Let me stress that this is _not_ an issue restricted to the device notifier, and the fix does not belong there. I didn't mean to suggest that. What i wanted to say is that the task of "smart selection" goes beyond the concept of mime types. In doubt you want a "smart" tool that inspects the directory (is it a mounted mountpoint; do we know the mounted device; what's the content, eg. is there a DCIM folder - stuff like that) and bind it as default inode/directory service. What we need to do in the device notifier (and in krunner) is to open a path using the default file manager; s/path/directoy/ that is, we need to trust that the default association for folders is something sensible or yes. alternatively, have somebody else tell us which is the default file manager. no - that would just introduce a second config for the same task + you'd still have to standardize it. You want to open directories with the default mime handler just as images or an mp3, that's why they're there. If someone sets an "rm -rf $1" script as default directory handler, that's actually his problem - you can't fix stupidity. Cheers, Thomas
Re: Default file manager and folder associations
On Sunday 17 June 2012 19:17:41 Thomas Lübking wrote: > You want to open directories with the default mime handler just as images > or an mp3, that's why they're there. > If someone sets an "rm -rf $1" script as default directory handler, that's > actually his problem - you can't fix stupidity. I perfectly agree ;) However, the user never meant to change the default association for folders, he just meant to add a new action to the right-click menu. so in the end I agree with you that the crucial issue is the misleading caption of the checkbox in the “open with…” dialog. Who is the right person to discuss with? Thanks, Jacopo
Re: Default file manager and folder associations
Am 17.06.2012, 22:18 Uhr, schrieb Jacopo De Simoi : so in the end I agree with you that the crucial issue is the misleading caption of the checkbox in the “open with…” dialog. Who is the right person to discuss with? it's not like i didn't have to look it up myself (lxr.kde.org) http://api.kde.org/4.8-api/kdelibs-apidocs/kio/html/classKOpenWithDialog.html Pino seems to have touched it last, more i do not know either - just write a patch ;-) Cheers, Thomas
Re: Default file manager and folder associations
On Sun, Jun 17, 2012 at 10:45 PM, Thomas Lübking wrote: > Am 17.06.2012, 22:18 Uhr, schrieb Jacopo De Simoi : > > >> so in the end I agree with you that the crucial issue is the misleading >> caption of the checkbox in the “open with…” dialog. >> Who is the right person to discuss with? > > > it's not like i didn't have to look it up myself (lxr.kde.org) > http://api.kde.org/4.8-api/kdelibs-apidocs/kio/html/classKOpenWithDialog.html > > Pino seems to have touched it last, more i do not know either - just write a > patch ;-) > > Cheers, > Thomas So, i did some deeper digging into this. Quite interesting results to say the least :) In the file: kio/kfile/kopenwithdialog.cpp line 779 you can find: apps.prepend(serviceId); // make it the preferred app Yes, even with that comment behind it. A git blame turns out that David is the one to "blame" for that one: 5bf58ae2 kio/kfile/kopenwithdialog.cpp (David Faure 2008-02-29 21:12:14 + 779) apps.prepend(serviceId); // make it the preferred app Perhaps David can shed some light on this little issue? I'm guessing the following would be the best solution: - Add a chechbox that becomes tickable when you tick "Remember ". The added checkbox should say something like: "Make default" - By default (so when the "Make default" is not checked) it should append the item to the list, not prepend. Just my 5 cents :)
Re: Default file manager and folder associations
On Mon, Jun 18, 2012 at 3:15 PM, Mark wrote: > On Sun, Jun 17, 2012 at 10:45 PM, Thomas Lübking > wrote: >> Am 17.06.2012, 22:18 Uhr, schrieb Jacopo De Simoi : >> >> >>> so in the end I agree with you that the crucial issue is the misleading >>> caption of the checkbox in the “open with…” dialog. >>> Who is the right person to discuss with? >> >> >> it's not like i didn't have to look it up myself (lxr.kde.org) >> http://api.kde.org/4.8-api/kdelibs-apidocs/kio/html/classKOpenWithDialog.html >> >> Pino seems to have touched it last, more i do not know either - just write a >> patch ;-) >> >> Cheers, >> Thomas > > So, i did some deeper digging into this. Quite interesting results to > say the least :) > In the file: kio/kfile/kopenwithdialog.cpp line 779 you can find: > apps.prepend(serviceId); // make it the preferred app > > Yes, even with that comment behind it. > A git blame turns out that David is the one to "blame" for that one: > > 5bf58ae2 kio/kfile/kopenwithdialog.cpp (David Faure 2008-02-29 > 21:12:14 + 779) apps.prepend(serviceId); // make it the > preferred app > > Perhaps David can shed some light on this little issue? > > > I'm guessing the following would be the best solution: > - Add a chechbox that becomes tickable when you tick "Remember ". > The added checkbox should say something like: "Make default" > - By default (so when the "Make default" is not checked) it should > append the item to the list, not prepend. > > Just my 5 cents :) I discussed this with David in IRC. The intention was: "if you want kde to "remember openoffice for text files", that means "use openoffice next time I click on a text file" (i.e. make it default)" So the intention with it's current behavior is as it should be. The text could be more descriptive as in "Remember and use as default" (or something alike). This won't be changed in KDE 4.9 specially since you can already change the file associations in System Settings if desired. The string name might be changed for KDE 5 to state more clearly what it's doing. Cheers, Mark
Re: Default file manager and folder associations
I doubt changing the text would make much more difference. People will simply read what they want to read and ignore everything else just as in warning/message dialog boxes! After all the current option itself says "Remember application associations for this file type" not for this specific file or folder! To me the only sane solution it to make that option completely unavailable for folders. There is already a way to change that association through the Default Applications system settings. Otherwise, such bug reports will continue to be opened in the future. There were already several others that were opened on this prior to the ones mentioned in this thread. On Mon, Jun 18, 2012 at 9:39 AM, Mark wrote: > On Mon, Jun 18, 2012 at 3:15 PM, Mark wrote: > > On Sun, Jun 17, 2012 at 10:45 PM, Thomas Lübking > > wrote: > >> Am 17.06.2012, 22:18 Uhr, schrieb Jacopo De Simoi >: > >> > >> > >>> so in the end I agree with you that the crucial issue is the misleading > >>> caption of the checkbox in the “open with…” dialog. > >>> Who is the right person to discuss with? > >> > >> > >> it's not like i didn't have to look it up myself (lxr.kde.org) > >> > http://api.kde.org/4.8-api/kdelibs-apidocs/kio/html/classKOpenWithDialog.html > >> > >> Pino seems to have touched it last, more i do not know either - just > write a > >> patch ;-) > >> > >> Cheers, > >> Thomas > > > > So, i did some deeper digging into this. Quite interesting results to > > say the least :) > > In the file: kio/kfile/kopenwithdialog.cpp line 779 you can find: > > apps.prepend(serviceId); // make it the preferred app > > > > Yes, even with that comment behind it. > > A git blame turns out that David is the one to "blame" for that one: > > > > 5bf58ae2 kio/kfile/kopenwithdialog.cpp (David Faure 2008-02-29 > > 21:12:14 + 779) apps.prepend(serviceId); // make it the > > preferred app > > > > Perhaps David can shed some light on this little issue? > > > > > > I'm guessing the following would be the best solution: > > - Add a chechbox that becomes tickable when you tick "Remember ". > > The added checkbox should say something like: "Make default" > > - By default (so when the "Make default" is not checked) it should > > append the item to the list, not prepend. > > > > Just my 5 cents :) > > I discussed this with David in IRC. > The intention was: > "if you want kde to "remember openoffice for text files", that means > "use openoffice next time I click on a text file" (i.e. make it > default)" > > So the intention with it's current behavior is as it should be. The > text could be more descriptive as in "Remember and use as default" (or > something alike). This won't be changed in KDE 4.9 specially since you > can already change the file associations in System Settings if > desired. The string name might be changed for KDE 5 to state more > clearly what it's doing. > > Cheers, > Mark >
Re: Default file manager and folder associations
On Sunday 17 June 2012 12:49:46 Ambroz Bizjak wrote: > That doesn't quite work, for me at least. See the bug I reported > https://bugs.kde.org/show_bug.cgi?id=297720 > Nobody seems to care though. I posted a fix for that bug on June 18, and asked for testing. Nobody seems to care, though :-) -- David Faure, fa...@kde.org, http://www.davidfaure.fr Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5