Bug 1313060

Summary: GNOME Desktop does not work headless in chrome-remote-desktop
Product: [Fedora] Fedora Reporter: John (J5) Palmieri <john.j5live>
Component: gnome-sessionAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: jmccann, rstrode
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-20 19:08:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Output of journalctl
none
Xdummy file none

Description John (J5) Palmieri 2016-02-29 20:33:11 UTC
Description of problem:

As part of the Chromium builds Spot is also building Chrome Remote Desktop which is a way to access remote desktops through the browser on a headless system(1). Sharing a desktop works fine and exporting other desktops like xfce4 work fine also but Gnome throws up the fail whale "Uh oh" screen when launching Gnome-session. I thinks this is due to the XDG_* env variables not being set. 

(1) https://copr.fedorainfracloud.org/coprs/spot/chromium/package/chromium/


How reproducible:

Every time.

Steps to Reproduce:
1.install the chrome-remote-desktop package from the above copr repo
2.install the chrome-remote-desktop plugin in Chromium or Chrome
3.Add this to ~/.chrome-remote-desktop-session :
  exec gnome-session
4. Open chrome-remote-desktop in Chromium or Chrome and click Enable access button
5. Click on the enabled CRD session

You may need to find the subprocess.Popen for the xserver in /usr/lib64/chrome-remote-desktop/chrome-remote-desktop line 389, and add the line:
  "-extension", "GLX",
Actual results:

a window with the failwail screen pops up

Expected results:

a launched Gnome desktop

Additional info:

***

Running this on the gnome-session process:

tr '\0' '\n' < /proc/<pid>/environ

reveals that none of the XDG_* env vars are set

***

Most environments work by just execing their session managers

***

This works in GNOME Shell 3.10.4 on my work Ubuntu desktop using this:

xsetroot -cursor_name X_cursor
exec /usr/sbin/lightdm-session /usr/bin/gnome-session

Comment 1 John (J5) Palmieri 2016-02-29 20:42:57 UTC
Also note the pam configuration symlinks to system-auth. Either this is not being run or it is not the correct pam configuration for this setup (I'm pretty sure it is the systemd pam plugins that sets XDG_SESSION_ID but my knowledge of pam has waned over the years)

Comment 2 John (J5) Palmieri 2016-03-01 02:40:00 UTC
Created attachment 1131788 [details]
Output of journalctl

Comment 3 John (J5) Palmieri 2016-03-01 02:42:34 UTC
Just noticed that I can no longer get this to work with Xvfb due to lack of GLX support and instead used a hacked up Xdummy script which executes Xorg with the xdummy video driver.

Attachments to follow.

Comment 4 John (J5) Palmieri 2016-03-01 02:48:06 UTC
Created attachment 1131789 [details]
Xdummy file

This file executes an X server with the Xdummy video driver for headless operations. This is supposed to be the successor to Xvfb which does not support a number of extensions including XGL and XRANDR. Note I changed how CRD executes X as such:

    xvfb="/usr/local/bin/Xdummy"
    self.x_proc = subprocess.Popen(
        [xvfb, ":%d" % display,
         "-auth", x_auth_file,
         "-xserver", "/usr/libexec/Xorg",
         "-nolisten", "tcp",
         "-noreset",
         "+extension", "GLX",
         "+extension", "RANDR"
        ] + extra_x_args)

This points it to the correct Xorg (not the wrapper) using -xserver /usr/libexec/Xorg

Comment 5 Fedora End Of Life 2016-11-24 15:51:25 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2016-12-20 19:08:33 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.