Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 575022 - net-misc/x2goserver: Xsession script fails when /bin/sh != bash
Summary: net-misc/x2goserver: Xsession script fails when /bin/sh != bash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL: http://code.x2go.org/gitweb?p=x2goser...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-18 09:29 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2016-02-29 13:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
x2goserver-4.0.1.19-use_bash_in_Xsession.patch (x2goserver-4.0.1.19-use_bash_in_Xsession.patch,387 bytes, patch)
2016-02-18 09:29 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-02-18 09:29:29 UTC
Created attachment 425770 [details, diff]
x2goserver-4.0.1.19-use_bash_in_Xsession.patch

If bin/sh symlink does not point to bash, starting desktop sessions with x2goclient fails. This can be seen on the server in the user's .xsession-x2go-errors file:

  /bin/sh: 1: exec: -l: not found

Which is a result of the following line in /etc/x2go/Xsession:

  exec $CK_XINIT_SESSION $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"$STARTUP\""

dash (and other shells like mksh) don't know "exec -l" and simply fail to run the startup command.
Changing the line to

  exec $CK_XINIT_SESSION $SSH_AGENT /bin/bash -c "exec -l $SHELL -c \"$STARTUP\""

fixes this problem. The attached patch does exactly that.
Comment 1 Mihai Moldovan 2016-02-18 09:31:52 UTC
I guess I'll pull this upstream as well.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-02-22 09:43:48 UTC
Upstream added the fix (see URL)
Comment 3 Bernard Cafarelli gentoo-dev 2016-02-29 13:03:31 UTC
And added in 4.0.1.19-r2 :)

Now to get updated instructions for Gentoo install on the wiki, and my x2go todo list will (almost) be empty