-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Running alternative shell with parameters #1695
Comments
Hi@mds99, you're quite right that the parameter is passed as-is with no interpretation. I've taken the liberty of reformatting your code snippet for v0.9.6 above with line numbers so I can explain this. The parameter is passed to The simplest fix is to go via a shim script which makes the transition for you :
|
Thanks! i guess i've seen a patch like this earlier in issues, will it be included some day may be? |
I've found this change in some fork, but i could not see it in upstream.
|
Looks like it's slipped through the cracks in #1273 I agree that having this functionality on the client side would be useful in some use cases. @metalefty - I'm had a look at #1273 and I can see no reason not to merge it, apart from a stylistic use of |
Hmm - I've had a closer look at #1273, and as it is, it has very significant limitations. It's going to work with bash scripts and that's about it. Anything else is going to need to understand '-c' and parse the args themselves which is hardly satisfactory. @mds99 - I take it you haven't tried this code? Are you in a position to try patches, or are you working with a packaged version of XRDP? |
Maybe #1273 is a wron PR number? Which should I see? |
My bad - sorry. Try #1270 |
I can rebuild from sources and try on my testbed. I don't feel like i'm capable to produce a patch or to assess the quality of it. |
That's fine - thanks for that. My plan is to work with @d-yacenko on getting his PR into the main devel branch. I've had a think about this overnight and I don't think it's too much work to achive this. If you can test it as well that would be great. |
Hi all, can i help? |
Hi @d-yacenko Thanks for getting in touch. You'll realise from the above conversation that @mds99 has a very similar requirement to the one you've addressed with your PR in #1270. If we can work on your PR and sort out a few things we can hopefully get both of these closed together. Can we resume the conversation in #1270? I'll add some comments there. |
I'll re-open this temporarily until I'm sure we've fixed this issue for @mds99 |
'devel' works for me, thanks! |
That's great - I'll close this then. The code will be formally released with XRDP v0.9.15. |
Hello.
i'm running xrdp 0.9.6 on linux.
i'm trying to start not a default wm, but pass an alternative shell as a parameter.
if i send just a script name, it runs ok from the sesman.
if i setup to pass the program with parameters, a default WM starts and i see something like this:
[20201002-01:18:03] [CORE ] error starting program /opt/launch/startup "Chrome" for user kioskmin - pid 12833
where /opt/launch/startup is my script, "Chrome" is a parameter and kioskmin - userid i started the session with.
i've found this error message in sessman/session.c:
And i also found the error with strace:
Looks like second parameter for execve is passed as is, and there's no support for the additional paramenters to pass.
Is it possible to prepare the second parameter as execve() expecting for *argv?
I did my best to look at session.c to understand if there's a way to pass paramenters string better, with no success.
The text was updated successfully, but these errors were encountered: