Not only that it looks simple, it is.
It can not start if You do not make it discard (or do not start) X and start Xwayland.
That is the reason it works only in GDM because it allows it to do that. To choose between X and Xwayland.
That is why I was trying to use it from tty1 and not from X. X is not a place it likes_to/can live. Like fish...
Code:
:~$ cat /usr/share/xsessions/gnome-flashback-metacity.desktop
[Desktop Entry]
Name=GNOME Flashback (Metacity)
Comment=This session logs you into GNOME Flashback with Metacity
Exec=/usr/lib/gnome-flashback/gnome-flashback-metacity
TryExec=metacity
Icon=
Type=Application
DesktopNames=GNOME-Flashback;Unity;
X-Ubuntu-Gettext-Domain=gnome-flashback
Code:
:~$ cat /usr/share/wayland-sessions/gnome-wayland.desktop
[Desktop Entry]
Name=GNOME on Wayland
Comment=This session logs you into GNOME, using Wayland
Exec=gnome-session --session=gnome-wayland
TryExec=gnome-session
Icon=
Type=Application
DesktopNames=GNOME
X-Ubuntu-Gettext-Domain=gnome-session-3.0
Code:
:~$ cat /usr/share/xsessions/gnome-flashback-metacity.desktop
[Desktop Entry]
Name=GNOME Flashback (Metacity)
Comment=This session logs you into GNOME Flashback with Metacity
Exec=/usr/lib/gnome-flashback/gnome-flashback-metacity
TryExec=metacity
Icon=
Type=Application
DesktopNames=GNOME-Flashback;Unity;
X-Ubuntu-Gettext-Domain=gnome-flashback
Code:
:/usr/lib$ cat /usr/share/applications/mutter-wayland.desktop
[Desktop Entry]
Type=Application
Name=Mutter (wayland compositor)
Exec=mutter --wayland --display-server
NoDisplay=true
# name of loadable control center module
X-GNOME-WMSettingsModule=metacity
# name we put on the WM spec check window
X-GNOME-WMName=Mutter
# back compat only
X-GnomeWMSettingsLibrary=metacity
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=mutter
X-GNOME-Bugzilla-Component=general
X-GNOME-Autostart-Phase=WindowManager
X-GNOME-Provides=windowmanager
X-GNOME-Autostart-Notify=true
X-Ubuntu-Gettext-Domain=mutter
If I gain some spare time I will try to use mutter to compose appropriate .desktop file but the above gives (as I beleive) enough stuff to do that.
Update₁: Just to note that #8 does not work if You're using UpStart. It depends on SystemD. To clarify: GDM is not a factor in this since I did disable and stop it in SystemD to check that. Note: GDM will start due to SystemD even though it is disabled (as a service), even with „text“ boot-line option or „systemd.unit=runlevel3.target“, whatever.