[GH-ISSUE #1505] Gnome-terminal stops working after stopping xpra #1005

Closed
opened 2026-05-05 07:17:38 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @hahjortland on GitHub (Aug 30, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1505

Steps to reproduce

  1. xpra start :20
  2. xpra stop :20
  3. Close all gnome-terminal instances
  4. Try to start gnome-terminal. Fails to start!

Tested on Ubuntu 16.04.

Analysis

xpra starts /etc/X11/Xsession,
which runs /etc/X11/Xsession.d/95dbus_update-activation-env,
which runs dbus-update-activation-environment.
This results in (from ~/.xsession-errors):

dbus-update-activation-environment: setting DISPLAY=:20

When DBUS spawns gnome-terminal-server, it tries to connect to DISPLAY=:20. Since this display number is invalid after xpra has closed, gnome-terminal-server fails to start:

$ gnome-terminal
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0:
  Error calling StartServiceByName for org.gnome.Terminal:
  GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited:
  Process org.gnome.Terminal exited with status 10

Workaround

The problem can be prevented by unsetting DBUS_SESSION_BUS_ADDRESS:

env -u DBUS_SESSION_BUS_ADDRESS xpra start :20

Quick fixes after running xpra without this workaround:

  • Start xpra again, or
  • run gnome-terminal using the command gnome-terminal --disable-factory, or
  • fix the invalid DISPLAY value with dbus-update-activation-environment DISPLAY=:0.
Originally created by @hahjortland on GitHub (Aug 30, 2017). Original GitHub issue: https://github.com/netblue30/firejail/issues/1505 ### Steps to reproduce 1. `xpra start :20` 2. `xpra stop :20` 3. Close all gnome-terminal instances 4. Try to start gnome-terminal. Fails to start! Tested on Ubuntu 16.04. ### Analysis xpra starts `/etc/X11/Xsession`, which runs `/etc/X11/Xsession.d/95dbus_update-activation-env`, which runs `dbus-update-activation-environment`. This results in (from ~/.xsession-errors): ``` dbus-update-activation-environment: setting DISPLAY=:20 ``` When DBUS spawns gnome-terminal-server, it tries to connect to `DISPLAY=:20`. Since this display number is invalid after xpra has closed, gnome-terminal-server fails to start: ``` $ gnome-terminal Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 10 ``` ### Workaround The problem can be prevented by unsetting DBUS_SESSION_BUS_ADDRESS: ``` env -u DBUS_SESSION_BUS_ADDRESS xpra start :20 ``` Quick fixes after running `xpra` without this workaround: * Start `xpra` again, or * run `gnome-terminal` using the command `gnome-terminal --disable-factory`, or * fix the invalid `DISPLAY` value with `dbus-update-activation-environment DISPLAY=:0`.
gitea-mirror 2026-05-05 07:17:38 -06:00
Author
Owner

@netblue30 commented on GitHub (Sep 2, 2017):

Is this related to firejail?

<!-- gh-comment-id:326752009 --> @netblue30 commented on GitHub (Sep 2, 2017): Is this related to firejail?
Author
Owner

@hahjortland commented on GitHub (Sep 3, 2017):

No, it's not directly related to firejail. Starting xpra inside an already running desktop session like this is maybe a bit unusual, though.

<!-- gh-comment-id:326787639 --> @hahjortland commented on GitHub (Sep 3, 2017): No, it's not directly related to firejail. Starting xpra inside an already running desktop session like this is maybe a bit unusual, though.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1005
No description provided.