How to pass arguments to IPhone “Run Script over SSH”?


This Content is from Stack Overflow. Question asked by mllasers

I’m running a Python script on my local computer using the Shortcuts app from my phone (this works perfectly well and returns data to my phone). I also want the script to display a web browser on the local computer. The code for this is simple:

import webbrowser
import sys
print("This print statement is shown on my phone")
webbrowser.get('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe%s').open(str(sys.argv)) # works locally but not over ssh
print("This print statement is also shown on my phone")

But to make SSH display I’m confident that I would need the ssh -X or -Y argument which cannot be passed into the shortcuts app.
I can see two solutions which might work but I haven’t been able to find

  1. There is an equivalent argument to -X or -Y which can be passed in the main body of text for the ssh command
  2. There is a way to pass arguments to the shortcut app

Any thoughts would be greatly appreciated!


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?