Hi all,
I've managed to fix gnome-flashback on Ubuntu 15.10+ (actually tested only
on 16.04).
Patches attached.
Summary:
1. gnome-session was crashing due to bug in gnome-session.
The solution was to disable display configuration by gnome-flashback:
gsettings set org.gnome.gnome-flashback display-config false
2. environment set by x2goruncommnd was insufficient for gnome-flashback
and upstart to work.
Following variables had to be added: XDG_CURRENT_DESKTOP and BASESESSION
3. In normal sessions Xsession is executed with parameter, new variable
XSESSION_PARAM was introduced and passed to Xsession
4. Variable DESKTOP_SESSION had to be updated to gnome-flashback-metacity
5. gnome-session now requires --disable-acceleration-check parameter
6. PATH had to be synced with /etc/environment for upstart to work
7. Initial display configuration was fixed by installing sane default in
~/.config/monitors.xml on first run
8. On the way, formatting of x2gorunner was fixed
9. New dependencies (libgles{1,2}-mesa) had to be introduced to libnx-x11-6.
control-center and probably other applications based clutter/GL, won't
work otherwise.
Big thanks to *Alberts Muktupāvels* and *Alkis Georgopoulos* (
https://mail.gnome.org/archives/gnome-flashback-list/2015-December/msg00014.html
)
Regards
On Sun, Dec 13, 2015 at 8:11 PM, Eugene San <[email protected]> wrote:
> Hi all.
> I am trying to fix gnome sessions (gnome flashback) on Ubuntu 15.10+.
>
> I started with fixing session name (flashback -> flashback-metacity) and
> disabling acceleration check (--disable-acceleration-check), but the
> sessions are still broken, they start as a black screen and crashes after
> few minutes.
>
> Logs are inconclusive.
> I guess services are failing to start and the problem is related to
> recent systemd-user-init and upstart mixture for sessions start-up.
>
> Can anyone educate me how exactly the sessions are starting in recent
> releases and where the problem might be?
>
> Thanks.
>
>
From 6596efecb5e0f8a584b095efee30254c4a8485d5 Mon Sep 17 00:00:00 2001
From: "Eugene San (eugenesan)" <[email protected]>
Date: Wed, 23 Dec 2015 19:43:51 -0500
Subject: [PATCH 1/5] x2goruncommand: fix formatting
---
x2goserver/bin/x2goruncommand | 68 +++++++++++++++++++++----------------------
1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncommand
index fa62f71..0aa4db5 100755
--- a/x2goserver/bin/x2goruncommand
+++ b/x2goserver/bin/x2goruncommand
@@ -99,33 +99,33 @@ fi
# To make the GNOME variants start up properly on Ubuntu, we have to make the following differentiations
# Ubuntu 10.10 and earlier (maverick):
-# GNOME -> gnome-session
-# (would start GNOME2)
+# GNOME -> gnome-session
+# (would start GNOME2)
# Ubuntu 11.04 (natty):
-# GNOME -> gnome-session --session=2d-gnome
-# UNITY -> gnome-session --session=2d-ubuntu
-# (GNOME3 based desktop shells)
+# GNOME -> gnome-session --session=2d-gnome
+# UNITY -> gnome-session --session=2d-ubuntu
+# (GNOME3 based desktop shells)
# Ubuntu 11.10 (oneiric) & 12.04 (precise):
-# GNOME -> gnome-session --session=gnome-fallback
-# UNITY -> gnome-session --session=ubuntu-2d
-# (GNOME3 based desktop shells)
+# GNOME -> gnome-session --session=gnome-fallback
+# UNITY -> gnome-session --session=ubuntu-2d
+# (GNOME3 based desktop shells)
# Ubuntu 12.10 (quantal):
-# GNOME -> gnome-session --session=gnome-fallback
-# UNITY -> gnome-session --session=ubuntu
-# (GNOME3 based desktop shells)
+# GNOME -> gnome-session --session=gnome-fallback
+# UNITY -> gnome-session --session=ubuntu
+# (GNOME3 based desktop shells)
# Ubuntu 13.10 (raring) and later:
-# GNOME -> gnome-session --session=gnome-flashback
-# UNITY -> gnome-session --session=ubuntu
-# (GNOME3 based desktop shells)
-# Additionally, $GTK_MODULES must include "unity-gtk-module".
-# $GTK_MODULES does not need tha value for any other distro
-# or any earlier release of Ubuntu.
+# GNOME -> gnome-session --session=gnome-flashback
+# UNITY -> gnome-session --session=ubuntu
+# (GNOME3 based desktop shells)
+# Additionally, $GTK_MODULES must include "unity-gtk-module"
+# $GTK_MODULES does not need that value for any other distro
+# or any earlier release of Ubuntu.
#
-# The logic for launching GNOME should be generic enough
-# to work with every other distro.
+# The logic for launching GNOME should be generic enough
+# to work with every other distro.
#
-# Also, it appears that some Linux GNOME2 distros need DESKTOP_SESSION="gnome"
-# while others do not.
+# Also, it appears that some Linux GNOME2 distros need DESKTOP_SESSION="gnome"
+# while others do not.
if [ "$cmd" == "GNOME" ] || [ "$cmd" == "gnome-session" ]; then
cmd="/usr/bin/gnome-session"
@@ -137,20 +137,20 @@ if [ "$cmd" == "GNOME" ] || [ "$cmd" == "gnome-session" ]; then
export GTK_MODULES="$GTK_MODULES:unity-gtk-module"
fi
args=" --session=$DESKTOP_SESSION"
- elif [ -e /usr/share/gnome-session/sessions/gnome-flashback.session ]; then
- export DESKTOP_SESSION="gnome-flashback"
- args=" --session=$DESKTOP_SESSION"
- elif [ -e /usr/share/gnome-session/sessions/gnome-fallback.session ]; then
- export DESKTOP_SESSION="gnome-fallback"
- args=" --session=$DESKTOP_SESSION"
- elif [ -e /usr/share/gnome-session/sessions/2d-gnome.session ]; then
- export DESKTOP_SESSION="2d-gnome"
- args=" --session=$DESKTOP_SESSION"
- elif [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE <= 10.10" | bc)" == "1" ]; then
- export DESKTOP_SESSION="gnome"
+ elif [ -e /usr/share/gnome-session/sessions/gnome-flashback.session ]; then
+ export DESKTOP_SESSION="gnome-flashback"
+ args="--session=$DESKTOP_SESSION"
+ elif [ -e /usr/share/gnome-session/sessions/gnome-fallback.session ]; then
+ export DESKTOP_SESSION="gnome-fallback"
+ args=" --session=$DESKTOP_SESSION"
+ elif [ -e /usr/share/gnome-session/sessions/2d-gnome.session ]; then
+ export DESKTOP_SESSION="2d-gnome"
+ args=" --session=$DESKTOP_SESSION"
+ elif [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE <= 10.10" | bc)" == "1" ]; then
+ export DESKTOP_SESSION="gnome"
elif cat /etc/debian_version | egrep "^(squeeze|6\.).*" >/dev/null; then
- export DESKTOP_SESSION="gnome"
- fi
+ export DESKTOP_SESSION="gnome"
+ fi
elif ([ "$cmd" == "UNITY" ] || [ "$cmd" == "unity" ]); then
cmd="/usr/bin/gnome-session"
--
2.6.4
From 3729524beaff007d7589a717a66ad92e08627a59 Mon Sep 17 00:00:00 2001
From: "Eugene San (eugenesan)" <[email protected]>
Date: Wed, 23 Dec 2015 19:44:37 -0500
Subject: [PATCH 2/5] x2goruncommand: fix initial monitor configuration
---
debian/x2goserver.install | 1 +
x2goserver/bin/x2goruncommand | 6 ++++++
x2goserver/etc/monitors.xml | 19 +++++++++++++++++++
3 files changed, 26 insertions(+)
create mode 100644 x2goserver/etc/monitors.xml
diff --git a/debian/x2goserver.install b/debian/x2goserver.install
index 557d001..f05a005 100644
--- a/debian/x2goserver.install
+++ b/debian/x2goserver.install
@@ -3,6 +3,7 @@ x2goserver/sbin/x2go* /usr/sbin/
x2goserver/lib/x2go* /usr/lib/x2go/
x2goserver/etc/x2go_logout* /etc/x2go/
x2goserver/etc/x2goagent.options /etc/x2go/
+x2goserver/etc/monitors.xml /etc/x2go/
x2goserver/etc/sudoers.d/x2goserver /etc/sudoers.d/
x2goserver/etc/logcheck/ignore.d.server/x2goserver /etc/logcheck/ignore.d.server/
x2goserver/VERSION.x2goserver /usr/share/x2go/versions/
diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncommand
index 0aa4db5..64241b7 100755
--- a/x2goserver/bin/x2goruncommand
+++ b/x2goserver/bin/x2goruncommand
@@ -127,6 +127,12 @@ fi
# Also, it appears that some Linux GNOME2 distros need DESKTOP_SESSION="gnome"
# while others do not.
+# Workaround initial display configuration
+if [ ! -f ~/.config/monitors.xml ]; then
+ mkdir -p ~/.config
+ cp /etc/x2go/monitors.xml ~/.config/
+fi
+
if [ "$cmd" == "GNOME" ] || [ "$cmd" == "gnome-session" ]; then
cmd="/usr/bin/gnome-session"
if [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE >= 13.10" | bc)" == "1" ]; then
diff --git a/x2goserver/etc/monitors.xml b/x2goserver/etc/monitors.xml
new file mode 100644
index 0000000..1e225dc
--- /dev/null
+++ b/x2goserver/etc/monitors.xml
@@ -0,0 +1,19 @@
+<monitors version="1">
+ <configuration>
+ <clone>no</clone>
+ <output name="default">
+ <vendor>???</vendor>
+ <product>0x0000</product>
+ <serial>0x00000000</serial>
+ <width>1024</width>
+ <height>768</height>
+ <rate>60</rate>
+ <x>0</x>
+ <y>0</y>
+ <rotation>normal</rotation>
+ <reflect_x>no</reflect_x>
+ <reflect_y>no</reflect_y>
+ <primary>yes</primary>
+ </output>
+ </configuration>
+</monitors>
--
2.6.4
From b5c4d2d445f3e7ba671ed8a9d7523699832920cf Mon Sep 17 00:00:00 2001
From: "Eugene San (eugenesan)" <[email protected]>
Date: Wed, 23 Dec 2015 20:05:54 -0500
Subject: [PATCH 3/5] x2goruncommand: set normal PATH
---
x2goserver/bin/x2goruncommand | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncommand
index 64241b7..fa542d6 100755
--- a/x2goserver/bin/x2goruncommand
+++ b/x2goserver/bin/x2goruncommand
@@ -133,6 +133,12 @@ if [ ! -f ~/.config/monitors.xml ]; then
cp /etc/x2go/monitors.xml ~/.config/
fi
+# Set path as for interactive sessions
+# upstart daemon can't be found found without it
+# and who knows what else might be broken otherwise
+eval `cat /etc/environment`
+export PATH
+
if [ "$cmd" == "GNOME" ] || [ "$cmd" == "gnome-session" ]; then
cmd="/usr/bin/gnome-session"
if [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE >= 13.10" | bc)" == "1" ]; then
--
2.6.4
From 1e32de2514c6d6c6b2d5817daed235a1dfd0cacc Mon Sep 17 00:00:00 2001
From: "Eugene San (eugenesan)" <[email protected]>
Date: Wed, 23 Dec 2015 20:07:08 -0500
Subject: [PATCH 4/5] x2goruncommand: add support for gnome-flashback on ubuntu
15.10+
---
x2goserver/bin/x2goruncommand | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncommand
index fa542d6..a5abc22 100755
--- a/x2goserver/bin/x2goruncommand
+++ b/x2goserver/bin/x2goruncommand
@@ -120,6 +120,11 @@ fi
# Additionally, $GTK_MODULES must include "unity-gtk-module"
# $GTK_MODULES does not need that value for any other distro
# or any earlier release of Ubuntu.
+# Ubuntu 15.10 (utopic) and later:
+# GNOME -> gnome-session --session=gnome-flashback-metacity --disable-acceleration-check
+# UNITY -> gnome-session --session=ubuntu
+# (GNOME3 based desktop shells)
+# Since 15.10 no need to deal with $GTK_MODULES as it is set automatically by Xsession
#
# The logic for launching GNOME should be generic enough
# to work with every other distro.
@@ -141,7 +146,17 @@ export PATH
if [ "$cmd" == "GNOME" ] || [ "$cmd" == "gnome-session" ]; then
cmd="/usr/bin/gnome-session"
- if [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE >= 13.10" | bc)" == "1" ]; then
+ if [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE >= 15.10" | bc)" == "1" ]; then
+ export DESKTOP_SESSION="gnome-flashback-metacity"
+ export XDG_CURRENT_DESKTOP="GNOME-Flashback:Unity"
+ export BASESESSION="gnome-flashback-metacity"
+ export XSESSION_PARAM="/usr/lib/gnome-flashback/gnome-flashback-metacity"
+
+ # Fix session crash with recent gnome-session
+ gsettings set org.gnome.gnome-flashback display-config false
+
+ args=" --session=$DESKTOP_SESSION --disable-acceleration-check"
+ elif [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE >= 13.10" | bc)" == "1" ]; then
export DESKTOP_SESSION="gnome-flashback"
if [ -z "$GTK_MODULES" ] ; then
export GTK_MODULES="unity-gtk-module"
@@ -311,7 +326,7 @@ if [ "$EXEC" != "" ] && [ -x "$EXEC" ]; then
if x2gofeature X2GO_XSESSION &>/dev/null && [ "x$X2GO_SESS_TYPE" = "xD" ]; then
STARTUP="$cmd$args"
"$X2GO_LIB_PATH/x2gosyslog" "$0" "notice" "launching session with Xsession-x2go mechanism, using STARTUP=\"$STARTUP\""
- XSESSION_EXEC="$cmd" STARTUP="/usr/bin/env LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ${STARTUP}" /etc/x2go/Xsession
+ XSESSION_EXEC="$cmd" STARTUP="/usr/bin/env LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ${STARTUP}" /etc/x2go/Xsession "${XSESSION_PARAM}"
else
"$X2GO_LIB_PATH/x2gosyslog" "$0" "debug" "executing command \"$cmd$args\"..."
--
2.6.4
From 7749cf2d9b624ce8bebb382fcf0d0521ddf6f3e0 Mon Sep 17 00:00:00 2001
From: "Eugene San (eugenesan)" <[email protected]>
Date: Wed, 23 Dec 2015 20:07:50 -0500
Subject: [PATCH 5/5] x2goruncommand: add support for unity on ubuntu 15.10+
(might work in future)
---
x2goserver/bin/x2goruncommand | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncommand
index a5abc22..d482bbc 100755
--- a/x2goserver/bin/x2goruncommand
+++ b/x2goserver/bin/x2goruncommand
@@ -181,7 +181,14 @@ if [ "$cmd" == "GNOME" ] || [ "$cmd" == "gnome-session" ]; then
elif ([ "$cmd" == "UNITY" ] || [ "$cmd" == "unity" ]); then
cmd="/usr/bin/gnome-session"
- if [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE >= 12.10" | bc)" == "1" ]; then
+ if [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE >= 15.10" | bc)" == "1" ]; then
+ export DESKTOP_SESSION="ubuntu"
+ export XDG_CURRENT_DESKTOP="Unity"
+ export BASESESSION="gnome-session"
+ export XSESSION_PARAM="gnome-session --session=ubuntu"
+
+ args=" --session=$DESKTOP_SESSION --disable-acceleration-check"
+ elif [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE >= 12.10" | bc)" == "1" ]; then
export DESKTOP_SESSION="ubuntu"
args=" --session=$DESKTOP_SESSION"
elif [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE == 11.10" | bc)" == "1" -o "$(echo "$DISTRIB_RELEASE == 12.04" | bc)" == "1" ]; then
--
2.6.4
From f161b5080ed73ec75ab63c6aa52ceb908f8c9b81 Mon Sep 17 00:00:00 2001
From: "Eugene San (eugenesan)" <[email protected]>
Date: Wed, 23 Dec 2015 21:01:56 -0500
Subject: [PATCH] libnx-x11-6: Add libgles{1,2}-mesa to depends to fix
clutter/GL related apps
---
debian/control | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/control b/debian/control
index 35d3b1f..3c4e18a 100644
--- a/debian/control
+++ b/debian/control
@@ -84,7 +84,7 @@ Pre-Depends:
Depends:
${shlibs:Depends},
${misc:Depends},
- nx-x11-common (>= ${source:Version}), nx-x11-common (<< ${source:Version}.1),
+ nx-x11-common (>= ${source:Version}), nx-x11-common (<< ${source:Version}.1), libgles1-mesa, libgles2-mesa
Breaks: nxlibs (<= 3.5.1),
libnx-x11 (<< 2:3.5.0.29-0x2go2~),
Replaces: nxlibs,
--
2.6.4
_______________________________________________
x2go-dev mailing list
[email protected]
http://lists.x2go.org/listinfo/x2go-dev