1

I think it happened after running apt upgrade that my gnome-terminal won't open anymore. I've tried a few of the suggestions from other questions which said that re-generating the locales might fix it.

I've installed xterm and after a delay of about 40 seconds this is the output:

# Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached

This gets printed in the syslog couple of times:

Aug 26 11:26:16 sirius at-spi-bus-launcher[1456]: dbus-daemon[1465]: Activating service name='org.a11y.atspi.Registry' requested by ':1.1005' (uid=1000 pid=9634 comm="/usr/bin/gnome-terminal.real " label="unconfined")
Aug 26 11:26:16 sirius at-spi2-registr[9636]: Could not open X display
Aug 26 11:26:16 sirius at-spi-bus-launcher[1456]: dbus-daemon[1465]: Successfully activated service 'org.a11y.atspi.Registry'
Aug 26 11:26:16 sirius at-spi-bus-launcher[1456]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Aug 26 11:26:16 sirius at-spi2-registr[9636]: AT-SPI: Cannot open default display

Since there's an error regarding the default display, I also tried running DISPLAY=:0 gnome-terminal, though with the same result. sudo gnome-terminal does open the terminal correctly. It also worked once when I ran dbus-update-activation-environment --systemd --all (from here) but after a reboot I get the following message:

# 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

Also tried the first five answers from this question.

Update: Here are the files that didn't belong to my user.

~$ find $HOME -not -user $USER
/home/dominic/.dbus/session-bus/35e9e36cbe34423e8c8274630326355c-0
find: ‘/home/dominic/.gvfs’: Permission denied
/home/dominic/.gvfs
find: ‘/home/dominic/.cache/doc’: Permission denied
/home/dominic/.cache/doc
/home/dominic/.cache/dconf/user

Changed the owner to my user and rebooted. Didn't have a .dconf but a .gconf. Rebooted again, but the terminal still doesn't open.

I also noticed when i run sudo gnome-terminal in xterm and then su dominic in gnome-terminal everything starts working. I can even close all gnome-terminals and open them again. After a reboot everything's back to being broken.

Dominic
  • 236
  • 1
    Can you create a test user? So we know if the error is general (system) or in your $HOME. – nobody Aug 26 '19 at 13:09
  • @nobody Created a test user and signed in with the default settings (Unity). Terminal opens just fine. I'm using Cinnamon – Dominic Aug 27 '19 at 08:57
  • @nobody when I logout from dominic, log in and out of testuser and in as dominic again. The gnome-terminal works again. Just tried after a fresh reboot – Dominic Aug 27 '19 at 09:06
  • It would be better to choose one Desktop an remove the other. Unity and cinnamon are botth GTK desktop and can affect each other. – nobody Aug 27 '19 at 11:36
  • @nobody seems like it's related to my user. dominic can't open the terminal in Unity and Cinnamon, testuser can open it in both environments – Dominic Aug 28 '19 at 09:08
  • Never, ever use sudo for graphically programs like gnome-terminal. this way you will break the ownership from data's in your $HOME Use sudo -H programname or pkexec programname. fixed my answer. – nobody Aug 28 '19 at 10:21

1 Answers1

0

Search, with find $HOME -not -user $USER if some files are not belong to your user. Give them back to your user with

sudo chown -R $USER:$USER /path/to/file

Log out and login again.

The next step will revert your attitude from your desktop-session.

mv $HOME/.dconf $HOME/.dconf.bak

and the same for

mv $HOME/.gconf $HOME/.gconf.bak

logout and login again.

nobody
  • 5,437
  • I've added some updates to the questions. Thanks a lot for your help btw :) – Dominic Aug 28 '19 at 10:16
  • There are no files in my $HOME not belonging to my user anymore. .gconf directory is also renamed. Still doesn't open – Dominic Aug 28 '19 at 10:39
  • Sorry, here is very hot. I cleaned my answer for chown command. but if all files belong to your user, I have no Idea what is going wrong. – nobody Aug 28 '19 at 10:51