Can't open Terminal application in Rocky Linux

Hi All,
I can’t open Terminal application in my Rocky Linux,
but before I can open terminal application, using right
mouse button click from desktop and clicking “Open in Terminal”.
How to fix this?

Please help.

Best regards,
Marben

Hi
What desktop environment is used?
In the standard GNOME Desktop there is no such option when right-clicking in the desktop.

An option “Open Terminal” can be added with this extension:
https://extensions.gnome.org/extension/1828/gnome-shell-open-terminal

“Open in Terminal” is present when right-clicking in the “Files” application.

Best regards
Olista

Hi Olista,
I’m using, GNOME-Classic:GNOME
I used the command in Xterm,
echo $XDG_CURRENT_DESKTOP
GNOME-Classic:GNOME

Even if I use Application - System Tools - Terminal,
New Terminal window will not open.

Best regards,
Marben

Check if there are some error messages logged when starting the terminal:

sudo tail -f /var/log/messages

You can also enter the command “gnome-terminal” in xterm and check the messages.

Hi,

[root@eda Marben]# tail -f /var/log/messages
May 29 19:44:54 eda NetworkManager[1234]: <info>  [1653824694.0634] agent-manager: agent[b2cd886353435114,:1.259/org.gnome.Shell.NetworkAgent/1000]: agent registered
May 29 19:44:54 eda dbus-daemon[998]: [system] Successfully activated service 'org.freedesktop.hostname1'
May 29 19:44:54 eda systemd[1]: Started Hostname Service.
May 29 19:45:14 eda systemd[1]: fprintd.service: Succeeded.
May 29 19:45:24 eda systemd[1]: systemd-hostnamed.service: Succeeded.
May 29 19:45:30 eda dbus-daemon[998]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service' requested by ':1.548' (uid=0 pid=5666 comm="su " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
May 29 19:45:30 eda systemd[1]: Starting Fingerprint Authentication Daemon...
May 29 19:45:30 eda dbus-daemon[998]: [system] Successfully activated service 'net.reactivated.Fprint'
May 29 19:45:30 eda systemd[1]: Started Fingerprint Authentication Daemon.

[Marben@eda ~]$ gnome-terminal
# watch_fast: "/org/gnome/desktop/interface/" (establishing: 0, active: 0)
# watch_fast: "/org/gnome/settings-daemon/peripherals/mouse/" (establishing: 0, active: 0)
# watch_fast: "/org/gnome/desktop/sound/" (establishing: 0, active: 0)
# watch_fast: "/org/gnome/desktop/privacy/" (establishing: 0, active: 0)
# watch_fast: "/org/gnome/desktop/wm/preferences/" (establishing: 0, active: 0)
# watch_fast: "/org/gnome/settings-daemon/plugins/xsettings/" (establishing: 0, active: 0)
# watch_fast: "/org/gnome/desktop/a11y/" (establishing: 0, active: 0)
# watch_established: "/org/gnome/desktop/interface/" (establishing: 1)
# watch_established: "/org/gnome/settings-daemon/peripherals/mouse/" (establishing: 1)
# watch_established: "/org/gnome/desktop/sound/" (establishing: 1)
# watch_established: "/org/gnome/desktop/privacy/" (establishing: 1)
# watch_established: "/org/gnome/desktop/wm/preferences/" (establishing: 1)
# watch_established: "/org/gnome/settings-daemon/plugins/xsettings/" (establishing: 1)
# watch_established: "/org/gnome/desktop/a11y/" (establishing: 1)
# Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached
[Marben@eda ~]$ 

If i tried to run gnome-terminal in Xterm, 
I can see error messages like these:
May 29 19:48:59 eda dbus-daemon[2409]: [session uid=1000 pid=2409] Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service' requested by ':1.85' (uid=1000 pid=5803 comm="gnome-terminal " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
May 29 19:48:59 eda systemd[2370]: Starting GNOME Terminal Server...
May 29 19:48:59 eda gnome-terminal-server[5807]: Non UTF-8 locale (ANSI_X3.4-1968) is not supported!
May 29 19:48:59 eda systemd[2370]: gnome-terminal-server.service: Main process exited, code=exited, status=8/n/a
May 29 19:48:59 eda systemd[2370]: gnome-terminal-server.service: Failed with result 'exit-code'.
May 29 19:48:59 eda systemd[2370]: Failed to start GNOME Terminal Server.
May 29 19:50:36 eda NetworkManager[1234]: <info>  [1653825036.5381] dhcp4 (ens33): state changed new lease, address=192.168.16.128
May 29 19:50:59 eda dbus-daemon[2409]: [session uid=1000 pid=2409] Failed to activate service 'org.gnome.Terminal': timed out (service_start_timeout=120000ms)
May 29 19:52:58 eda dbus-daemon[998]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service' requested by ':1.554' (uid=0 pid=5892 comm="su " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
May 29 19:52:58 eda systemd[1]: Starting Fingerprint Authentication Daemon...
May 29 19:52:58 eda dbus-daemon[998]: [system] Successfully activated service 'net.reactivated.Fprint'
May 29 19:52:58 eda systemd[1]: Started Fingerprint Authentication Daemon.
May 29 19:53:01 eda su[5892]: (to root) Marben on pts/2
May 29 19:53:29 eda systemd[1]: fprintd.service: Succeeded.

Best regards,
Marben

Based on this you may want to check if gnome-session is installed and running.

You may also want to run something like this to ensure you have everything installed:

# dnf -y group install "Server with GUI"

If you set XDG_CURRENT_DESKTOP and GNOME_SHELL_SESSION_MODE in ~/.xinitrc you may need to add:

exec /usr/bin/gnome-session --session=gnome-classic

Hi lgrn,
I can not find .xinitrc in my home directory.
I also run `# dnf -y group install “Server with GUI”,
and exec /usr/bin/gnome-session --session=gnome-classic,
but Terminal application still not displaying in my Rocky Linux.

Best regards,
Marben

Hi Marben

Please run “sudo tail -f /var/log/messages” while starting gnome-terminal.

This might be the cause:

Does the terminal start with this command?

LANG=en_US.UTF-8 gnome-terminal

You can try in the GNOME Settings to set the language to English (United States) or to English (United Kingdom). It will be necessary to logout and login afterwards.

Hi olista,
I can not see ``LANG=en_US.UTF-8 gnome-terminal```, while the Terminal start.
There is another error message,
“eda journal[2735]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output”".

Best regards,
Marben

Hi olista,
I try to change the language to english(United Kngdom), the error “LANG=en_US.UTF-8 gnome-termina`” is gone, but i can see eroor like these:
May 30 01:56:29 eda journal[12499]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output
May 30 01:57:26 eda dbus-daemon[11848]: [session uid=1000 pid=11848] Failed to activate service ‘org.gnome.Terminal’: timed out (service_start_timeout=120000ms)

Best regards,
Marben

Hi Marben

Make sure your system is up to date (sudo dnf upgrade -y) and do a reboot.

You can try to do this also:

sudo dnf reinstall -y dbus

If changing the language does not help, then we should check the messages when starting “gnome-terminal” in xterm. Run “sudo tail -f /var/log/messages” in parallel. Run also this command afterwards and post the output:

systemctl --user status gnome-terminal-server.service

Hi,
I changed my .bashrc file to the default .bashrc, and
rebooted, the Terminal window is now working like a charm.
It looks like setting ‘export LANG=C’ in .bashrc caused the problem of gnome-terminal not starting.
I followed this thread:
https://bugzilla.redhat.com/show_bug.cgi?id=1879048

Thank you very much for your help.

Best regards,
Marben

1 Like

Hi Marben

Great :slight_smile:

LANG must have one of the values returned by this command:

localectl list-locales

Best regards
Olista

In Gnome 3, open in terminal was a context menu (right click) option. Worked in desktop.

Also, I remember seeing it in Nautilus, I think, but that may have been a tweak or configurable option.