Hi I have a shell script in my login item , which runs whenever i log in to my system . It does work completely but once it exits the terminal , it leaves the terminal shortcut on my dock and I don't want that I want my dock to be clean and want only my required application in it.Is there any command which I can keep at the end of my script so that once the script executes completely it also remove terminal from my dock.
MacOS – how to use terminal to remove item from dock
dockmacosscriptterminalui
Related Question
- Open application from terminal and remain linked to the process (like Linux) so when CTRL+C is sent to terminal the application closes too
- MacOS – How to add an Automator application to the Dock
- MacOS – Dock shortcut for an interactive bash script
- How to hide Terminal Window when a script is running
- MacOS – Remove macOS Dock icon with a command in Terminal
Best Answer
Try to run the script with launchd instead. Save a property list like this as
~/Library/LaunchAgents/some.label.plist
:It should run the script the next time you log in. Make sure the script is executable (
chmod +x /path/to/script
) and starts with a hashbang line (like#!/usr/bin/env bash
).