moretension / duti Goto Github PK
View Code? Open in Web Editor NEWA command-line tool to select default applications for document types and URL schemes on Mac OS X
License: Other
A command-line tool to select default applications for document types and URL schemes on Mac OS X
License: Other
Any chance to get a Yosemite version uploaded here http://duti.org/index.html
Followed instructions but Make command not working on Yosemite.
Seen the issue for home few but doesn't make sense to me on what I need to do
Thanks
Sorry, I still do not understand lot of automake...
So, I just followed your installation directive:
./configure
then I got
./configure: No such file or directory
Is there some missing file or should I be able to proceed to the installation?
Google docs files, when synched down with the GoogleDrive app, have '.gsheet' extensions. I use Fluid.app to 'firewall-off' my cookies from the rest of my browsing experience, and so I can stay logged in to multiple gmail sessions. I want to be able to map the 'com.fluidapp.FluidApp.mycustomgmailfluidapp' app bundle to those .gsheet files, so I could trigger opening them from the finder, which by default goes to the regular Safari.app. I tried:
duti -s com.fluidapp.FluidApp.mygmail /path/to/gdrive/folder/foo.gsheet all
which doesn't return an error (but doesn't open the correct app,) and checking it with -x
immediately afterwards has no effect
$ duti -s com.codeius.izip org.7-zip.7-zip-archive all
org.7-zip.7-zip-archive does not conform to any UTI hierarchy
I'm using duti 1.5.4, installed using "brew install duti" on MacOS 10.13.6
I've checked with "lsregister" that iZip associates itself to this exact UTI without problems.
Hi!
Just found the project, but the latest release (1.5.4) doesn't have a configure
script to run as per the README.
Copying the configure script found on the previous release (1.5.3, from 2014!) quite predictably, fails, with the error configure: error: darwin17.4.0 is not a supported system
$ ./configure
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i386-apple-darwin17.4.0
checking host system type... i386-apple-darwin17.4.0
checking target system type... i386-apple-darwin17.4.0
checking which SDK to use... configure: error: darwin17.4.0 is not a supported system
I'm using High Sierra:
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.3
BuildVersion: 17D102
Which makes it a bit "hard to use"...
Thanks!
Could you issue a new release or tag? Some package systems use the version number in order to generate new packages of software.
P.S. hi Andrew
I use mac os catalina and when i change directory into directory and type ./configure then terminal throw an exception 'darwin19.4.0 is not a supported system'
Is there a case for hidden dotfiles?
Hi there,
I'm having trouble setting associations using duti.
$ duti -x rtf
Xcode.app
/Applications/Xcode.app
com.apple.dt.Xcode
$ duti -s com.apple.TextEdit .rtf all
# I tried with sudo too, and the `echo` syntax, nada
$ duti -x rtf
Xcode.app
/Applications/Xcode.app
com.apple.dt.Xcode
If I use GetInfo to change the association then I get:
$ duti -x rtf
TextEdit.app
/Applications/TextEdit.app
com.apple.TextEdit
duti version is 1.5.4. I'll be running OS X 10.9.5 until Apple fixes the egregious bugs they introduced subsequently. Let me know if there's any more info I need to supply.
Regards,
iain
duti
won't build on 10.10.5 with Xcode 7. That seems to be because it hardcodes:
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
but the 10.10 SDK doesn't exist in Xcode 7. For reference, the call that fails is:
gcc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.10 -Wall -Wmissing-prototypes -g -O2 -c ./util.c
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk'
./util.c:1:10: fatal error: 'CoreFoundation/CoreFoundation.h' file not found
#include <CoreFoundation/CoreFoundation.h>
^
1 error generated.
make: *** [util.o] Error 1
It can be built using Homebrew, under their superenv
, which among other things removes the isysroot
. (If you build in Homebrew without superenv
, a similar choke occurs.)
Here is Homebrew's summary of how it altered things, on the clang
call in question:
clang called with: -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.10 -Wall -Wmissing-prototypes -g -O2 -c ./util.c
superenv removed: -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -Wall -Wmissing-prototypes -g -O2
superenv added: -pipe -w -Os -march=native -isystem/usr/local/include -isystem/usr/include/libxml2 -isystem/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
superenv executed: clang -pipe -w -Os -march=native -mmacosx-version-min=10.10 -c ./util.c -isystem/usr/local/include -isystem/usr/include/libxml2 -isystem/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
Also, here is the Homebrew issue report that led me to post here.
*duti is probably working as designed; I was hoping it would allow me to assign an extension to an existing UTI.
For example currently I have a lot of source files -- say, .haml
-- that have a dynamic UTI (mdls
reports kMDItemContentType = "dyn.ah62d4rv4ge80u2prru"
). The ContentTypeTree
, naturally, doesn't contain an appropriate content type, and Mac OS X (Yosemite, but same problem existed on earlier systems) doesn't even recognize that .haml
is an extension.
All I want to do is tell Mac OS X that .haml
(and other extensions) is, in fact, an extension, and that the extension refers to public.plain-text
(or whatever else I want to point it to).
I'm fairly certain I could make a dummy Mac OS app in Xcode with CFBundleTypeExtensions
to make all of these associations, but these seems stupid if LaunchServices is simply going to copy them from the plist anyway.
tl;dr: Is this some type of functionality that would be possible to add to duti? E.g., extension .xxx means UTI com.something.whatever.
Thanks.
Hi im running Catalina and when i try duti i get error zsh: bad CPU type in executable: duti. as i understand it this is due to that duti is 32bit? I installed via brew. Any ideas?
On OS X 10.11 Public Beta 1 (15A25h):
> ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i386-apple-darwin15.0.0
checking host system type... i386-apple-darwin15.0.0
checking target system type... i386-apple-darwin15.0.0
checking which SDK to use... configure: error: darwin15.0.0 is not a supported system
Might need to update the m4 script, just like what was done for Yosemite.
error: darwin22.2.0 is not a supported system
In the past, I used duti v1.5.4_1 (in the form of duti -v input-file.duti
if that's of any significance) to associate a bunch of text format with VS code (UTI com.microsoft.VSCode
). As far as I remember, that worked out fine.
However, later on macOS Sonoma 14.2.1 I decided that VS code is too resource-hungry to serve as a general-purpose text editor and switched to Sublime Text (UTI com.sublimetext.4
). I tried to reassociate text formats with it (using the same duti -v
) and this lead to a weird situation.
When right-clicking text files in Finder, it shows Open With > Sublime Text.app (default)
.
Get Info > Open With
shows pretty much the same:
However, when double-clicking a file, it opens in VS code!
If I change an app in Get Info > Open With
to something else and then back to Sublime Text, and then click Change All
, files of this extension will now properly open in Sublime Text upon double click. However, this defeats the purpose of using duti
to begin with.
Hey you might like my example duti configuration file. Maybe link to it in the README.md.
https://gist.github.com/apfelchips/0073cb3e8d186115f590d318998c1025
Hello, after downloading and extracting the duti-1.5.2.tar.gz Release of this repo I tried to execute ./configure as instructed by the README. Yet my Mac OS X Mavericks reports "no such file or directory: ./configure".
Also I tried to execute the install-sh script, but it prompts for arguments which are documented nowhere.
The duti-1.5.1.tar.gz on Sourceforge, however, has a executable ./configure , but it says my system version is not supported.
How shall I install duti on my Mac OS X Mavericks? Thank you.
What does error -54 mean?
failed to set com.sublimetext.3 as handler for public.html (error -54)
failed to set com.google.Chrome as handler for https:// (error -54)
Anyone know?
As duti command line interface lacks even a simple --help
option, trying to find how to reassociate some file types seems to be a real struggle.
I am trying to avoid the apparently implicit TextEdit that is used for opening these:
# dot files such:
.gitignore
.yamllint
.flake8
# plain text files without any extension such
COPYING
Any hints would be highly appreciated. Thanks
When using
cx.c3.theunarchiver public.archive all
In my .duti
file. I get
public.archive does not conform to any UTI hierarchy
The reference does list it as a UTI though.
OS X 10.8.4
duti 1.5.1
I've used duti to set the default to vscode for text files:
$ duti -s com.microsoft.VSCode public.plain-text editor
$ duti -d public.plain-text
com.microsoft.vscode
When I double click on the file in Finder, it opens with vscode.
However for a text file, Finder still:
TextEdit
TextEdit (default)
Open with: TextEdit
How can I get Finder to show the new default (vscode) instead?
As duti does not really seems actively maintained, I am wondering if there is any alternative can that be used to repair messed file associations on macos? ... especially if it would include an option to disassociate files.
Hi,
Has anyone tried duti on macOS Catalina yet?
Suppose I have a file of the following type hierarchy:
kMDItemContentTypeTree = (
"com.netscape.javascript-source", // let's say this is associated with AppOne
"public.script",
"public.source-code", // let's say this is associated with AppTwo
"public.plain-text",
"public.text",
"public.data",
"public.item",
"public.content",
"public.executable"
)
I want com.netscape.javascript-source
files to be opened by AppTwo, but I don't want to explicitly associate them with AppTwo. I just want to remove the exception so that they get handled the same way as the other public.source-code
files.
Is there something I can run along the lines of duti -s NONE public.html all
to achieve this effect?
http://duti.org says:
No page found
We couldn't find a page for the link you visited. Please check that you have the correct link and try again.
If you are the owner of this domain, you can setup a page here by creating a page/website in your account.
So it took me a while to even figure out what these com.apple... things were, but apparently they are bundle id's. I've found various scripts to identify them. It seems like the most common referenced online is
osascript -e 'id of app "Name of App"'
What if I want to list out all the app bundle id's to see what's installed on the system instead of going one at a time? Does anyone know if that's possible? Should Duti -x without any other commands maybe do this for us?
I'm trying to use Duti in an onboarding script and would like to check that certain bundle id's exist on the system before using duti to set the extension correctly
It would be nice to have additional parameter to list not only bundles ids for a type identifier but also their paths.
For example, in muCommander I had to used mdfind
to get the path for a given bundle id - this is additional call just to get the path of an application (kinda related to bug here: mucommander/mucommander#1162). The path is needed to: a) invoke an app for a given file, b) to display its icon. Calling mdfind
adds additional delay (ok, we cache the results, but still), but it uses spotlight (some people turn it off, especially if they get annoyed by spotlight indexing external drives).
So, for example now duti -l public.jpeg
produces:
org.photoscape.PhotoScapeX
com.apple.Preview
[...]
What about if there was for example -L
to produce:
org.photoscape.PhotoScapeX: /Applications/PhotoScape X.app
com.apple.Preview: /Applications/Preview.app
[...]
Of course the parameter name and the output is just a suggestion. I know that duti
is able to return paths when using -x
but only for a default app.
Additionally :) - in muC we have to run duti -e jpg
to get public.jpeg
, then we need to run duti -l public.jpeg
- it would be also nice for -l
(or hopefully -L
) to accept also extensions, for example: duti -l .jpg
- anything prefixed with a dot could be then considered as an extension and all the hard lifting done internally by duti
and therefore lowering the number of calls to duti
and making muC more responsive :)
On 1.5.4, duti -V
is broken. It results in INTERNAL
.
Maybe this was broken on 1.5.3 (I can't check right now), but I doubt it.
checking build system type... i386-apple-darwin18.0.0
checking host system type... i386-apple-darwin18.0.0
checking target system type... i386-apple-darwin18.0.0
checking which SDK to use... configure: error: darwin18.0.0 is not a supported system
There are UTIs, there are protocols and there are extensions.
And I understand I can set the defaults with dtui
.
But is there a way to list all the applications for a given extension and protocol - and which one is the default?
I associate my sublime3 with plain-text:
duti -s com.sublimetext.3 public.plain-text all
.
But now I want to undo it. Please help.
I tried;
duti -s com.microsoft.VSCode gitignore all
duti -s com.microsoft.VSCode public.unix-executable all
but it still opens .gitignore
in TextEdit. Any suggestions?
Trying to set atom as the default editor for html files:
duti -s com.github.atom .html all
But got this error failed to set com.github.atom as handler for public.html (error -54).
I already closed atom and chrome.
I also tried to use html as the extension, but still same error.
btw duti works for other file types like text.
Thanks.
Please see discussion here: Homebrew/legacy-homebrew#33009 . Since there's a direct call to Xcode.app in aclocal.m4, the non-beta Xcode has the wrong SDK for beta Yosemite. I will submit an pull request. Might not work until a couple weeks when Yosemite and Xcode 6.1 leave beta.
I need this in terms of creating some proxy file which should parse provided string and open some application with correct data.
It would be great if you could please try to find the time to build the project and add a new release that includes this PR as the last Duti release is from December 2014 and doesn't support a lot of OSX versions already.
Thanks in advance, this is a very helpful utility project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.