% sw_vers
ProductName: macOS
ProductVersion: 13.0
BuildVersion: 22A380
% defaults read com.apple.loginitems | more
{
SessionItems = {
Controller = CustomListItems;
CustomListItems = (
{
Alias = {length = 216, bytes = 0x00000000 00d80003 00010000 ce8cae5f ... 00012f00 ffff0000 };
CustomItemProperties = {
"com.apple.LSSharedFileList.ItemIsHidden" = 1;
"com.apple.loginitem.HideOnLaunch" = 1;
};
Flags = 1;
Name = "iTunesHelper.app";
},
What is the location of the file?Seeing it on my Ventura. Partial output:
Code:% sw_vers ProductName: macOS ProductVersion: 13.0 BuildVersion: 22A380 % defaults read com.apple.loginitems | more { SessionItems = { Controller = CustomListItems; CustomListItems = ( { Alias = {length = 216, bytes = 0x00000000 00d80003 00010000 ce8cae5f ... 00012f00 ffff0000 }; CustomItemProperties = { "com.apple.LSSharedFileList.ItemIsHidden" = 1; "com.apple.loginitem.HideOnLaunch" = 1; }; Flags = 1; Name = "iTunesHelper.app"; },
Yes.Some login items are in /private/var/db/com.apple.xpc.launchd/loginitems.501.plist
You are correct, that is the file that stores user added apps to login items in Ventura.And /private/var/db/com.apple.backgroundtaskmanagement/BackgroundItems-v4.btm
Too many places to look and not important to me.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>terminal.LaunchAtLogin</string>
<key>ProgramArguments</key>
<array>
<string>open</string>
<string>-j</string>
<string>/System/Applications/Utilities/Terminal.app</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
To be fair here, your "easy way" involves creating a .plist file, which most people will not know how to do...There is an easy way to launch an app hidden now: create a plist file in ~/Library/LaunchAgents/ and the Background item added message will be displayed.
Example plist for launching Terminal hidden:
Code:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>terminal.LaunchAtLogin</string> <key>ProgramArguments</key> <array> <string>open</string> <string>-j</string> <string>/System/Applications/Utilities/Terminal.app</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>
Right, but for the other folks not on this forum that don't have any technical knowledge?TextEdit - New File - Format - Plain text - Copy & Paste the text - Save as terminal.LaunchAtLogin.plist
I personally don’t consider editing a simple text file as “technical knowledge”.Right, but for the other folks not on this forum that don't have any technical knowledge?
Riiiiight... Again, I'm not talking about me or my nearly 20 years of IT knowledge. I'm referring to the Grammas and the "Sorry, I'm not very tech savvy" people out there that have no idea what Macrumors even is.I personally don’t consider editing a simple text file as “technical knowledge”.
Again, for someone like you or I, editing a text file or a .plist file, great. Done. Boom.LaunchAgents have been on macOS forever and are well documented, on this forum and elsewhere
I can put on any shoes, but I can’t fix what Apple has broken.Riiiiight... Again, I'm not talking about me or my nearly 20 years of IT knowledge. I'm referring to the Grammas and the "Sorry, I'm not very tech savvy" people out there that have no idea what Macrumors even is.
Again, for someone like you or I, editing a text file or a .plist file, great. Done. Boom.
Now, put all of your "technical knowledge" aside and put on your "not so tech savvy" shoes and try to grapple why some option or workflow has behaved one way for years but now does not. I feel you will continue to fail in missing my point, though.
I can put on any shoes, but I can’t fix what Apple has broken.
As mentioned above, contact Apple about the missing feature.
open /Applications/VLC.app
open -j /Applications/VLC.app
open -g /Applications/VLC.app
thanks for the breakdown. i'll test all apps im interested in hiding. i have also noticed that when i first mapped my nas drives, they all opened at boot and self-closed once mapped... but now (2 days later) they simply map at boot and do not launch/close. i think ventura just has flaws as of now but hopefully updates fix these rather quicklyThe plist runs the open command at login with options:
open – open files and directories
-g Do not bring the application to the foreground.
-j Launches the app hidden
Unfortunately, it doesn’t seem to work for all apps, Chrome being one of them.
You can test from Terminal an app behaviour, example for VLC
Code:open /Applications/VLC.app open -j /Applications/VLC.app open -g /Applications/VLC.app
For other open options run man open or https://ss64.com/osx/open.html
Perfect, thank you. That's worked for me.There is an easy way to launch an app hidden now: create a plist file in ~/Library/LaunchAgents/ and the Background item added message will be displayed.
Example plist for launching Terminal hidden:
Code:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>terminal.LaunchAtLogin</string> <key>ProgramArguments</key> <array> <string>open</string> <string>-j</string> <string>/System/Applications/Utilities/Terminal.app</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>
do shell script "/usr/bin/open -j /System/Applications/Calculator.app"
do shell script "/usr/bin/open -j /System/Applications/TextEdit.app"
do shell script "/usr/bin/open -j /System/Applications/Utilities/Console.app"
will this hide foreground windows though?An alternative for launching multiple apps at login: an AppleScript running multiple open commands, saved as an app.
Open Script Editor (/Applications/Utilities/Script Editor), copy-paste the code (edited with the paths to your desired apps of courseCode:do shell script "/usr/bin/open -j /System/Applications/Calculator.app" do shell script "/usr/bin/open -j /System/Applications/TextEdit.app" do shell script "/usr/bin/open -j /System/Applications/Utilities/Console.app"
), save as an application (File Format: Application). In System Preferences – General – Login Items, add the created app to Open at login.
It’s the same command (open), just a different way of running it. So, it still wouldn’t work for Chrome. But it works for other apps.will this hide foreground windows though?