We are trying to start xserver as user using startx command, once startx start the X server we try to start the gnome-session on same display. But when we connect to the display using x11vnc it shows up all blank.
But with the same process if we start other desktop manager like: Mate, KDE those come up fine.
Setup details:
OS: centos 7.9 GPU: Quadro 4000 Gnome version: gnome-desktop3-3.28.2-2.el7.x86_64 Below are the steps to reproduce the issue:
- Update /etc/pam.d/xserver to give permission to user to start X server.
1.1) comment line
auth required pam_console.so
1.2) add line “auth required pam_permit.so” - Switch to non-root user.
- run command
startx
in background. - From process find out the display id on which X server is started. ex:
ps aux | grep “bin/X” | grep <userid>
export DISPLAY=<DISPLAY_ID>
- run “gnome-session” command in background.
- run “x11vnc” and connect through vnc client. For me Desktop is coming as blank. But in step 6 if we try MATE or KDE, desktop comes up.
Any idea why it is happening?
Some snippet of gnome-session debug logs:
gnome-session-binary[45081]: DEBUG(+): gnome-session-binary[45081]: DEBUG(+): Could not make systemd aware of QT_IM_MODULE=ibus environment variable: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1 gnome-session-binary[45081]: DEBUG(+): Could not make systemd aware of XMODIFIERS=@im=ibus environment variable: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1 gnome-session-binary[45081]: DEBUG(+): Could not make systemd aware of GNOME_DESKTOP_SESSION_ID=this-is-deprecated environment variable: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1 gnome-session-binary[45081]: DEBUG(+): Could not make systemd aware of XDG_MENU_PREFIX=gnome- environment variable: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1 gnome-session-binary[45081]: WARNING: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login. gnome-session-binary[45081]: DEBUG(+): Using systemd for session tracking gnome-session-binary[45081]: DEBUG(+): GsmManager: setting client store 0x8c0310 generating cookie with syscall generating cookie with syscall generating cookie with syscall generating cookie with syscall gnome-session-binary[45081]: DEBUG(+): Could not make systemd aware of SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/45081,unix/unix:/tmp/.ICE-unix/45081 environment variable: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1 gnome-session-binary[45081]: DEBUG(+): GsmXsmpServer: SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/45081,unix/unix:/tmp/.ICE-unix/45081
gnome-session-binary[45081]: DEBUG(+): Could not make systemd aware of GNOME_KEYRING_CONTROL=/users/rangesg/.cache/keyring-28YFK1 environment variable: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1 gnome-session-binary[45081]: DEBUG(+): Could not make systemd aware of SSH_AUTH_SOCK=/users/rangesg/.cache/keyring-28YFK1/ssh environment variable: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1