Bug 1038834
Summary: | /etc/x2go/Xsession script broken | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Reilly Hall <sly.midnight> | ||||||
Component: | x2goserver | Assignee: | Orion Poplawski <orion> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 20 | CC: | orion | ||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | x2goserver-4.0.1.13-2.fc19 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2014-02-07 03:12:53 UTC | Type: | Bug | ||||||
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
Reilly Hall
2013-12-05 23:00:41 UTC
Proposing some changes I found ultimately worked for me but am unsure if they are portable to other users with other desktop environment choices other than KDE and shells different than zsh. The diff from my modified Xsession file as compared to the original: diff Xsession Xsession.ori 51a52,59 > # Load profile > for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do > if [ -f "$file" ]; then > echo "Loading profile from $file"; > . "$file" > fi > done > 81,90d88 < # Load profile < set +e < for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile" "/etc/zprofile"; do < if [ -f "$file" ]; then < echo "Loading profile from $file"; < . "$file" < fi < done < set -e < 103,108c101,106 < #WRITE_TEST=$(tempfile) < #if ! echo "*" >>"$WRITE_TEST"; then < # message "warning: unable to write to ${WRITE_TEST%/*}; X session (X2Go) may" \ < # "exit with an error" < #fi < #rm -f "$WRITE_TEST" --- > WRITE_TEST=$(tempfile) > if ! echo "*" >>"$WRITE_TEST"; then > message "warning: unable to write to ${WRITE_TEST%/*}; X session (X2Go) may" \ > "exit with an error" > fi > rm -f "$WRITE_TEST" 116c114 < #SYSSESSIONDIR=/etc/x2go/Xsession.d --- > SYSSESSIONDIR=/etc/x2go/Xsession.d 118c116 < #SESSIONFILES=$(run-parts --list $SYSSESSIONDIR) --- > SESSIONFILES=$(run-parts --list $SYSSESSIONDIR) 131,135c129 < # Explicitly call startup command rather than exit with an error. < exec $STARTUP < < # Unsure why but cannot exit with zero status or session never starts. < #exit 1 --- > exit 0 Created attachment 833776 [details]
Proposed Xsession file
Here is my full Xsession file as I have modified it from the original to allow it to work more or less correctly with KDE and zsh.
Can you first try https://admin.fedoraproject.org/updates/FEDORA-2013-22479/x2goserver-4.0.1.9-1.fc19 and see if that helps. That should at least remove the $(tempfile) problem. Ok, the Xsession script behaves just as it did when I commented out the original line 101 using the $(tempfile) command. It completes and the session never opens with the client stating "finished". If I modify the last exit 0 to an exit 1 (exit by itself also doesn't work) then the KDE session starts. But again the environment variables sourced by Xsessions sourcing of /etc/profile are somehow lost. Okay, looks like whole Xsession stuff is just way too Debian specific. I've ripped it out and we'll see how that goes. x2goserver-4.0.1.9-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/FEDORA-2013-22479/x2goserver-4.0.1.9-2.fc19 Would you like me to try x2goserver-4.0.1.9-2? I took the liberty to try x2goserver04.0.1.9-2 and while the session does start up now, of course there is no /etc/profile|/etc/zprofile information present in my environment. So for the time being I've reverted back to the stock version and copied back my proposed version of Xsession that at least does work for me. I will keep an eye out for the next version to test. Thanks! Created attachment 834084 [details]
New proposed Xsession file
I decided to update my Xsession with the changes you proposed and uncommented out all the logic to deal with no free space using the mktemp command rather than tempfile. Am uploading my new proposed changes to Xsession.
Package x2goserver-4.0.1.9-2.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing x2goserver-4.0.1.9-2.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-22479/x2goserver-4.0.1.9-2.fc19 then log in and leave karma (feedback). x2goserver-4.0.1.10-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/x2goserver-4.0.1.10-1.fc19 x2goserver-4.0.1.10-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/x2goserver-4.0.1.10-1.el6 x2goserver-4.0.1.10-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/x2goserver-4.0.1.10-1.fc20 x2goserver-4.0.1.10-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. x2goserver-4.0.1.10-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. I updated to x2goserver-4.0.1.10-1.fc20 and now I am back to not having the correct environment set. I am reopening the ticket as I believe the purpose of this ticket was to address the lack of a properly setup environment for the logged in user. I have downgraded back to the prior version and copied over my custom Xsession file that mostly works for me. x2goserver-4.0.1.10-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report. Re-opened as it appears to have been closed when the EPEL6 repo got the same update as well. x2goserver-4.0.1.13-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/x2goserver-4.0.1.13-1.fc20 Package x2goserver-4.0.1.13-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing x2goserver-4.0.1.13-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-1584/x2goserver-4.0.1.13-1.fc20 then log in and leave karma (feedback). Upstream has made some changes to the xsession handling for Fedora. I've re-enabled and shipped as a sub-package also like upstream. Please test. Good afternoon, I am pleased to say I have tested the new version and while it did not work on initial testing, after reviewing the new Xsession script included I was able to make it work with a simple change around line 177 (noted the error in the user's log file). The change is simple as such: 89a90 > 177,179c178 < if [ -r $file ]; then < . $file < fi --- > . $file Thanks again for the update! With that simple change I can confirm it works. It may be preferable to use some sort of error handling so no errors incurred by other commands (in this case caused by a simple benign no files found in the directory referenced being called) causes the script to bomb and loose the environment that it was trying to pull in. Hmm, the other fix is probably: @@ -174,8 +174,8 @@ elif [ -f /etc/redhat-release ]; then unset XKB_IN_USE # run all system xinitrc shell scripts. - for file in /etc/x2go/xinit/xinitrc.d/* ; do - . $file + for file in /etc/x2go/xinitrc.d/* ; do + [ -r "$file" ] && . $file done # Prefix launch of session with ssh-agent if available and not already running. Looks like the path was wrong. Ah sorry, didn't bother to look there and see that the path was wrong, Just assumed it was a location for custom scripts of which I have none. Thanks for catching that and I prefer your shorter cleaner syntax. Comment on attachment 834084 [details]
New proposed Xsession file
Not needed anymore.
x2goserver-4.0.1.13-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/x2goserver-4.0.1.13-2.fc19 x2goserver-4.0.1.13-2.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/x2goserver-4.0.1.13-2.el6 x2goserver-4.0.1.13-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/x2goserver-4.0.1.13-2.fc20 x2goserver-4.0.1.13-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. x2goserver-4.0.1.13-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report. x2goserver-4.0.1.13-2.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. |