On a Mac Sierra, how can I give an ssh session access to the display?

女生的网名这么多〃 提交于 2019-12-24 00:56:45

问题


This is a follow-up of Running ios-sim with Jenkins - I need a way to make this work when the Jenkins slave is run via ssh, and not via launchctl

So, in general, how can I access the display if I log onto a mac using ssh?


回答1:


I think you have to login to the Mac (Jenkins slave) using the user that you are using with the ssh connection. Once logged in, the jobs you run should be able to access the display.

We start the Jenkins slave on our Mac machine using "Launch slave agents on Unix machines via SSH" Launch Method. We have SSH credentials configured on the master and slave so this is seamless. My Mac slave is located a great distance from me. I can't currently connect to it to see if it matters who is logged in. Perhaps it doesn't have to be your ssh login.

Edited to add: Ideally you would not need to use "sudo" to run your command. But, you might have to.



来源:https://stackoverflow.com/questions/41862327/on-a-mac-sierra-how-can-i-give-an-ssh-session-access-to-the-display

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!