Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 575022

Summary: net-misc/x2goserver: Xsession script fails when /bin/sh != bash
Product: Gentoo Linux Reporter: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Component: Current packagesAssignee: Bernard Cafarelli <voyageur>
Status: RESOLVED FIXED    
Severity: normal CC: burcheri.massimo+bugs-gentoo, ionic
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://code.x2go.org/gitweb?p=x2goserver.git;a=commitdiff;h=388dfddf7c4c4c522ab40917555d3cc0c112e943;hp=a10af94e25f30c6ee90eeeadd108fd8be52ffe5f
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: x2goserver-4.0.1.19-use_bash_in_Xsession.patch

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