New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run_scaled: support passing arguments to Xpra #3303
Conversation
Thanks! |
I actually considered that. Considering the UI of run_scaled, I'd find it confusing because run_scaled is basically a wrapper around an X application. It also wraps Xpra, but a user won't think of Xpra when they write Another point is that running applications that themselves expect the Now, if |
Still, if you do consider the |
In that case, you must specify it before theapp.
I do. Sorry for the extra work! |
The run_scaled script supports an argument called --scale, but the manpage specifies --scaling for some reason. Fix the occurences to match the implementation.
acfc8b4
to
93b3361
Compare
I implemented the
This won't work in my implementation. But hopefully no one needs it. |
fs/bin/run_scaled
Outdated
scale = parse_scale(x[len("--scale="):]) | ||
elif x == "--": | ||
extra_xpra_args = sys.argv[i+2:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will pass arguments after --
to xpra and does not take into account he possibility that there might be more than one --
in the command line.
I'll take a stab at it later today.
This allows running commands like run_scaled app --args -- --more-args -- --xpra-args such that the command to be run is "app --args -- --more-args" and the args passed to Xpra is "--xpra-args"
The Github web UI is down for me right now, but I can probably comment
with email too? I slept on this and I think the reasonable way to do
it is to split on the last `--` instance. I wrote that and pushed the
commit.
Now with something like
```
run_scaled --scale=1.5 someapp --arg -- --more-args -- other-stuff -- --xpra-arg
```
the command to run is `someapp --arg -- --more-args -- other-stuff`.
This looks workable to me, though not very intuitive.
…On Fri, 15 Oct 2021 at 08:06, Antoine Martin ***@***.***> wrote:
@totaam commented on this pull request.
________________________________
In fs/bin/run_scaled:
> scale = parse_scale(x[len("--scale="):])
+ elif x == "--":
+ extra_xpra_args = sys.argv[i+2:]
This will pass arguments after -- to xpra and does not take into account he possibility that there might be more than one -- in the command line.
I'll take a stab at it later today.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
--
Hannu Hartikainen
|
I would prefer splitting on the first arg, that way you never end up with a command with
is much nicer than:
Also it keeps the xpra args, including
It's easier to see which arguments go where. |
That would require everyone to always use |
No.
Existing users would not need to modify their existing command lines at all, which is important. |
Right. But why not just allow
where Anyway, I'll implement it either way later. |
If "--" is present in the arguments, everything after the first "--" is the command and everything before it is either a run_scaled argument or (if not recognized) an Xpra argument.
This works now. |
I needed to pass some arguments to Xpra when running Wine software with
run_scaled
. I think this might have other use cases than mine, so I added support for passing generic extra arguments.While I was at it, I fixed a bug in the manpage.