Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 479680 - net-misc/x2goserver does not source profile
Summary: net-misc/x2goserver does not source profile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo NX Server project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-03 23:01 UTC by Maciej S. Szmigiero
Modified: 2014-06-26 14:48 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej S. Szmigiero 2013-08-03 23:01:26 UTC
net-misc/x2goserver as installed by default does not source profile
(that is, no environment vars from /etc/env.d/ get applied).

One solution is to make it launch session using /etc/x2go/Xsession script, which does source profile, by doing:
1) chmod a+x /etc/x2go/Xsession

2) create /etc/x2go/Xsession.d/99x2go-launch with contents:
#!/bin/bash
test -z "${X2GO_SESSION}" -o -z "${STARTUP}" && exit 0
${STARTUP}

3) chmod a+x /etc/x2go/Xsession.d/99x2go-launch


Reproducible: Always
Comment 1 Maciej S. Szmigiero 2013-10-16 12:06:46 UTC
Also, it would be nice to load X resources (like xorg's Xsession script does),
for example for xterm settings.

x2go's Xsession script does not do it
(it only sets their location into env variables).

Steps to make x2go do it:
1) create /etc/x2go/Xsession.d/19xrdb with contents:
#!/bin/bash                                                                                                                                                                                          
                                                                                                                                                                                                     
if [ -f "$SYSRESOURCES" ]; then                                                                                                                                                                      
        xrdb -merge "$SYSRESOURCES"                                                                                                                                                                  
fi                                                                                                                                                                                                   
                                                                                                                                                                                                     
if [ -f "$USRRESOURCES" ]; then                                                                                                                                                                      
        xrdb -merge "$USRRESOURCES"                                                                                                                                                                  
fi                                                                                                                                                                                                   

2) chmod a+x /etc/x2go/Xsession.d/19xrdb
Comment 2 Bernard Cafarelli gentoo-dev 2013-11-27 12:54:36 UTC
Thanks for research! I'll take a look at this
Comment 3 Bernd Feige 2013-12-06 14:16:13 UTC
I stumbled across this because in net-misc/x2goserver-4.0.1.8 (in contrast to previous versions, eg 4.0.1.6-r1!) /etc/x2go/Xsession is installed with executable flag set. Together with the non-functional symlink or whatever is left from previous installations in /etc/x2go/Xsession.d, this causes an x2go session to be immediately terminated without any further message.

There are two possibilities:
- Install /etc/x2go/Xsession with executable flags unset
or (which I'd prefer)
- Install a functional /etc/x2go/Xsession.d directory with at least the script in Comment #1 in it.

Thanks and best regards,
Bernd
Comment 4 Maciej S. Szmigiero 2014-01-10 18:06:08 UTC
I would recommend installing a functional /etc/x2go/Xsession.d/ directory so env vars from env.d (like LANG) are available inside x2go session.

Loading X resources (xterm still uses them for settings) would also be nice.

Thanks for looking at this.
Comment 5 Stefan Radermacher 2014-06-11 14:28:14 UTC
I believe I have found the cause for this. See bug 512970
Comment 6 Maciej S. Szmigiero 2014-06-13 22:01:07 UTC
(In reply to Stefan Radermacher from comment #5)
> I believe I have found the cause for this. See bug 512970

This was a different issue, which seems to be fixed now as of net-misc/x2goserver-4.0.1.15.
Comment 7 Bernard Cafarelli gentoo-dev 2014-06-26 14:48:59 UTC
Hmm and I was sure I added a comment on this bug when I added 4.0.1.15 in tree...

Anyway, thanks for confirming my silent query on this one, marking fixed with the latest version