Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

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

Setting Terminal Window's title

Hello,

does anybody knows how to do this? I tried:
set name of window 1 to "Title"
but I get:
Terminal got an error: Can’t set name of window to "Title".

This work with other applications. I'd like to avoid GUI scripting since I want to distribute this script to people running their macs in different languages...

MacBook Pro 17", Mac OS X (10.5.8)

Posted on Nov 9, 2009 2:35 AM

Reply
Question marked as Best reply

Posted on Nov 9, 2009 3:20 AM

Hi kaz219,

Does the following script do what you are asking for?

tell application "Terminal"
tell settings set "Basic"
set title displays device name to false
set title displays shell path to false
set title displays window size to false
set title displays settings name to false
set title displays custom title to true
set custom title to "Title"
end tell
end tell

For more information, have a look at Terminal's AppleScript dictionary.

Hope it can help.
2 replies
Question marked as Best reply

Nov 9, 2009 3:20 AM in response to kaz219

Hi kaz219,

Does the following script do what you are asking for?

tell application "Terminal"
tell settings set "Basic"
set title displays device name to false
set title displays shell path to false
set title displays window size to false
set title displays settings name to false
set title displays custom title to true
set custom title to "Title"
end tell
end tell

For more information, have a look at Terminal's AppleScript dictionary.

Hope it can help.

Setting Terminal Window's title

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