Correcting Default Application Assignments
The most common cause of files opening with an unexpected application like Skim is a broken default app setting. macOS uses theLSHandler registry to determine which app should open specific Uniform Type Identifiers (UTIs). When this mapping becomes corrupted, any file type might trigger the wrong handler.
You can manually reset these associations using the Finder interface, which updates the user-level preferences correctly.
- Select the Affected File: Locate a file that opens incorrectly in SkimPDF. Right-click (or Control-click) on the file icon.
- Open Info Panel: From the context menu, select Get Info. Alternatively, press
Command + I. - Change Open With: In the "Open with:" section, click the dropdown menu. Select the application you actually want to use (e.g., Preview, TextEdit, or your preferred PDF viewer).
- Apply to All: Click the Change All... button below the dropdown. Confirm the action in the dialog box. This updates the association for all files of that specific type.
Resetting the LaunchServices Database
If correcting individual file associations does not stop folders or files from opening in SkimPDF, the global LaunchServices database is likely corrupted. This database caches information about available applications and their capabilities. Corruption here can cause the system to suggest incorrect apps for various file types, including directories. Rebuilding this database forces macOS to rescan all installed applications and re-establish valid file associations. You can do this via Terminal.- Open Terminal: Navigate to
/Applications/Utilities/and launch Terminal.app. - Execute the Reset Command: Type the following command exactly and press Return:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user - Wait for Completion: The command runs silently. It may take a few minutes depending on the number of applications installed. Do not interrupt it.
- Restart Your Mac: After the command completes, restart your computer to ensure the new associations are loaded into memory.
Removing Quarantine Attributes
Sometimes, files downloaded from the internet or transferred between systems carry a "quarantine" attribute. This metadata tag can interfere with how macOS handles the file, potentially causing it to open in a restricted or unexpected viewer if the original source was associated with Skim. While less common for local folders, this can affect recently imported documents. You can remove these attributes using thexattr command. Before proceeding, ensure you understand which files are affected to avoid unintended side effects.
- Identify the Path: Note the full path to the problematic file or folder. You can drag the file from Finder into the Terminal window to auto-fill the path.
- Remove Attributes: Use the
-dflag to delete the specific quarantine attribute. Run the following command:
Replacexattr -d com.apple.quarantine /path/to/file/path/to/filewith the actual path. For a folder and its contents, add the-Rflag for recursive removal:xattr -R -d com.apple.quarantine /path/to/folder - Verify Removal: Check if the attribute remains by running:
If no output appears, the attribute has been successfully removed.xattr /path/to/file
xattr commands. If you are unsure about the impact, consult our guide on Unabling Remove Attributes Files Using xattr on Mac for more detailed explanations of attribute management.
Checking for Conflicting Extensions
In some cases, third-party applications install extensions that hook into the file opening process. If SkimPDF or a similar tool has registered a system-wide extension for handling documents, it might override default behaviors. Check your Login Items and Extension Manager to identify potential conflicts.- Review Login Items: Go to System Settings > General > Login Items. Look for any PDF-related tools or document managers that are set to open at login.
- Disable Unnecessary Tools: If you find a document manager or PDF utility that is not essential, toggle it off or remove it from the list.
- Check Extensions: Navigate to System Settings > Privacy & Security > Extensions. Review any kernel extensions or automation scripts related to file handling. Disable any that seem suspicious or unnecessary.
Frequently Asked Questions
Why did my folders start opening as PDFs?
This usually happens when the file type association for directories is mistakenly linked to a PDF viewer. macOS treats certain directory structures as data bundles, and if the default handler is corrupted, it may attempt to render them as documents. Rebuilding the LaunchServices database typically resolves this by resetting the system's understanding of folder icons and handlers.
Is it safe to run lsregister -kill?
Yes, running the lsregister command with the -kill and -r flags is completely safe. It only clears the cache of application registrations; it does not delete any files, applications, or user data. Your Mac will simply take slightly longer to load file previews the next time you open a folder while it rebuilds the cache.
How do I fix permissions for a single file without affecting others?
You can use the chmod command in Terminal to adjust permissions for a specific file. For example, chmod 755 filename.pdf sets read/write/execute for the owner and read/execute for others. However, if the issue is strictly about the app opening the file, changing the default app via Get Info is safer and more appropriate than modifying Unix permissions.
Can antivirus software cause files to open in the wrong app?
While rare, some antivirus suites install kernel extensions that intercept file operations. If you have recently installed security software, check its settings for any "file inspection" or "document preview" features. Disabling these features temporarily can help determine if the antivirus is causing the association conflict.
What if SkimPDF is not installed anymore but files still open with it?
If the application is uninstalled but the association remains, the system may try to launch a ghost entry. Running the lsregister reset command will detect that the application bundle is missing and remove the invalid association. After the reset, you can assign a new default app for those file types.