0

My "task" is to manage many raspberry pies via ssh and that’s getting quiet messy when I open for each an terminal tab, so I am creating an app (Xcode 12, SwiftUI, macOS) to mange them all. I can access them already via ssh from my app, but I can’t figure out how to display the response. Is there a way to "include terminal" to an App (not an CMD Line App), or a way to read the cmd lines and display them in an text field?

I'm trying to figure out how to create an terminal like view in an SwiftUI View for MacOS in an MacOS App. I tried "TextEditor" and then passing the arguments, but I found no way to display the "terminal output".

I will try SwiftTerm later this day. But I’m still happy about good ideas (and yes I know that there are already apps out there that could do that job. But they are not useful for my special use case (too much customisation must be done - and I still have to program an app for the rest features I need)).

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
DoTryCatch
  • 1,052
  • 6
  • 17
  • This is not built into macOS, but you might look into something like [SwiftTerm](https://github.com/migueldeicaza/SwiftTerm). You should also consider just broadcasting your commands to all sessions in [tmux](https://stackoverflow.com/questions/16325449/how-to-send-a-command-to-all-panes-in-tmux) or [iTerm](https://christopher.su/notes/mac/iterm-broadcast/), rather than writing an app. Or you could use something like [Ansible](https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html) for scriptable, repeatable management tasks. – jtbandes Dec 04 '20 at 00:10
  • Welcome to Stack Overflow. This question seems to *"Need more focus"*, please consider the guidelines [*"Why are some questions closed??"*](https://stackoverflow.com/help/on-topic) – bad_coder Dec 04 '20 at 00:31
  • Thanks for the idea with SwiftTerm. I gonna try that later this day. – DoTryCatch Dec 04 '20 at 04:47
  • So I read a bit about SwiftTerm and it seems quite good, I also installed their demo macOS app. Their app is working fine but it is written with the "old" storyboard way, does somebody know if there is a way to convert storyboard to swift oder if there is an interpreter? thanks. – DoTryCatch Dec 04 '20 at 23:19

0 Answers0