There is a “Places” column in the “Left Pane” in Komodo. After clicking RMB and selecting the “Show in File Manager” command from the pop-up menu, I get the following error instead of opening the file manager window:
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koISysUtils.ShowFileInFileManager]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://komodo-places/content/places.js :: ManagerClass.prototype.doShowInFinder :: line 2059" data: no]
[timestamp deleted by me]
The issue was also present in Komodo 8.5.3, 8.5.4, 9.0.0 and now in 9.0.1. I use Linux with MATE Desktop Environment (fork of GNOME 2), there is the Caja as the default file manager. It is possible that Komodo is trying to run Files, the default file manager in GNOME 3.
Is there any way to change the default file manager for Komodo in the Settings or config files?
Hi @careyh, thanks for the reply. I ran the “cmd_places_showInFinder” command using Commando, your assumption was 100% correct. The result was the same, as quoted in the first post of this topic.
Some additional info to be more helpful: I wrote I use MATE, the fork of GNOME 2 desktop environment. Is it possible, that Komodo detects GTK+ toolkit or GTK+ based DE and tries to run the default file manager Nautilus/Files? (I wrote Files in the first post, because in GNOME 3 the Nautilus is called Files, however the package name seem to be still nautilus. But it is the same software, the default file manager of GNOME 3.) I also remembered that sometimes in the past I had Nautilus/Files instaled on MATE DE as a part of dependency, not used in fact. When Nautilus/Files was installed in the system, the Komodo was always launching Nautilus after the “Show in File Manager” command. Later i got rid with Nautilus because the depending software was no longer needed. Nautilus/Files of the GNOME3 version is PITA to use IMHO.
I took a look at the code. I would like to help very much by participating, however this is far beyond my knowledge of Python. I know just basics of Python, no OOP in Python and I have no real-world experience with Python programming. I am sorry.
There’s nothing from OOP in this case. Only sys.system function.
This code works for me fine but not for @careyh
def ShowFileInFileManager(self, filename):
# nsILocalFile handles some of this
localFile = components.classes["@mozilla.org/file/local;1"].createInstance(components.interfaces.nsILocalFile)
except COMException, e:
# reveal is not implemented, try the old stuff
if sys.platform not in ['win32','darwin']:
filename = os.path.dirname(filename)
os.system('xdg-open "%s" &' % filename) # works for me, not for careyh