8

My gnome-terminal 3.16.2-1 stopped working after a system update. I am running Linux arch 4.1.6-1-ARCH #1 SMP PREEMPT Mon Aug 17 08:52:28 CEST 2015 x86_64 GNU/Linux.

When launching it I recieve

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 org.gnome.Terminal exited with status 8

Googling the problem told me to re-set the locale settings. For that I opened /etc/locale.gen and made sure that en_US.UTF-8 UTF-8 was uncommented.

I then ran sudo locale-gen to generate the locales. To top things off I also ran localectl set-locale LANG=en_US.UTF-8 and rebooted.

When the problem first arose I did recieve an error message that had to do with the locale. After doing the previous steps those error messages disappeared, but gnome-terminal still does not work. The above error message remains.

Strange behaviour that I can otherwise observe:

My Nautilus file manager will not start from the desktop shortcut, but does start without problems from the console.

gnome-terminal does launch when run as root.

locale outputs:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

localectl outputs

System Locale: LANG=en_US.UTF-8
   VC Keymap: us
  X11 Layout: us,de
  • There was no ~/.profile so I created that file and put it in there. It is the only text in the file, is that right? Even after rebooting it does not work. – kunterbunt Sep 21 '15 at 19:58
  • Okay apparently bash looks for existing files in /etc/profile and then ~/.bash_profile, ~/.bash_login, ~/.profile in that order until it finds an existing one. I had a ~/.bash_profile so I added the language setting to that as well as to /etc/profile but to no avail. Thanks for your help though. – kunterbunt Sep 21 '15 at 20:12
  • Appended outputs in my edit. – kunterbunt Sep 21 '15 at 20:22
  • Sorry, this took me a while to get done. No, it does not work for another user either. Same behavior. – kunterbunt Sep 21 '15 at 21:38
  • I have exactly the same problem, but have no idea how to solve it. I'll try to downgrade some stuff, to see if it works again. – aexl Sep 21 '15 at 22:44
7

Solution:

Run in the terminal (alt+ctrl+F1 if you have only gnome-terminal installed), but remember is not permanent so after reboot you will need to do it again:

dbus-update-activation-environment --all

Or to solve it permanently (assuming that you have missing script in your /etc/X11/xinit/xinitrc.d see explanation for more details) load in your ~/.xinitrc proper scripts:

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
  for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

Make notice that this will work only if you will have proper script in /etc/X11/xinit/xinitrc.d

Explanation:

In my case the problem was missing DISPLAY variable for D-Bus session services. Due to that, I could not start gnome-terminal nor nautilius.

I am using Arch Linux with Slim and some customized .xinitrc. Due to that, I missed loading additional stuff from /etc/X11/xinit/xinitrc.d/. In case of Arch Linux there is script called 50-systemd-user.sh which takes care of setting up a proper environment for a D-Bus session. In my case it looks like this:

#!/bin/sh

systemctl --user import-environment DISPLAY XAUTHORITY

if which dbus-update-activation-environment >/dev/null 2>&1; then
    dbus-update-activation-environment DISPLAY XAUTHORITY
fi

My understanding is that the DISPLAY and XAUTHORITY variables are imported into the systemd manager environment block and also to dbus-daemon --session which use those variables when activating session services. Some applications (it also depends on how they are called) fail due to missing those variables during start.

  • Worked for me. I was getting error code 10 with gnome-terminal on a frash install of Arch Linux with gnome. – Marcel Mar 22 '16 at 22:28
  • This did not work for me on Ubuntu 16.04. – Cerin Feb 3 '17 at 15:24
  • using "systemctl --user import-environment DISPLAY XAUTHORITY" fixes my broken gnome-terminal that I like to run on Windows under Cygwin (using ssh forwarding and running gnome-terminal off my Debian box). Running that command first fixes gnome-terminal and it appears again on the X server machine! – Professor Falken Apr 11 '17 at 23:33
4

I added the following line to ~/.profile It sets DBUS_SESSION_BUS_ADDRESS variable. It solved the problem for me.

eval `dbus-launch --sh-syntax`
0

Append the following line at the bottom of ~/.bashrc and a reboot works for me

dbus-update-activation-environment --all
  • 1
    This did not work for me. – Cerin Feb 3 '17 at 15:20
0

In my case,after changing localectl, I modified my .vnc/xstartup file by commenting out this line below:-

gnome-session --session=gnome-flashback-metacity --disable-acceleration-check --debug &

Here's how my .vnc/xstartup looks like:

#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
export XKL_XMODMAP_DISABLE=1
export XDG_CURRENT_DESKTOP="GNOME-Flashback:Unity"
export XDG_MENU_PREFIX="gnome-flashback-"
unset DBUS_SESSION_BUS_ADDRESS

#gnome-session --session=gnome-flashback-metacity --disable-acceleration-check --debug &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.