Can not start unity in multipass vm : Error: unable to open display

Bug #2024646 reported by Khurshid Alam
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity (Ubuntu)
New
Undecided
Unassigned

Bug Description

I am trying running unity under a multipass vm running on remote dedicated root server (24 core/64GB) on linode running 22.04

According to this guide a full dektop can be used: https://multipass.run/docs/set-up-a-graphical-interface which runs a full ubuntu-desktop.

Multipass vm also initiated with 22.04. Nginx forwarding *:3389 to <multipass-vm-ip>:3389

Then from inside vm,

1. sudo adduser xrdpuser (#default ubuntu doesn't have passwd )
2. sudo usermod -aG sudo xrdpuser && sudo usermod -aG tty xrdpuser && sudo usermod -aG video xrdpuser
3. sudo apt install ubuntu-unity-desktop (Or minimal installation from )
4. sudo apt install xrdp; sudo usermod -aG ssl-certs xrdp

Unity install unity binary under /usr/share/xsessions which basically runs /usr/libexec/run-systemd-session unity-session.target

5. Edit /etc/xrdp/startwm.sh and comment out xsesion binary and put the above line

#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession
#xfce4-session
/usr/libexec/run-systemd-session unity-session.target

6. sudo systemctl restart xrdp && sudo systemctl restart xrdp-sesman.service

7. Now when connecting from remmina I get following errors:

Full Log: https://pastebin.ubuntu.com/p/R2fyGq4VRv/

Interesting parts

/bin/sh: 1: initctl: not found which I think is this bug: https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/2002978

Then We get errors like

unity-settings-daemon[4467]: Unable to initialize GTK+

compiz-profile-selector[4516]: Error: unable to open display.

(Compix uses unity-lowgfx and tries to start but still fails due missing display.)

Xrdp however succesfully connecting display 10 as per above log.

Jun 22 14:52:15 jammy-vm xrdp-sesman[4316]: [INFO ] Found X server running at /tmp/.X11-unix/X10
Jun 22 14:52:15 jammy-vm xrdp-sesman[4326]: [INFO ] Found X server running at /tmp/.X11-unix/X10
Jun 22 14:52:15 jammy-vm xrdp-sesman[4326]: [INFO ] Found X server running at /tmp/.X11-unix/X10
Jun 22 14:52:15 jammy-vm xrdp-sesman[4316]: [INFO ] Session started successfully for user xrdpuser on display 10
Jun 22 14:52:15 jammy-vm xrdp-sesman[4338]: [INFO ] Starting the xrdp channel server for display 10
Jun 22 14:52:15 jammy-vm xrdp-sesman[4326]: [INFO ] Starting the default window manager on display 10: /etc/xrdp/startwm.sh
Jun 22 14:52:15 jammy-vm xrdp-sesman[4316]: [INFO ] Session in progress on display 10, waiting until the window manager (pid 4326) exits to end the session

What could be issue here ? xfce4 session works perfectly fine with same configuration.

summary: - Can not start unit in multipass vm : Error: unable to open display
+ Can not start unity in multipass vm : Error: unable to open display
description: updated
description: updated
description: updated
affects: compiz (Ubuntu) → unity (Ubuntu)
Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

It seems gnome session requires GNOME_SETUP_DISPLAY instead DISPLAY. Setting that along with XDG_CURRENT_DESKTOP in .xsession works. /etc/xrdp/startwm.sh modification not required.

Also jammy has old version of xrdp. Newer version recoomends settings DESKTOP_SESSION in /etc/xrdp/sesman.ini under [Sessions] and it will pick up EXEC parameter from unity.desktop. Though it doesn't say anything about setting the display. https://github.com/neutrinolabs/xrdp/blob/devel/sesman/startwm.sh

In short, ~/.xsession
export GNOME_SETUP_DISPLAY=:10
export XDG_CONFIG_DIRS=/etc/xdg/xdg-unity:/etc/xdg
export XDG_SESSION_DESKTOP=unity
export XDG_CURRENT_DESKTOP=Unity:Unity7:ubuntu
/usr/libexec/run-systemd-session unity-session.target

And it will work. Polkit agent somereason not auto-starting. But manually running it works.

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.