Bug 611669
Summary: | xrdp: execute startwm.sh under a login shell | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Bojan Smojver <bojan> | ||||||
Component: | xrdp | Assignee: | Itamar Reis Peixoto <itamar> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 17 | CC: | itamar, kirbyzhou, mads, william.ab.overstreet | ||||||
Target Milestone: | --- | Keywords: | Patch, Reopened | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | xrdp-0.5.0-0.11.03172010.fc14 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2012-06-17 00:00:22 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Bojan Smojver
2010-07-06 05:32:51 UTC
Simpler fix: diff -u /etc/xrdp/startwm.sh.o /etc/xrdp/startwm.sh --- /etc/xrdp/startwm.sh.o 2009-09-17 05:39:53.000000000 +1000 +++ /etc/xrdp/startwm.sh 2010-07-06 16:50:45.926245031 +1000 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash -l # change the order in line below to run to run whatever window manager you # want, default to kde (In reply to comment #1) > -#!/bin/sh > +#!/bin/bash -l ok, I will apply it, thanks for the report. In fedora sh is a symlink to bash, do you know which others operating systems where sh is not bash ? Any Unix (e.g. Solaris) will generally have a non-bash default shell. At least that's how I remember it :-) xrdp-0.5.0-0.10.03172010.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/xrdp-0.5.0-0.10.03172010.fc12 xrdp-0.5.0-0.10.03172010.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/xrdp-0.5.0-0.10.03172010.fc13 Invoking /bin/sh -l instead of /bin/bash -l will produce a slightly different result. Instead of calling ~/.bash_profile, ~/.profile will be called. Most people will likely have ~/.bash_profile in their home directories on Fedora (because that would have gotten copied from /etc/skel on account setup). ~/.bash_profile calls /etc/bashrc, which also does some setup (such as umask). xrdp-0.5.0-0.10.03172010.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update xrdp'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/xrdp-0.5.0-0.10.03172010.fc13 xrdp-0.5.0-0.10.03172010.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update xrdp'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/xrdp-0.5.0-0.10.03172010.fc12 Another problem about startwm.sh. With xrdp, it does start up any Input Method, such as SCIM. Maybe we should call /etc/X11/xinit/xinitrc instead of start a Window Manager by startwm.sh itself. xrdp-0.5.0-0.11.03172010.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/xrdp-0.5.0-0.11.03172010.fc14 xrdp-0.5.0-0.11.03172010.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/xrdp-0.5.0-0.11.03172010.fc13 xrdp-0.5.0-0.11.03172010.fc13.1 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/xrdp-0.5.0-0.11.03172010.fc13.1 (In reply to comment #9) > Another problem about startwm.sh. > With xrdp, it does start up any Input Method, such as SCIM. > Maybe we should call /etc/X11/xinit/xinitrc instead of start a Window Manager > by startwm.sh itself. what do you think about putting this #!/bin/sh . /etc/X11/xinit/xinitrc in startwm.sh ? I think you should call call profile and something misc before xinitrc. xrdp-0.5.0-0.10.03172010.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report. xrdp-0.5.0-0.11.03172010.fc13.1 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. xrdp-0.5.0-0.11.03172010.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. Again a problem in F-14 with the latest update. Path is incorrect inside xrdp session, because startwm.sh is not run under a login shell. The file /etc/X11/xinit/xinitrc is found when xorg-x11-xinit is installed (which will mostly be the case, because without this gdm cannot be there). You need to execute that pre_start function before calling xinitrc, otherwise the environment doesn't get set up right. (In reply to comment #18) > You need to execute that pre_start function before calling xinitrc, otherwise > the environment doesn't get set up right. Actually, that doesn't work either. Digging... (In reply to comment #19) > Actually, that doesn't work either. Digging... Changing the shell to login shell does (i.e. what I did in comment #1). I get correct paths set up once again. Created attachment 469292 [details]
Have correct environment, even when using xinitrc
(In reply to comment #19) > Actually, that doesn't work either. Digging... That would be because I'm an idiot. Functions need to be defined before they are used in shell. See the patch. Moving this to F-15. Any chance we see this patched up? yes, I will do it. Still a problem in F-16. Moving to that. It's a pam configuration issue. sesman has it's own pam configuration. It's not set up to read the environment on login, as it's not required per the configuration. At some point in the sesman pam configuration, `pam_env.so` needs to be 'required'. Probably as part of session or auth. Moving to F-17. Will attach a patch that would fix this trivially in the xrdp.spec file. Created attachment 586502 [details]
Have correct environment, even when using xinitrc
Instead of changing startwm.sh, we can simply execute it form another, bash specific script, with environment already set. This would be Fedora specific, so no need to push anything upstream, where bash may not be available etc.
xrdp-0.6.0-0.5.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/xrdp-0.6.0-0.5.fc17 Package xrdp-0.6.0-0.5.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing xrdp-0.6.0-0.5.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-8538/xrdp-0.6.0-0.5.fc17 then log in and leave karma (feedback). xrdp-0.6.0-0.5.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. |