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) <polynomial-c>
Component: Current packagesAssignee: Bernard Cafarelli <voyageur>
Severity: normal CC: burcheri.massimo+bugs-gentoo, ionic
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: x2goserver-

Description Lars Wendler (Polynomial-C) gentoo-dev 2016-02-18 09:29:29 UTC
Created attachment 425770 [details, diff]

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) 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 :)

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