macos 如何在 Mac OS X 上自动打开终端窗口

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1276506/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 06:20:04  来源:igfitidea点击:

How to Open Terminal Window Automatically on Mac OS X

macosterminal

提问by ZZ Coder

On my Mac, there is no window open when I start Terminal app. I just played with a friend's Mac, a window is automatically opened on startup of terminal. He doesn't know how it's done. I just played with preferences and couldn't find anything for that. Does anyone know how to do that?

在我的 Mac 上,当我启动终端应用程序时没有打开窗口。刚玩朋友的Mac,终端启动时自动打开一个窗口。他不知道这是怎么做到的。我只是玩偏好,找不到任何东西。有谁知道这是怎么做到的吗?

采纳答案by brianegge

  1. Create a Windows Group
  2. Go to Preferences -> Start, and select the windows group to open on start up
  1. 创建 Windows 组
  2. 转到首选项 -> 开始,然后选择要在启动时打开的窗口组

回答by ktrimbach

From the Terminal App, choose Preferences: select Startup and verify that the "On startup, open new window with settings:" radio button is selected and select Basic from the pull-down menu. That's all I have and it starts up with an open window for me.

从终端应用程序中,选择首选项:选择启动并验证“启动时,使用设置打开新窗口:”单选按钮已选中,然后从下拉菜单中选择基本。这就是我所拥有的,它开始时为我打开了一个窗口。

回答by ktrimbach

I'm just grasping at straws here: is it possible that your Terminal program is always running in the background, and you are not actually completely exiting? You can perform this test: Run Terminal in whatever manner you usually do, and then press Command-Q to quit the application completely. Now run Terminal again. Did it open a new window?

我只是抓住了这里的稻草:是否有可能您的终端程序始终在后台运行,而您实际上并未完全退出?您可以执行此测试:以您通常使用的任何方式运行终端,然后按 Command-Q 完全退出应用程序。现在再次运行终端。它是否打开了一个新窗口?

The Mac has a slightly different paradigm on open/closed applications, namely that closing the last window doesn't actually quit the application. Combine this with the fact that Mac users rarely ever actually reboot their computers, and it's easy for relatively novice Mac users to have many applications that are simply running in the background that are never closed completely.

Mac 在打开/关闭应用程序上的范例略有不同,即关闭最后一个窗口实际上并没有退出应用程序。将此与 Mac 用户实际上很少重新启动计算机的事实相结合,对于相对新手的 Mac 用户来说,很容易拥有许多只是在后台运行且从未完全关闭的应用程序。

Just a shot in the dark. If you are for sure exiting the app completely than I can't think of a solution for the problem either.

只是在黑暗中射击。如果您确定完全退出应用程序,那么我也想不出解决问题的方法。

回答by JW.

If you've tried all the above suggestions, see if anything weird is appearing in your console. Open up /Applications/Utilities/Console.app and watch the "All Messages" log while you open Terminal.

如果您已经尝试了上述所有建议,请查看控制台中是否出现任何奇怪的东西。打开 /Applications/Utilities/Console.app 并在打开终端时查看“所有消息”日志。

回答by selfawaresoup

You could try one of the other terminal apps that are out there for Mac. I prefer iTerm, it's free and works very well. It also gives you nice features like tabs, color schemes and fullscreen terminals.

您可以尝试使用适用于 Mac 的其他终端应用程序之一。我更喜欢 iTerm,它是免费的,而且运行良好。它还为您提供了不错的功能,例如选项卡、配色方案和全屏终端。

回答by Achilles

You can also try this out, it is a Ruby gem that lets you automate opening mutliple tabs that run preset scripts or commands: https://github.com/Achillefs/elscripto

您也可以尝试一下,它是一个 Ruby gem,可让您自动打开运行预设脚本或命令的多个选项卡:https: //github.com/Achillefs/elscripto