DESKTOP_SESSION set improperly for GNOME Flashback (Metacity)

Bug #1798378 reported by Michael Crider
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LTSP5
Won't Fix
Undecided
Unassigned

Bug Description

On fat clients, LDM_SESSION is currently set to the Exec line of the chosen session when X50-generate-env starts (whether passed from the session menu in LDM_SELECTED_SESSION or translated and stored in LDM_SESSION). That worked for GNOME Flashback (Compiz) and GNOME Flashback (Metacity) in GNOME 3.18 in Ubuntu 16.04, but in GNOME 3.28 in Ubuntu 18.04 they both have the same Exec line. According to https://mail.gnome.org/archives/gnome-flashback-list/2018-October/msg00003.html gnome-session.service file uses $DESKTOP_SESSION env to decide which session to start. However, this process is leading to an empty DESKTOP_SESSION when LDM_FORCE_SESSION, .dmrc or LDM_SESSION are set to gnome-flashback-metacity, or when GNOME Flashback (Metacity) is chosen from the session menu. With DESKTOP_SESSION empty, flashback defaults to compiz. When you start your server with Ubuntu MATE, installing gnome-session-flashback pulls in compiz, so you get compiz every time. When you start your server with standard Ubuntu, installing gnome-session-flashback does not pull in compiz, so you get returned to the login screen after a short black screen and spinning cursor. Manually setting DESKTOP_SESSION to gnome-session-metacity works around this, but makes it impossible to select any other session. For future compatibility, it appears it would be better for LDM_SESSION to keep the name of the session file.

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

What is the output of sudo ltsp-info?

Changed in ltsp:
status: New → Incomplete
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Additionally to the output of `sudo ltsp-info`, please also provide the output of the following commands:
ls -l /etc/alternatives/x-session-manager
egrep -R '^Exec=|^DesktopNames=' /usr/share/xsessions/

Revision history for this message
Michael Crider (mecrider) wrote :

This is from a server that started with standard Ubuntu desktop (not MATE).

sudo ltsp-info:
server information:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

server packages:
ii ldm 2:2.18.06-1+t201807230407~u
ii ldm-server 2:2.18.06-1+t201807230407~u
un ldm-themes <none>
ii ldm-ubuntu-theme 2:2.0.47
un ldm-ubuntu-themes <none>
ii ltsp-client 5.18.04+t201809080524~ubunt
ii ltsp-client-core 5.18.04+t201809080524~ubunt
ii ltsp-docs 1.2-1
ii ltsp-server 5.18.04+t201809080524~ubunt
ii ltsp-server-standalone 5.18.04+t201809080524~ubunt
un ltsp-utils <none>
ii ltspfs 1.5-2+t201807160629~ubuntu1
ii ltspfsd 1.5-2+t201807160629~ubuntu1
ii ltspfsd-core 1.5-2+t201807160629~ubuntu1

found image: /opt/ltsp/images/amd64.img

ls -l /etc/alternatives/x-session-manager:
lrwxrwxrwx 1 root root 22 Oct 14 19:18 /etc/alternatives/x-session-manager -> /usr/bin/gnome-session

egrep -R '^Exec=|^DesktopNames=' /usr/share/xsessions/:
/usr/share/xsessions/ubuntu.desktop:Exec=env GNOME_SHELL_SESSION_MODE=ubuntu gnome-session --session=ubuntu
/usr/share/xsessions/ubuntu.desktop:DesktopNames=ubuntu:GNOME
/usr/share/xsessions/ubuntu-communitheme-snap.desktop:Exec=env GNOME_SHELL_SESSION_MODE=ubuntu-communitheme /snap/communitheme/current/session
/usr/share/xsessions/ubuntu-communitheme-snap.desktop:DesktopNames=communitheme:ubuntu:GNOME
/usr/share/xsessions/gnome-flashback-metacity.desktop:Exec=/usr/lib/gnome-session/run-systemd-session gnome-session-flashback.target
/usr/share/xsessions/gnome-flashback-metacity.desktop:DesktopNames=GNOME-Flashback;GNOME;
/usr/share/xsessions/gnome-flashback-compiz.desktop:Exec=/usr/lib/gnome-session/run-systemd-session gnome-session-flashback.target
/usr/share/xsessions/gnome-flashback-compiz.desktop:DesktopNames=GNOME-Flashback;GNOME;

If you would like to see the same information from a server that started with a MATE install, I can switch back fairly easily (it's 2 different iSCSI LUNS for the same virtual machine - switch disks and reboot).

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

I installed flashback and tested. The problem isn't that DESKTOP_SESSION is empty; it's set to "gnome-flashback-compiz", and it fails because compiz isn't installed.

The flow is:
 1. ldm asks ldminfod
 2. the user selects a session
 3. ldm sets LDM_SESSION="/usr/lib/gnome-session/run-systemd-session gnome-session-flashback.target"
 4. X50-generate-env doesn't have the file name and tries to reverse-find it using the LDM_SESSION variable. Since two files match (gnome-flashback-compiz and gnome-flashback-metacity), it correctly chooses the first one.

So the actual problem is the communication between ldm and X50-generate-env. LDM should also pass the file name to the environment.

As a workaround, if compiz isn't installed, just put this in lts.conf:
INIT_COMMAND_RM_FLASHBACK_COMPIZ="rm -f /usr/share/xsessions/gnome-flashback-compiz.desktop"

Changed in ltsp:
status: Incomplete → Triaged
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Closing old LTSP bugs as they're no longer relevant after LTSP has been rewritten from scratch.

Changed in ltsp:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.