Set default app for file type on Mac


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Set default app for file type on Mac
# 1  
Old 08-14-2009
Question Set default app for file type on Mac

Hi there,

We have 2 apps on our customers machines that can both open files with the same file extension. Is there any way via shell commands to set which application should be the default?

Essentially, I'm hoping to replicate Get Info > Open With > Change All using a shell script, but I just can't find a way of doing it. I thought lsregister might be the way, but no luck Smilie

Thanks in advance!
Dave
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. OS X (Apple)

How can I direct messages from mac console.app to a log file?

I'm trying to complete a bash script to capture if an external webcam is active in a video conference session. Some users will switch the camera to the built-in MAC camera. When this happens I want to trigger a set of events. Things tried: reviewed the console.app to look for patterns on when... (6 Replies)
Discussion started by: dallas88
6 Replies

2. UNIX for Dummies Questions & Answers

Is there a way to set ' and " as a non quotes type in bash?

Howdy, I got a script that adds a esc char before all chars interpeted by bash shell but I wan't other solution. Is there a way to set ' and " as a non quotes type in bash (some local variable)? Have found that scsh is a non-quoting type shell but after reading Why I don't use scsh as a scripting... (3 Replies)
Discussion started by: johny_be_good
3 Replies

3. Shell Programming and Scripting

Need Mac .sh to run command line app in seperate terminal

Hello, currently we are executing a .sh from terminal. The current .sh looks like this: #!/usr/bin/env bash /Users/user/my.app/Contents/MacOS/my & -- Now, we also need to run a third line in the .sh - It's a command line application that I need to run when I execute the above .sh... (0 Replies)
Discussion started by: yoyoyo777
0 Replies

4. Shell Programming and Scripting

Perform a set of actions for a specific file type

Hello, I have a problem that I'm having quite a bit of trouble with. I am trying to create a script that performs a specific sequence of actions for a file of a specific type. This is an abbreviated version of my basic script: #!/bin/sh #coulombic calculations... (2 Replies)
Discussion started by: oehtus
2 Replies

5. UNIX for Advanced & Expert Users

Cygwin <--> CMD App Problem (Terminal Type?)

I'm not sure if this is the right place to post this, but here it is. We have a nightly process that runs on an HP-UX box to stop our application and backend database servers, unmount their SAN hosted file systems, and then snapshot the SAN LUNs for backup and refresh of data on "report" and... (1 Reply)
Discussion started by: deckard
1 Replies

6. Solaris

set dir in zone fs type

Hi all, what is the meaning and what all value we can pass to set dir= in zone fs type when we are configuring whole-root zone? Thanks (3 Replies)
Discussion started by: kumarmani
3 Replies

7. UNIX for Advanced & Expert Users

How to Set Mime type to mailx

I have a problem while sending attachement , it is displying Content into body of mail (Junk Data) instead of attachment (zip format) in Linux, same code is working in Sun Solaris.. I have read query in this site , need to set MIME type to mailx componment. Please help me how to set MIME type..... (1 Reply)
Discussion started by: suneel
1 Replies
Login or Register to Ask a Question
SafeEjectGPU(8) 					    BSD System Manager's Manual 					   SafeEjectGPU(8)

NAME
SafeEjectGPU -- Facilitate safe eject/disconnect of eGPU(s) from system SYNOPSIS
SafeEjectGPU [gpuid <gpuid>] [gpus] [apps] [status] [Eject] [Initiate] [Relaunch] [Finalize] [Cancel] [RelaunchPID <PID>] ... DESCRIPTION
The SafeEjectGPU command is used to prepare for safe eject/disconnect of eGPUs from the system. This involves interacting with apps to migrate off of ejecting eGPU(s), and triggering the eject itself. This tool can also be used to view what GPUs are attached to the system, their eject status, and what apps hold references to each. A list of commands and their descriptions - note that commands affecting state are capitalized, and that multiple (including repeated) com- mands can occupy the same command line: gpus Lists attributes of GPUs currently attached to system (gpuid, vendor/model, flags) gpuid <gpuid> Specifies which GPU(s) subsequent commands apply to. The default (0x0000) means all eGPUs. See output of gpus command for valid <gpuid> values (of the form 0x7005) to use. apps Lists apps holding references to specified GPU - and app attributes/properties like PID, RPID, USER, PROCESS, APIS (Metal, GL/CL, GVA), BUNDLE_IDENTIFIER, PATH, GPUEjectPolicy and GPUSelectionPolicy where specified. status Shows eject state of specified eGPU(s) (Present, Initiated, Finalized). Eject Performs the full Eject sequence ( Initiate + Relaunch + Finalize ) of specified GPU(s). Initiate Initiates eject of specified eGPU(s). These eGPUs are temporarily hidden from API instantiations. Relaunch Interacts with apps that hold references to specified eGPU(s) - to facilitate migration to remaining GPUs. Finalize Finalizes eject of specified eGPU(s) - must be physically unplugged before they can be used again. Cancel Cancels initiated eject of specified GPU(s) - instead of Finalized. RelaunchPID <PID> Apply relaunch stimulus to one particular PID - for app relaunch stimulus testing. EXAMPLES
$ SafeEjectGPU gpus List eGPUs. Output is useful for cut-n-paste of example specified gpuid values used below $ SafeEjectGPU gpus apps status List all eGPUs and Apps on all eGPUs along with eject status of all eGPUs $ SafeEjectGPU Eject Perform full Eject sequence on all eGPUs $ SafeEjectGPU gpuid 0x7005 Eject Perform full Eject sequence on specified eGPU $ SafeEjectGPU gpus apps gpuid 0x7153 apps Lists all eGPUs and apps on all eGPUs and on integrated GPU as well $ SafeEjectGPU Initiate RelaunchPID 12345 Cancel Hide eGPUs and send relaunch stimulus to PID without doing full eject PLIST PROPERTIES
The following properties are generally inferred. Some values can be specified in the app's Info.plist. They affect eGPU eject and API selection behaviors. Generally, these properties won't need to be specified: GPUEjectPolicy Inferred/Settable GPUEjectPolicy values for dealing with apps that needs to drop references to ejecting eGPU. Establisehd in app bundle's Info.plist. Possible values: relaunch Send AppKit quit-with-save event followed by open-with-restore (relaunch app using alternate GPU(s)). wait Just wait for GPU references to drop (without sending events or signals). kill Use sigKill to force app exit (for apps that will relaunch via launchd - using alternate GPU(s)). ignore Ignore - necessary for some internal GPU/display components - working to eliminate its use. Inferred-Only GPUEjectPolicy values (you can't specify these values, but you'll see them as defaulted/inferred policies in apps out- put): wrelaunch Wait momentarily for processing of Metal GPU change notifications before resorting to relaunch (as necessary). jrelaunch Just relaunch without waiting (since OpenGL/OpenCL are in use). rwait When a process is subordinate to another, "responsible", process (see RPID column), Eject actions apply to the responsible process, who in turn deals with subordinates to eliminate their ejecting eGPU references. GPUSelectionPolicy Settable values that affect instantiation of Metal and OpenGL/CL contexts (wrt eGPU use). Established in app bundle's Info.plist. Possible values: avoidRemovable Avoid creation of MTLCommandQueues, and OpenGL/CL contexts on eGPUs. preferRemovable Prefer creation of MTLCommandQueues, and OpenGL/CL contexts on eGPUs. SEE ALSO
plist(5) sudo(8) launchd(8) HISTORY
The command line SafeEjectGPU tool first appeared in the 10.13.4 release of Mac OS X. Mac OS X January 22, 2018 Mac OS X