Subject: Cinnamon 1.4: Failed to load session "cinnamon2d"

From: Michael DePaulo <[email-masked]>
Date: Thu, 14 Aug 2014 09:48:33 -0400

Package: x2goserver
Version: 4.1.0.0-nightly

When I attempt to launch "session type" "custom desktop" "CINNAMON", I
get this error dialog:
Failed to load session "Cinnamon2d"
http://imgur.com/VQ0A1si

I emailed bug report 150 a bunch of details about Cinnamon 1.4 and my
test setup, but those details are not showing up on bug report 150. So
I am copying them (and made minor updates) below:

Clearly the problem is that x2goruncommand has incorrect logic for
launching this version of Cinnamon, 1.4.

Remember that this version of CInnamon, on this version of Linux
Mint, is supported through April 2017.

Version 1.4 is probably used on other distros too.

----

I have the GLX extension enabled on my test system
(/etc/x2go/x2goagent.options has the line to disable GLX commented out)
- Linux mint 13 maya (based on Ubuntu 12.04 precise) 64-bit
- All latest level 1, 2 and 3 OS updates installed.
- cinnamon version: 1.4-UP3
- Cusstom Desktop specified in x2goclient: gnome-session-cinnamon
- x2goserver & x2goserver-xsession: 4.1.0.0-0~1054~ubuntu12.04.1
- nxagent & x2goagent: 2:3.5.0.28-0~448~ubuntu12.04.1

Note the following session files::
batmin@mint-m /usr/share/gnome-session/sessions $ ls
cinnamon.session  gnome-classic.session  gnome-fallback.session

batmin@mint-m /usr/share/gnome-session/sessions $ cat cinnamon.session
[GNOME Session]
Name=Cinnamon
RequiredComponents=cinnamon;gnome-settings-daemon;
IsRunnableHelper=/usr/lib/gnome-session/gnome-session-check-accelerated
FallbackSession=gnome-fallback
DesktopName=GNOME

batmin@mint-m /usr/share/xsessions $ ls
cinnamon.desktop  gnome-classic.desktop  gnome-fallback.desktop  ssh.desktop

batmin@mint-m /usr/share/xsessions $ cat cinnamon.desktop
[Desktop Entry]
Name=Cinnamon
Comment=This session logs you into Cinnamon
Exec=gnome-session-cinnamon
TryExec=/usr/bin/cinnamon
Icon=
Type=Application
X-Ubuntu-Gettext-Domain=cinnamon

batmin@mint-m /usr/share/xsessions $ cat /usr/bin/gnome-session-cinnamon
#! /bin/sh
exec gnome-session --session cinnamon "$@"

---

From: Mike Gabriel <[email-masked]>
Date: Fri, 15 Aug 2014 09:18:43 +0000

Hi Mike#2

> Version 1.4 is probably used on other distros too.

Can you provide a patch for x2goruncommand? Probably for x2goserver on  
release/4.0.1.x branch?

Mike
-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: [email-masked], http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb

---

From: Michael DePaulo <[email-masked]>
Date: Fri, 15 Aug 2014 08:46:38 -0400

> Can you provide a patch for x2goruncommand? Probably for x2goserver on
[...]

Yes, I plan to do so.

1st, I've been brainstorming what logic to implement for different
versions of Cinnamon. For example, do I run apt or yum commands to
check what version is installed? There are other packaging systems
too.

I think what is best is to run the 2D cinnamon session scripts in
order from newest to latest, if they exist. This will be a simple
script I can write quickly.

2.0 & 2.2: cinnamon-session-cinnamon2d
1.6 & 1.8: gnome-session-cinnamon2d
1.4: gnome-session-cinnamon

I determined the versions' commands by browsing the .deb contents under here:
http://packages.linuxmint.com/pool/main/c/cinnamon/

Do I still need to export DESKTOP_SESSION before calling the scripts?
Those scripts do not export it, but x2goruncommand exports it before
calling gnome-session.

-Mike#2

---

From: Michael DePaulo <[email-masked]>
Date: Fri, 15 Aug 2014 08:48:59 -0400

[...]
> script I can write quickly.

Correction: in order from newest to oldest