I just upgraded from Ubuntu 16.04 to 18.04. My workflow is to connect from Windows using VcXsrv to Ubuntu (ssh with X tunneling), starting a xterm on Ubuntu. Inside the xterm I am typing gnome-terminal
to get a gnome-terminal.
Since the upgrade this is not working anymore. I am getting
$ gnome-terminal
# Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
# Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Fehler beim Aufruf von StartServiceByName für org.gnome.Terminal: Zeitüberschreitung wurde erreicht
or when starting with English locale
$ LANG=en_US.utf8 gnome-terminal
# Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
# Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached
I am not always getting the first line, but I am always gettint the timeout error.
Digging more into the issue I found out
sudo gnome-terminal
worksgnome-terminal
works when run in a xterm when locally logged in on the PC- when I am also logged in locally on the PC then
gnome-terminal
in the remote session's xterm opens a gnome-terminal on the local session on the PC (still getting the first error line about registering with accessibility bus) - when I am also logged in over rdp (Windows network connection) then a
gnome-terminal
in the ssh session opens a gnome-terminal in the xrdp session - when I login over rdp (Windows network connection), logoff there, then
gnome-terminal
can open a gnome-terminal
What can I do to get gnome-terminal
in a remote session's xterm to work?
Best Answer
Identical issue, found the solution.
Running 'tail -f /var/log/syslog' in a 2nd terminal when testing in the first terminal gives the following when I launch gnome-terminal after 'sudo bash':
I get the following when running gnome-terminal as myself:
...after a lot of digging I finally found gnome-terminal not starting, which indicated there is an issue with dbus not refreshing its environment when services get requested from non-root. The following steps work around the problem:
vim ~/term
#!/usr/bin/env bash dbus-update-activation-environment --systemd --all gnome-terminal &
chmod 755 ~/term
NOTE TO MODERATOR:
Please do NOT delete an answer that provides additional detail for the problem. What you deleted was not any violation of the posting guidelines, and provided substantial additional information for anyone trying to track down the solution. This answer does not provide that additional information and I am disinclined to go through the effort of recovering it.
This answer solves the problem.
PLEASE DO NOT DELETE IT!