Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Disabling the startup items in command line

Disabling the startup items in command line
Thread Tools
icarus523
Fresh-Faced Recruit
Join Date: Feb 2006
Status: Offline
Reply With Quote
Feb 12, 2006, 05:19 AM
 
How do I disable the startup items under mac os x?
Specially to be done in the command line. My PowerBook's
video card was fried, and basically output from it doesn't
work - if mac os x tries to load the GUI - it hangs.
I've managed to disable the GUI (think headless), however
the startup items appear to try and run it again. I can
prevent the startup items by holding the shift-key down
during bootup - but that's getting annoying. Many thanx
     
suthercd
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Feb 12, 2006, 01:28 PM
 
Look in /Library/StartupItems. Also look at your System Preferences-Accounts-Login Items. If that does not reveal what is loading and causing problems, then here is a way to diagnose

You can boot into OS X /BSD single user mode which will put you into a command line interface by holding down the command (apple) and the s keys at startup. This bypasses most of the startup daemons starting only init and mach-init. The GUI is not loaded. You can then add processes and devices. The next step usually is to run fsck (fsck -yf) to check the boot volume and perform repairs if need. The -yf forces a filesystem check with an auto yes response to all questions posed by fsck. Then mount the boot volume (mount -uw /) with write access so it is available.

You add other OS components with startup daemons. The process depends on the version of OS X are running. Beware you are performing brain surgery on the OS and can kill it with a typo or incorrect instruction.

The reboot command will restart your Mac.

There are articles, how-tos and tech refs available on these commands via web searches.

Craig
     
icarus523  (op)
Fresh-Faced Recruit
Join Date: Feb 2006
Status: Offline
Reply With Quote
Feb 14, 2006, 07:11 AM
 
Okay, I cleared out everything in /Library/StartupItems
and ~/Library/StartupItems but there still exists
/System/Library/StartupItems its got some scary looking files
there that if I remove, might prevent like Apache,AppServices,
AppleShare,AuthServer,CrashReporter,Disks,FibreCha nnel,
IFCStart,IPServices,Metadata,NFS,NIS,NetworkTime,P rintingServices,
RemoteDesktopAgent,SNMP, from loading.

I want all the networking stuff, but don't really care about
anything that relates to the GUI. Which one's safe? Many thanx
     
suthercd
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Feb 14, 2006, 09:12 AM
 
You will not ever (ever) need to access or change files in /System. Your original question was addressed by my reply. If your video card is in-op, then there is nothing that the software can do to remedy that. I did not suggest that you look or access /System/Library/StartupItems. That is all an integral part of the OS design and not for user changes. You cannot disable the GUI and expect your OS to work. You can use the Terminal or install X11 for X-window access.

If you have a hardware problem with the video card, replace it.

Craig
     
icarus523  (op)
Fresh-Faced Recruit
Join Date: Feb 2006
Status: Offline
Reply With Quote
Feb 15, 2006, 09:05 AM
 
I believe you're missing the original intent of my question.
There is something that loads during the startup sequence
that can be disabled by holding down the shift key (think
extensions disabled - OS 7-9 days).

SystemUIServer is the culprit - if this thing is loaded, load
averages sky rockets to 8.0 averages - ouch, networking will
halt, and essentially Mac OS X will hardly respond. - SSH
connections will be dropped.

It's actually quite easy to disable the GUI just a single
line to uncomment out in one of the startup scripts. But theire
is something else that loads (I don't know what) that brings
up the SystemUIServer - its pretty much after - wireless
connections (a.k.a. AIRPORT) are initialised - I see logs
of the wireless drivers loading.

Why am I doing this you ask? Cause replacing a dead video
card on a PowerBook means replacing the motherboard which
is equivalent to buying a new 12" iBook - I have no cash
for this, I am out of warranty and the PowerBook works
great as a server - however if I ever need to remote reboot
how do I hold the "shift-key" down?

The PowerBook is a G4 12" (Rev C) with 1.25GB RAM - with
dead video card (everything else works), caused by *gasp* overheating during an
OpenGL screensaver - users take note.. These powerbooks overheats and
will kill itself, if not cooled properly.
     
suthercd
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Feb 15, 2006, 04:32 PM
 
Other folders to check are /PreferencePanes, /Extensions, /Contextual Menu Items and /Components. In your User account Library check folders with the same names as well as ~/InputManagers.

After moving files, if they exist, from those folders, also disconnect any USB, Firewire, Airport cards or other peripherals. Basically return your machine to the original configuration without add-ons. Then try booting to see if this remedies the problem. If so, add back peripherals one at a time to see which one or combination of them is causing the headache.

If that is not successful, here are some more ideas.

As you noted, holding down the shift key at startup bypasses all third party and non-essential boot/login software. Since holding it down at boot solves your problem, it makes me suspicious that there is a mod installed by third party software that is causing this.

You also can boot into single user mode by shutting down, then restart while holding down the Command and S keys. Hold until white text appears then release. At the prompt type mount -uw / and press return. Then type mv /Library/Preferences/com.apple.loginwindow.plist preferenceslw.old then return. Type mv /Library/Preferences/windowserver.plist preferencesws.old then return. Type reboot then return. This renames existing preference files so that fresh ones will be created when the machine reboots.

There is some software that uses haxies, especially software that modifies the GUI. If you think that may be applicable in your situation, you will need to explore how to remove files at a deep level.

HTH
Craig
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:24 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,