From hrvoje.habjanic@zg.ht.hr  Tue Mar 10 16:30:24 2015
Received: (at submit) by bugs.x2go.org; 10 Mar 2015 15:30:25 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=ham
	version=3.3.2
Received: from ls405.t-com.hr (ls405.t-com.hr [195.29.150.135])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id BA2865E15C
	for <submit@bugs.x2go.org>; Tue, 10 Mar 2015 16:30:23 +0100 (CET)
Received: from ls265.t-com.hr (ls265.t-com.hr [195.29.150.93])
	by ls405.t-com.hr (Postfix) with ESMTP id 7807869898F
	for <submit@bugs.x2go.org>; Tue, 10 Mar 2015 16:30:23 +0100 (CET)
Received: from ls265.t-com.hr (localhost.localdomain [127.0.0.1])
	by ls265.t-com.hr (Qmlai) with ESMTP id 7636D2110267
	for <submit@bugs.x2go.org>; Tue, 10 Mar 2015 16:30:23 +0100 (CET)
X-Envelope-Sender: hrvoje.habjanic@zg.ht.hr
Received: from habi.t-com.hr (habi.t-com.hr [195.29.148.138])
	by ls265.t-com.hr (Qmali) with ESMTP id 2680120B0238
	for <submit@bugs.x2go.org>; Tue, 10 Mar 2015 16:30:23 +0100 (CET)
Received: from [192.168.11.10] (unknown [192.168.11.10])
	by habi.t-com.hr (Postfix) with ESMTP id 8C1AC60F13
	for <submit@bugs.x2go.org>; Tue, 10 Mar 2015 16:30:22 +0100 (CET)
Message-ID: <54FF0E0E.8080004@zg.ht.hr>
Date: Tue, 10 Mar 2015 16:30:22 +0100
From: =?UTF-8?B?SHJ2b2plIEhhYmphbmnEhw==?= <hrvoje.habjanic@zg.ht.hr>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
MIME-Version: 1.0
To: submit@bugs.x2go.org
Subject: Properly starting xubuntu (and others) session in Ubuntu
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-TM-AS-Product-Ver: IMSS-7.1.0.1224-7.5.0.1018-21390.000
X-TM-AS-Result: No--7.898-10.0-31-1
X-imss-scan-details: No--7.898-10.0-31-1
X-TM-AS-User-Approved-Sender: No

Package: x2goserver-xsession
Version: 4.0.1.19-0~1062~ubuntu14.04.1

Hi.

It seems that ubuntu requires some additional stuff to be started,
to successfully fork X virtual session. The most notable is calling
of init script with "--user" argument.

Scripts used by /etc/X11/Xsession do most of the stuff ok, and are
used by GUI launchers (ie. lightdm). Unfortunately, it requires
some additional environment variables to work properly.

In most cases, it seems that DESKTOP_SESSION is the most important
one. Following does script properly starts xubuntu session, and is the
same as started from lightdm:

-------[snip]-------

PATH=$PATH:/sbin
export DESKTOP_SESSION=xubuntu

exec /etc/X11/Xsession 'env XAUTHORITY=/home/'$LOGNAME'/.Xauthority /usr/bin/xfce4-session'

-------[snip]-------

It is enough to put this somewhere on OS, and set it up as script
to be started when session start via x2gosession GUI.

List of possible values in "DESKTOP_SESSION" is available in 
/etc/upstart-xsessions.

It would be nice if you could put this information somewhere on the
wiki, so other users can use it to properly start session(s).

Regards,

H.


