You are not logged in.

#1 2020-09-10 13:49:39

multipitch
Member
From: Dublin, Ireland
Registered: 2013-10-30
Posts: 14

[SOLVED] Xrdp / Gnome session crashes

I'm running an arch vm on hyper-v.
It has been working for months without issue until today - not sure what has caused the issue, perhaps something from an update.

When I run hyper-v, I get to the xrdp splash screen, as usual.
I have it set up so only an Xvnc Session is selectable and my password is saved, so at this point I hit "OK" and Gnome should launch.
Instead the screen flickers and I get an error in the hyper-v window that "The session was disconnected..."

Here's the (relevant) output from $ journalctl -b 0 _UID=1000 --no-pager:

Sep 10 14:23:10 arch-vm xrdp-sesman[366]: (366)(140492570494784)[INFO ] Xvnc :10 -auth .Xauthority -geometry 1920x1200 -depth 32 -rfbauth /home/user/.vnc/sesman_passwd-user@arch-vm:10 -bs -nolisten tcp -localhost -dpi 96
Sep 10 14:23:11 arch-vm gnome-session[401]: gnome-session-check-accelerated: GL Helper exited with code 512
Sep 10 14:23:11 arch-vm gnome-session[401]: gnome-session-check-accelerated: GLES Helper exited with code 512
Sep 10 14:23:11 arch-vm gnome-session[365]: gnome-session-binary[365]: WARNING: Falling back to non-systemd startup procedure due to error: Could not connect: Connection refused
Sep 10 14:23:11 arch-vm gnome-session-binary[365]: WARNING: Falling back to non-systemd startup procedure due to error: Could not connect: Connection refused
Sep 10 14:23:11 arch-vm gnome-session[365]: gnome-session-binary[365]: WARNING: Could not make bus activated clients aware of XDG_MENU_PREFIX=gnome- environment variable: Could not connect: Connection refused
Sep 10 14:23:11 arch-vm gnome-session-binary[365]: WARNING: Could not make bus activated clients aware of XDG_MENU_PREFIX=gnome- environment variable: Could not connect: Connection refused
Sep 10 14:23:11 arch-vm gnome-session[365]: gnome-session-binary[365]: WARNING: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login.
Sep 10 14:23:11 arch-vm gnome-session-binary[365]: WARNING: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login.
Sep 10 14:23:11 arch-vm gnome-session-binary[365]: WARNING: Lost name on bus: org.gnome.SessionManager
Sep 10 14:23:11 arch-vm gnome-session[365]: gnome-session-binary[365]: WARNING: Lost name on bus: org.gnome.SessionManager
Sep 10 14:23:11 arch-vm gnome-session[455]: Unable to init server: Could not connect: Connection refused
Sep 10 14:23:11 arch-vm gnome-session-f[455]: Cannot open display: 

Edit:
When I then unselect "Enhanced Session" in the hyper-v window, I can get to a tty and can get into gnome by running

$ startx

Though this only gets me an 1024x768 window.

Last edited by multipitch (2020-10-09 16:42:11)

Offline

#2 2020-09-11 14:22:30

multipitch
Member
From: Dublin, Ireland
Registered: 2013-10-30
Posts: 14

Re: [SOLVED] Xrdp / Gnome session crashes

Fixed by modifying ~/.xinitrc

Old:

export XDG_SESSION_TYPE=x11
export GDK_BACKEND=x11
exec gnome-session

New:

export XDG_SESSION_TYPE=x11
export GDK_BACKEND=x11
exec dbus-launch gnome-session

Last edited by multipitch (2020-09-11 14:25:56)

Offline

#3 2020-10-02 08:57:15

multipitch
Member
From: Dublin, Ireland
Registered: 2013-10-30
Posts: 14

Re: [SOLVED] Xrdp / Gnome session crashes

I thought the above change had solved the problem, but it has not (and use of dbus-launch in this manner is apparently deprecated).
With the above modification, it does get me in to gnome but it's buggy
- gnome terminal wont open
- shutting down via the gui power button doesnt work

When I run startx from a tty, however, everything works fine (whether ~/.xinitrc has "exec dbus-launch gnome-session" or "exec gnome-session"), but I'm stuck on a tiny resolution

Last edited by multipitch (2020-10-02 08:57:45)

Offline

#4 2020-10-09 16:41:37

multipitch
Member
From: Dublin, Ireland
Registered: 2013-10-30
Posts: 14

Re: [SOLVED] Xrdp / Gnome session crashes

The issue can be fixed by commenting out the line `-account [success=1 default=ignore] pam_systemd_home.so` in `/etc/pam.d/system-auth`.
I'm not sure what the side effects of doing this is.

See
https://github.com/neutrinolabs/xrdp/issues/1684
https://bbs.archlinux.org/viewtopic.php?id=258716
https://github.com/microsoft/linux-vm-tools/issues/127

Offline

#5 2020-10-30 15:55:38

ParanoidNemo
Member
Registered: 2015-06-10
Posts: 5

Re: [SOLVED] Xrdp / Gnome session crashes

Sorry for bumping the thread but are you sure is solved? Because I've the same problem as yours and following your solution give me this result:

multipitch wrote:

I thought the above change had solved the problem, but it has not (and use of dbus-launch in this manner is apparently deprecated).
With the above modification, it does get me in to gnome but it's buggy
- gnome terminal wont open
- shutting down via the gui power button doesnt work

maybe is something to do with the xrdp package installed? Can you please give me some information of your setup so that I can replicate and see if it works for me too?

Thanks

Offline

Board footer

Powered by FluxBB