Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Terminal Infinite Loop

When opening Terminal I get this message that repeats over and over making it impossible for me to do anything in Terminal


'Unable to open "/private/etc/cups/cupsd.conf": No such file or directory'


All my searching here turns up a printing issue. I don't have a printer and haven't had one for the better part of a year.


I've checked in Console for the CUPS logs and there is nothing there.


How can I either replace this file [hopefully without a full reinstall of the OS] or make this message go away so that I can actually use Terminal?


Aside, I've not used Terminal in quite awhile so I have no idea when this file disappeared or when the problem would have begun.

MacBook Pro, OS X Mavericks (10.9.2)

Posted on Apr 15, 2014 1:21 AM

Reply
23 replies

Apr 15, 2014 8:02 AM in response to comraderoger

Back up all data.


Select

Shell ▹ New Command

from the Terminal menu bar. Uncheck the box marked

Run command inside a shell

if checked.

Copy and paste the following line into the text box that opens, then press return:

mkdir disabled_shell_files


Close the Terminal window that opens. Repeat with this line:

mv .profile .bash_history .bash_profile .bashrc .inputrc disabled_shell_files

Your old shell initialization and history files will be saved in a directory named "disabled_shell_files" at the top level of your home directory.

Close the window, open a new one, and test.

Apr 16, 2014 1:30 PM in response to Linc Davis

Unfortunately, this did not work.


When I did Step 2, I got this in the window that popped up:


-mv: rename .profile to disabled_shell_files/.profile: No such file or directory

-mv: .bash_history: No such file or directory

-mv: rename .bash_profile to disabled_shell_files/.bash_profile: No such file or directory

-mv: rename .bashrc to disabled_shell_files/.bashrc: No such file or directory

-mv: rename .inputrc to disabled_shell_files/.inputrc: No such file or directory


[Process completed]


And I still keep getting the CUPS message popping up.


But, thanks for the help. Do you have a Plan B?

Apr 16, 2014 3:54 PM in response to comraderoger

Please read this whole message before doing anything.


This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.


Step 1


The purpose of this step is to determine whether the problem is localized to your user account.


Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”


While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.


Test while logged in as Guest. Same problem?


After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.


*Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.


Step 2


The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.


Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.

Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.


Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.


The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.


Test while in safe mode. Same problem?


After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

Apr 17, 2014 1:43 PM in response to Linc Davis

The problem showed up in both steps and is still showing up after a regular start up.


I'm having other issues as well so I'm going to take my laptop in for a thorough diagnostic to see what's going on. Very long start ups, very long time for applications to open, general sluggishness.


So thanks for the help. I'll see what the techs can do next week when I take it in.

Apr 17, 2014 2:39 PM in response to comraderoger

You can save yourself a trip by doing everything the Apple "Geniuses" will do.

1. Run the Apple Hardware Test. It will show nothing wrong.

2. Reinstall OS X. There will be probably be no change.

3. Back up your data, erase the startup volume in Recovery mode, and install the OS again. Test without restoring any of your data. If you can't reproduce the problem with the machine in that state, then it's solved, as far as the "Geniuses" are concerned.

When you restore your data from the backup, the problem may reappear. Go back to the Apple Store, and the cycle will be repeated.

If you expect an Apple "Genius" to help you solve a complex configuration problem that may involve incompatible third-party software, which is what this is, you're going to be disappointed. They're not allowed to do that, and they don't know how.

Apr 17, 2014 3:14 PM in response to Linc Davis

I have done all of these things, multiple times. And my laptop still has issues. In fact, doing a clean install of the OS on an erased internal drive has been one of the worst experiences as the machine becomes mostly unresponsive.


And I won't be seeing any Geniuses since the nearest Apple store is about a thousand miles away. I will be taking my computer to an authorized service center to see what the problem is. There are other places than Apple Stores to repair a computer, in case you didn't know that.


While I appreciate your help, I do not appreciate the dismissive tone of your last reply. And since you have not, in fact, worked on my machine, you do not, in fact, know what the issue is. And how I decide to proceed is up to me and not you.

Apr 20, 2014 1:46 PM in response to MrHoffman

This is the content of the /etc/bashrc file:


# System-wide .bashrc file for interactive bash(1) shells.

if [ -z "$PS1" ]; then

return

fi



PS1='\h:\W \u\$ '

# Make bash check its window size after a process completes

shopt -s checkwinsize

# Tell the terminal about the working directory at each prompt.

if [ "$TERM_PROGRAM" == "Apple_Terminal" ] && [ -z "$INSIDE_EMACS" ]; then

update_terminal_cwd() {

# Identify the directory using a "file:" scheme URL,

# including the host name to disambiguate local vs.

# remote connections. Percent-escape spaces.

local SEARCH=' '

local REPLACE='%20'

local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"

printf '\e]7;%s\a' "$PWD_URL"

}

PROMPT_COMMAND="update_terminal_cwd; $PROMPT_COMMAND"

fi


The sudo grep command shows nothing.


And the error messages just keeps showing up...


Thanks for the help. It is appreciated.

Terminal Infinite Loop

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.