# HG changeset patch # User mawalch # Date 1519926365 -3600 # Node ID 104724bda57c8c59f83c510d25982d88ee60835a # Parent 9ed653401cb5f41fe47e25edad94bce9e47285a8 #FEATURE by mawalch class: MIMETypes class changed: #initializeDefaultCommands #mimeTypeOfData:suffix: Try xdg-open. diff -r 9ed653401cb5 -r 104724bda57c MIMETypes.st --- 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