#FEATURE by mawalch
class: MIMETypes class
changed:
#initializeDefaultCommands
#mimeTypeOfData:suffix:
Try xdg-open.
--- a/MIMETypes.st Thu Mar 01 10:49:27 2018 +0100
+++ b/MIMETypes.st Thu Mar 01 18:46:05 2018 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1997 by eXept Software AG
All Rights Reserved
@@ -267,6 +265,15 @@
cmd notNil ifTrue:[
unixCommands at:'application/pdf' put:(cmd, ' "%1"')
].
+
+ listToTry := #('xdg-open').
+ cmd := listToTry
+ detect:[:aCmd| (OperatingSystem pathOfCommand:aCmd) notEmptyOrNil ]
+ ifNone:nil.
+ cmd notNil ifTrue:[
+ unixCommands at:'text/plain' put:(cmd , ' "%1"')
+ ].
+
].
].
@@ -285,6 +292,7 @@
"
"Modified: / 12-05-2004 / 11:43:23 / cg"
+ "Modified: / 01-03-2018 / 18:42:42 / mawalch"
!
initializeFileInfoMappings