Re: Terminal (spurious command line) problem
Many thanks to everybody who responded. On 18 Apr 2006, at 18:59, Bill Stephenson wrote: Can anyone suggest where to look for such a file? Look in the Terminal preferences to see if you have a script entered to run when opening a window. The "Open a saved .term file…" checkbox was unselected and no '.term' files could be found anywhere either, so that didn't seem to be the cause. Similarly Boysenberry Payne wrote: Have you tried looking in ~/.profile? Sorry if that's too obvious... Nope -- there was nothing unusual in '.bash_profile', just some PATH statements. Brian McKee wrote: Start Terminal.app and check under preferences (apple-,) If you don't see it there, quit Terminal, backup and delete ~/Library/Preferences/com.apple.Terminal.plist Betcha that gets it. Yippee! That hit the nail right on the head. In fact it is possible to mouse the 'com.apple.Terminal.plist out of the folder onto the desktop temporarily just to see what happens. MacOS then immediately rewrites a new '.plist'; Terminal opens normally and seems to function normally. However it raises some interesting questions. Sherm Pendley wrote: It's not a great idea to manipulate preference files directly. Their location, filename, format, etc. are considered an implementation detail that's subject to change without notice. Apple has already made at least two changes, from old-style plists to XML-based plists, and then from that to a binary file format. Looking in the '.plist' file with BBEdit, it is indeed a binary file. However "Property List Editor" shows its content to be a XML dictionary. Clicking the little triangle next to 'Root' reveals the 'Property list'. In this particular case there was an 'Execution String' with a 'value' which was exactly the spurious command line in question. "Property List Editor" allowed that entry to be selected and deleted. Having done that, and having put the file back into '~/ Library/Preferences', everything seemed to return to 'normal', or at least, what it had been in the past. Interestingly, the XML content of the newly written '.plist' and the original '.plist' had not one single word in common -- they were totally and radically different. But Terminal seems to behave pretty much the same whichever '.plist' is installed in ~/Library/ Preferences. I guess the original '.plist' dates back to OS 10.2.? and now it is OS 10.4.6 and, er, things have changed a bit…It certainly bears out what Sherm says above. Chris Devers added: [/snip/ -- preferences and caches are generally easy & safe to rename or remove when trying to diagnose software problems. So, for the moment I have stayed with the original version of the '.plist', edited with "Property List Editor" and all seems to be well. Again thank you all very much for your prompt help and advice which will no doubt prove very useful to many folk in a similar pickle. Alan Fry
Re: Terminal (spurious command line) problem
On Tue, 18 Apr 2006, Sherm Pendley wrote: > On Apr 18, 2006, at 2:30 PM, Brian McKee wrote: > > > Start Terminal.app and check under preferences (apple-,) > > If you don't see it there, quit Terminal, backup and delete > > ~/Library/Preferences/com.apple.Terminal.plist > > It's not a great idea to manipulate preference files directly. Their > location, filename, format, etc. are considered an implementation > detail that's subject to change without notice. Apple has already made > at least two changes, from old-style plists to XML-based plists, and > then from that to a binary file format. > > The Apple-recommended way to deal with the user defaults database from > a shell prompt is to use the "defaults" tool, like this: > > defaults delete com.apple.Terminal > > Naturally, there are both Cocoa and Carbon APIs to do this > programatically also. All of which is true. That said, I still find this easier & potentially safer: mv ~/Library/Preferences/com.apple.Terminal.plist{,.MOVED} The main benefit being that if this doesn't actually solve the problem, you can trivially reverse the change with a mv ~/Library/Preferences/com.apple.Terminal.plist{.MOVED,} (And all that said, renaming preference files and deleting caches under your ~/Library/Caches tree are both common diagnostic tricks when things aren't working. In most cases, zapping files in either of these trees shouldn't cause any problems, since if the needed files are missing, the applications will regenerate a known-good version of the preference or cache file -- the same way it did the first time you used them. But then, at a glance, it doesn't look like Terminal uses caches, so that wouldn't apply here, but the broader point still stands -- preferences and caches are generally easy & safe to rename or remove when trying to diagnose software problems.) -- Chris Devers who *ahem* does this sort of thing for people for a living :-)
Re: Terminal (spurious command line) problem
On Apr 18, 2006, at 2:30 PM, Brian McKee wrote: Start Terminal.app and check under preferences (apple-,) If you don't see it there, quit Terminal, backup and delete ~/Library/Preferences/com.apple.Terminal.plist It's not a great idea to manipulate preference files directly. Their location, filename, format, etc. are considered an implementation detail that's subject to change without notice. Apple has already made at least two changes, from old-style plists to XML-based plists, and then from that to a binary file format. The Apple-recommended way to deal with the user defaults database from a shell prompt is to use the "defaults" tool, like this: defaults delete com.apple.Terminal Naturally, there are both Cocoa and Carbon APIs to do this programatically also. sherm-- Cocoa programming in Perl: http://camelbones.sourceforge.net Hire me! My resume: http://www.dot-app.org
Re: Terminal (spurious command line) problem
On Apr 18, 2006, at 2:03 PM, Boysenberry Payne wrote: On Apr 18, 2006, at 12:55 PM, Alan Fry wrote: A weird problem with Terminal.app has arisen in which a command line (of the form )gets written to the Terminal window each time a new Terminal window is opened (File- >New Shell). Have you tried looking in ~/.profile? Sorry if that's too obvious... You might also look for a ~/.term file. Terminal.app has an option (check the preferences) to load a .term file when it opens a new window. sherm-- Cocoa programming in Perl: http://camelbones.sourceforge.net Hire me! My resume: http://www.dot-app.org
Re: Terminal (spurious command line) problem
On 18/04/06, Alan Fry <[EMAIL PROTECTED]> wrote: > A weird problem with Terminal.app has arisen in which a command line > (of the form )gets written to the Terminal > window each time a new Terminal window is opened (File->New Shell). > > The problem seems to owe its origins to some experiments with > "ScriptGUI" to see if that app would create a 'droplet' to fulfil the > function of the command line above. Somehow a file (?) seems to have > got left somewhere (?) in the bowels of system which is 'read' by > Terminal each time a new window is opened. "ScriptGUI" itself has > subsequently been deleted. > > Can anyone suggest where to look for such a file? Where could any > 'command string' be kept in the system which would be 'written' to > the Terminal window on launch? > > The machine BTW is a G4 running Tiger 10.4.6. and for what it's > worth, both of the files referenced in the spurious command line have > been deleted. > > I would be deeply grateful to anyone for some clues as to where to > look or what to do to mitigate the nuisance (and apologise if this is > too far off-topic for this list). > > Alan Fry Start Terminal.app and check under preferences (apple-,) If you don't see it there, quit Terminal, backup and delete ~/Library/Preferences/com.apple.Terminal.plist Betcha that gets it. HTH Brian
Re: Terminal (spurious command line) problem
Have you tried looking in ~/.profile? Sorry if that's too obvious... Thanks, Boysenberry boysenberrys.com | habitatlife.com | selfgnosis.com On Apr 18, 2006, at 12:55 PM, Alan Fry wrote: A weird problem with Terminal.app has arisen in which a command line (of the form )gets written to the Terminal window each time a new Terminal window is opened (File->New Shell). The problem seems to owe its origins to some experiments with "ScriptGUI" to see if that app would create a 'droplet' to fulfil the function of the command line above. Somehow a file (?) seems to have got left somewhere (?) in the bowels of system which is 'read' by Terminal each time a new window is opened. "ScriptGUI" itself has subsequently been deleted. Can anyone suggest where to look for such a file? Where could any 'command string' be kept in the system which would be 'written' to the Terminal window on launch? The machine BTW is a G4 running Tiger 10.4.6. and for what it's worth, both of the files referenced in the spurious command line have been deleted. I would be deeply grateful to anyone for some clues as to where to look or what to do to mitigate the nuisance (and apologise if this is too far off-topic for this list). Alan Fry