Cannot open a terminal now [SOLVED]
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Cannot open a terminal now [SOLVED]
Subject says it all. The gnome terminal that is standard with Linux Mint does not open now. I cannot open it from the panel, from the menu, or from nemo "Open in terminal". Something changed, I do not know what. I was not doing anything exotic, except maybe testing TeamViewer. I also remember installing x11vnc. I cannot remember the last terminal I opened, but it was certainly not very long ago, as you tend to live in those things in Linux.
I tried to roll back to an earlier state in TimeShift (today at noon) but that has not restored it. I also tried removing and reinstalling gnome terminal, likewise without result.
I am able to open xterm, for what that is worth. But I want my gnome terminal back, dammit!
ADDITIONAL INFO: If I run 'gnome-terminal' from xterm, I get "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 construction proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached.
I tried to roll back to an earlier state in TimeShift (today at noon) but that has not restored it. I also tried removing and reinstalling gnome terminal, likewise without result.
I am able to open xterm, for what that is worth. But I want my gnome terminal back, dammit!
ADDITIONAL INFO: If I run 'gnome-terminal' from xterm, I get "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 construction proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Cannot open a terminal now
Since having this issue, have you restarted your system? If not then give that a try.
Gnome Terminal doesn't store any files in home directory (that I know of) but it does use gsettings that is stored there. Installing/removing packages, or rolling back to a Timeshift snapshot, only affects files in system directories. So you might try resetting Gnome Terminal's gsettings. With a functioning terminal you can do that with these commands:
If the commands work there will be no feedback. In case of a problem it gives feedback about the problem.
Otherwise try starting
If that doesn't provide further info, see if there is anything more in the journal. Suggest to:
- Open 2 xterm windows
- In the first run
- In the second run
- Switch back to the first xterm and do Ctrl+C to interrupt the journal; from what the journal command printed, is there anything about Gnome Terminal?
Risking losing context you might also find that info with
Gnome Terminal doesn't store any files in home directory (that I know of) but it does use gsettings that is stored there. Installing/removing packages, or rolling back to a Timeshift snapshot, only affects files in system directories. So you might try resetting Gnome Terminal's gsettings. With a functioning terminal you can do that with these commands:
Code: Select all
gsettings reset-recursively org.gnome.Terminal.ProfilesList
gsettings reset-recursively org.gnome.Terminal.Legacy.Settings
Otherwise try starting
gnome-terminal -v
(-v adds verbosity, perhaps showing more info on the error?) from xterm again and immediately following it giving you that error message do echo $?
to get the exit status. There are some known exit statuses documented here: https://wiki.gnome.org/Apps/Terminal/FA ... s_to_startIf that doesn't provide further info, see if there is anything more in the journal. Suggest to:
- Open 2 xterm windows
- In the first run
journalctl -f
to start following the journal- In the second run
gnome-terminal -v
and wait for it to throw the error and exit- Switch back to the first xterm and do Ctrl+C to interrupt the journal; from what the journal command printed, is there anything about Gnome Terminal?
Risking losing context you might also find that info with
journalctl --no-pager -b -g gnome.terminal
but this will only show journal message mentioning gnome terminal so I'd try above instead.Re: Cannot open a terminal now
I have restarted, several times.
I do remember accidentally killing xorg around the time this first showed up. Any possible relation?
ADDITIONAL INFO: If I run 'gnome-terminal' from xterm, I get
"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 construction proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached."
I can start a gnome terminal from xterm by 'sudo gnome-terminal'. but that just verifies that that it's still there.
One suggestion was to
chown -R user.user /home/user
as it seems to be a permissions-related issue.
I haven't done any of these yet, will wait till later in the morning. Too early to think right now:)
I do remember accidentally killing xorg around the time this first showed up. Any possible relation?
ADDITIONAL INFO: If I run 'gnome-terminal' from xterm, I get
"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 construction proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached."
I can start a gnome terminal from xterm by 'sudo gnome-terminal'. but that just verifies that that it's still there.
One suggestion was to
chown -R user.user /home/user
as it seems to be a permissions-related issue.
I haven't done any of these yet, will wait till later in the morning. Too early to think right now:)
Re: Cannot open a terminal now
You've confirmed your issue I think. You should never run your terminal as root; only use sudo within the shell. Likely you changed ownership of relevant files in your home directory to root and you've only noticed this problem in Gnome Terminal thus far.
Correct command to remedy ownership would be following:
Correct command to remedy ownership would be following:
sudo chown -R $(id -u):$(id -g) ~
Re: Cannot open a terminal now
Actually, I only tried the root terminal test AFTER the initial issue with gnome-terminal appeared. And I certainly did not execute any command. Just in and out.
Still, this is excellent knowledge and I appreciate it.
Looking forward to trying these ideas later.
Still, this is excellent knowledge and I appreciate it.
Looking forward to trying these ideas later.
Re: Cannot open a terminal now
I meant that as it runs with sudo, it looks like some files it needs in your home directory when running as yourself can't be accessed. Likely they were previously changed from you owning them to root owning them and that's why it works when using sudo. How/who/when/where will be hard to pin down except to note you must have run some GUI program as root or something else run as root changed file ownership.
Re: Cannot open a terminal now
Well, unfortunately this did not work.xenopeek wrote: ⤴Mon Oct 08, 2018 7:45 am You've confirmed your issue I think. You should never run your terminal as root; only use sudo within the shell. Likely you changed ownership of relevant files in your home directory to root and you've only noticed this problem in Gnome Terminal thus far.
Correct command to remedy ownership would be following:
sudo chown -R $(id -u):$(id -g) ~
I created another user, logged in as that person, and that user can open his gnome-terminal just fine. But my original account cannot. I logged in and out several times, rebooted, etc., still no success.
Attempt to start from xterm, get
Error construction proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0:
Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached.
Re: Cannot open a terminal now
Try
Code: Select all
LC_ALL=C gnome-terminal
Code: Select all
grep terminal /var/log/syslog
Re: Cannot open a terminal now
LC_ALL gives this:gm10 wrote: ⤴Mon Oct 08, 2018 9:26 amTryAlso if that's not it, we need the full return status from the logs:Code: Select all
LC_ALL=C gnome-terminal
Code: Select all
grep terminal /var/log/syslog
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
This is a section of the syslog where I try to start gnome-terminal from the panel:
Oct 8 08:37:17 ed dbus-daemon[1411]: [session uid=1000 pid=1411] Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service' requested by ':1.1842' (uid=1000 pid=10205 comm="/usr/bin/gnome-terminal.real " label="unconfined")
Oct 8 08:37:18 ed systemd[1229]: Starting GNOME Terminal Server...
Oct 8 08:37:18 ed systemd[1229]: gnome-terminal-server.service: Main process exited, code=exited, status=10/n/a
Oct 8 08:37:18 ed gnome-terminal-server[10208]: Unable to init server: Could not connect: Connection refused
Oct 8 08:37:18 ed gnome-terminal-server[10208]: Failed to parse arguments: Cannot open display:
Oct 8 08:37:18 ed systemd[1229]: gnome-terminal-server.service: Failed with result 'exit-code'.
Oct 8 08:37:18 ed systemd[1229]: Failed to start GNOME Terminal Server.
Re: Cannot open a terminal now
LOL at those hi-falutin, useless error messages."Couldn't register with accessibility bus: did not receive a ...
Error construction proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0:
Try
Code: Select all
sudo dpkg-reconfigure gnome-terminal
sudo dpkg-reconfigure gnome-terminal-data
Code: Select all
find $HOME ! -user $USER
Edit:
try this!
Code: Select all
/usr/bin/gnome-terminal.real
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: Cannot open a terminal now
Ok, so as per the documentation for exit status 10:EdB wrote: ⤴Mon Oct 08, 2018 9:42 am Oct 8 08:37:18 ed systemd[1229]: Starting GNOME Terminal Server...
Oct 8 08:37:18 ed systemd[1229]: gnome-terminal-server.service: Main process exited, code=exited, status=10/n/a
Oct 8 08:37:18 ed gnome-terminal-server[10208]: Unable to init server: Could not connect: Connection refused
Oct 8 08:37:18 ed gnome-terminal-server[10208]: Failed to parse arguments: Cannot open display:
Off the top of my head I have no idea how you managed to get that last bit messed up. A blind guess would be to try:Reason: gtk_init() failed. The most likely cause is that the connection to the display could not be opened, for example because the environment that gnome-terminal-server is started with lacks a DISPLAY setting. Consult your distribution's documentation on how to fix this. Note that is it not relevant to check the environment from a different terminal (e.g. xterm); what counts is the environment that the session dbus-demon passes to the processes it starts.
Code: Select all
apt install --reinstall dbus-user-session
printenv DISPLAY
) and then see if you can launch the gnome-terminal like this:
Code: Select all
dbus-launch gnome-terminal
Re: Cannot open a terminal now
This is extremely strange. When I run the reinstall dbus command, log out, and log back in, I am able to bring up a terminal successfully exactly ONE time and one time only. After that, the error is
Off the top of my head I have no idea how you managed to get that last bit messed up. A blind guess would be to try:
Log out and back in after that, then try again. If it's still not working, out of curiosity, in your xterm check that the DISPLAY variable actually exists (Code: Select all
apt install --reinstall dbus-user-session
printenv DISPLAY
) and then see if you can launch the gnome-terminal like this:That's not a solution, just to see how broken things are.Code: Select all
dbus-launch gnome-terminal
Oct 8 09:08:47 ed systemd[1278]: Starting GNOME Terminal Server...
Oct 8 09:08:47 ed gnome-terminal-server[9151]: Unable to init server: Could not connect: Connection refused
Oct 8 09:08:47 ed gnome-terminal-server[9151]: Failed to parse arguments: Cannot open display:
Oct 8 09:08:47 ed systemd[1278]: gnome-terminal-server.service: Main process exited, code=exited, status=10/n/a
Oct 8 09:08:47 ed systemd[1278]: gnome-terminal-server.service: Failed with result 'exit-code'.
Oct 8 09:08:47 ed systemd[1278]: Failed to start GNOME Terminal Server.
There are also many entries in the syslog like this:
Oct 8 09:04:01 ed at-spi2-registr[7576]: AT-SPI: Cannot open default display
Oct 8 09:04:01 ed at-spi-bus-launcher[5573]: dbus-daemon[5580]: Activating service name='org.a11y.atspi.Registry' requested by ':1.145' (uid=1000 pid=6043 comm="/usr/bin/python3 /usr/bin/cinnamon-killer-daemon " label="unconfined")
Oct 8 09:04:01 ed cinnamon-session[5650]: WARNING: t+77.39827s: AT-SPI: Could not obtain desktop path or name
Oct 8 09:04:01 ed at-spi2-registr[7578]: Could not open X display
Oct 8 09:04:01 ed at-spi-bus-launcher[5573]: dbus-daemon[5580]: Successfully activated service 'org.a11y.atspi.Registry'
Oct 8 09:04:01 ed at-spi-bus-launcher[5573]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Last edited by EdB on Mon Oct 08, 2018 10:26 am, edited 1 time in total.
Re: Cannot open a terminal now
The printenv DISPLAY just gives this:Log out and back in after that, then try again. If it's still not working, out of curiosity, in your xterm check that the DISPLAY variable actually exists (printenv DISPLAY
)
and then see if you can launch the gnome-terminal like this:That's not a solution, just to see how broken things are.Code: Select all
dbus-launch gnome-terminal
:0
The dbus-launch will start the gnome-terminal, but the message about the accessibility bus appears in the xterm window I use to launch.
By the way, I REALLY appreciate the help with this. This is how you learn this stuff - by getting things really screwed up and having to fix them.
Re: Cannot open a terminal now
Thanks, but no luck with the dpkg-reconfigure commands.Flemur wrote: ⤴Mon Oct 08, 2018 9:43 amLOL at those hi-falutin, useless error messages."Couldn't register with accessibility bus: did not receive a ...
Error construction proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0:
TryAlthough you already tried the fix for this, try this anywayCode: Select all
sudo dpkg-reconfigure gnome-terminal sudo dpkg-reconfigure gnome-terminal-data
see if root owns stuff.Code: Select all
find $HOME ! -user $USER
Edit:
try this!Code: Select all
/usr/bin/gnome-terminal.real
The find command shows no root users owning any of my files.
The gnome-terminal.real shows the previous messages about the accessibility bus and StartServiceByName.
Re: Cannot open a terminal now
Ok, good, so if the dbus-launch command works, that means dbus as such works correctly, just the desktop session doesn't. Based on that, another semi-blind guess at a fix would be this:
Code: Select all
apt install --reinstall mint-meta-cinnamon cinnamon cinnamon-session cinnamon-session-common at-spi2-core
Re: Cannot open a terminal now
Before I do this, let me point out one more very strange piece of behavior. I have done all the commands people have suggested so far. At some point, things *apparently* started working! Some combination of things got things in order, and I could open terminals in the usual fashion. However, if I reboot the problem reappears and I cannot open them anymore. That is, the fix does not persist with reboot.gm10 wrote: ⤴Mon Oct 08, 2018 10:26 amOk, good, so if the dbus-launch command works, that means dbus as such works correctly, just the desktop session doesn't. Based on that, another semi-blind guess at a fix would be this:Code: Select all
apt install --reinstall mint-meta-cinnamon cinnamon cinnamon-session cinnamon-session-common at-spi2-core
BUT, if I then log out, log in as another user and open a terminal, then log out and back in as myself, then my terminals WORK!
Do you need further info, or should I just go ahead and run the command you have above?
Ed
Re: Cannot open a terminal now
No, but that's interesting. So it's an issue with your user profile? Try this instead (copy & paste)
Code: Select all
sudo chown -Rc $USER:$USER $HOME
Code: Select all
rm -rv ~/.dbus
Re: Cannot open a terminal now
This did not appear to make a difference. Thanks, though.gm10 wrote: ⤴Mon Oct 08, 2018 10:49 amNo, but that's interesting. So it's an issue with your user profile? Try this instead (copy & paste)
and maybe alsoCode: Select all
sudo chown -Rc $USER:$USER $HOME
(not sure if needed but you should probably re-log after the last one)Code: Select all
rm -rv ~/.dbus
Re: Cannot open a terminal now
You could still try the re-install commands I gave you above I guess but at this point I'll cede the floor to someone more knowledgeable about this particular issue. We identified what's wrong, but I don't know what causes it.
Re: Cannot open a terminal now
Thanks for taking the time. I appreciate it so much!