36

I have Ubuntu-Gnome 14.04 (Gnome 3.12.2).

When I try to run gnome-terminal by following command :

$ 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 /usr/lib/gnome-terminal/gnome-terminal-server exited with status 8
2
  • Experiencing the same error message on Ubuntu 19.04 / GNOME Terminal 3.34.2, I found this answer worked. Feb 7, 2020 at 17:47
  • If I open gnome-terminal from within a gnome-session, it works fine. If I open it outside of gnome-session, such as when using my favorite window manager, fvwm, I have to use BarryPye's solution shown below.
    – VikingGlen
    Jul 20, 2021 at 17:03

11 Answers 11

28

You have to add LANG=en_US.UTF-8 to /etc/default/locale and reboot your system. (Solution from this Arch Linux forum post.)

3
  • 25
    This didn't work for me.
    – Cerin
    Feb 3, 2017 at 15:03
  • Worked for me! It looks like I had LANG=en_US.UTF-8 in my file, but it was commented out. Uncommented it and rebooted, then gnome-terminal started right up. Sep 13, 2018 at 16:51
  • 4y since this answer. and the user feedback when this is hit is still the same.
    – hbogert
    Feb 25, 2019 at 8:40
22

Here is the list of commands which helps me:

sudo apt install dconf-cli

# Reinstalling terminal
dconf reset -f /org/gnome/terminal
sudo apt-get remove gnome-terminal
sudo apt-get install gnome-terminal

# Reconfiguring locale
sudo locale-gen --purge
sudo dpkg-reconfigure locales

reboot

As you can see I just reconfigured the locale and reinstall gnome-terminal

5
  • 5
    This works for me. Sep 20, 2018 at 15:49
  • 2
    helped in Ubuntu Bionic Beaver 18.04
    – xealits
    Jan 4, 2020 at 15:33
  • still works on 20.04 on EC2 :)
    – martin
    Feb 1, 2022 at 12:52
  • I incurred this problem after setting the default group to something other than my userid. The commands above fixed the problem for me selecting en_US.UTF-8 as my default locale when prompted. Note: if you elect to install all locales be prepared to wait a while (this isn't necessary, just install what you plan to use).
    – wnm3
    Oct 6, 2022 at 20:19
  • I tried all these options to no avail, as well as setting the language to English (US) in gnome-settings. What finally worked was changing the settings for dates under : Manage Installed Languages > Regional Formats > Display numbers, dates and currencies in the usual format for: English (US)
    – gannex
    Jul 30, 2023 at 20:04
13

This is a winner for me:

/usr/bin/dbus-launch /usr/bin/gnome-terminal &

as learned here

2
  • In my case, I was trying to run gnome-terminal from inside a shell created by Node.js... There was nothing wrong with my locale file and this solution executing it with dbus-launch was the one that really solved the problem for me. Thanks! May 5, 2020 at 19:35
  • I put the following in ~/.bashrc: alias gterm='/usr/bin/dbus-launch /usr/bin/gnome-terminal'
    – VikingGlen
    Jul 20, 2021 at 16:33
6

I had this problem when I created a new Ubuntu 16.04.3 LTS Desktop. The fix was to edit the /etc/default/locale file by adding the following line to the end of the file:

LC_ALL="en_US.UTF-8"

Then reboot and the problem was gone.

6

This might be an issue with your locales. Either add LANG=en_US.UTF-8 to /etc/locale.conf and reboot or delete that file altogether (sudo rm /etc/locale.conf && sudo locale-gen en_US.UTF-8 && sudo dpkg-reconfigure locales) and reboot.

2

Execute sudo dpkg-reconfigure locales in an alternative terminal emulator and select en_US.UTF-8 UTF-8 , choose it as the default locale. gnome-terminal should work.

2

I had to combine answers from @TomH and @BarryPye. To get a gnome-terminal window:

LC_ALL=en_US.UTF-8 /usr/bin/dbus-launch gnome-terminal

In my case, the issue was occuring in a VNC session. I fixed it in my ~/.vnc/xstartup by changing the window manager invocation to:

LC_ALL=en_US.UTF-8 /usr/bin/dbus-launch /bin/gnome-session

Then gnome-terminal starts directly from command or the gnome graphical launcher, without the need to extra dbus-launch commands.

2

I was at work today and desperate to get things moving. I found this

dbus-launch gnome-terminal
1

Another cause of the problem is that new preferences have been activated at the start of the session, check "Applications at startup" Preferences

1

If anyone hits this error using waypipe, the answer above by BarryPye shows the way.

e.g. waypipe --compress lz4 ssh user@host "/usr/bin/dbus-launch /usr/bin/gnome-terminal &"

0

If none of the above works for you, it could be that DBUS_SESSION_BUS_ADDRESS environment variable is not set.

See if it's set with echo $DBUS_SESSION_BUS_ADDRESS.

If it's empty, set it with export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$UID/bus. You could also put this in your ~/.bashrc.

Resourcese: Dconf, can read value but not write it (given address is empty)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .