Skip to content

Commit dc86cf8

Browse files
committed
Misc: use xdg-open for the show in finder command\nfixed #250
Signed-off-by: Defman21 <[email protected]>
1 parent 04af5f2 commit dc86cf8

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/components/koSysUtils.py

+6-12
Original file line numberDiff line numberDiff line change
@@ -258,21 +258,15 @@ def ShowFileInFileManager(self, filename):
258258
manager = self._getManager()
259259
if os.path.isfile(filename):
260260
filename = os.path.dirname(filename)
261-
if manager == "gnome":
261+
xdg_open = self.Which('xdg-open')
262+
if xdg_open:
263+
os.system('xdg-open "%s" &' % filename)
264+
elif manager == "gnome":
262265
os.system('nautilus "%s" &' % filename)
263266
elif manager == "kde":
264-
os.system('konqueror --profile filemanagement "%s" &' % filename)
267+
os.system('dolphin "%s" &' % filename)
265268
else:
266-
# see if nautilus or konqueror exists, and use them
267-
nautilus = self.Which("nautilus")
268-
if nautilus:
269-
os.system('nautilus "%s" &' % filename)
270-
return
271-
konqueror = self.Which("konqueror")
272-
if konqueror:
273-
os.system('konqueror --profile filemanagement "%s" &' % filename)
274-
return
275-
raise "NOT IMPLEMENTED"
269+
raise "File manager not found / xdg-open not installed"
276270

277271
def OpenFile(self, filename):
278272
"""OpenFile

0 commit comments

Comments
 (0)