Comment 92 for bug 328575

Revision history for this message
Cory Davis (cory-d-davis) wrote : Re: Cannot start gnome-terminal because of gconf error

It's not explictly stated here, but this also occurs for other users than root (it's implict in the "doesn't work over
ssh" case).

For me, I run Ubuntu on my home PC with one user name, and have a separate user for my work environment, which I generally access with `su - other_user`. I was a bit flabbergasted when I couldn't launch a "work user" terminal because of this issue, as I done this with gnome-terminal on one of those "other" linux distributions in the past. I adapted the dbus workaround shown above. I'm posting in case someone with the same need but less shell scripting experience (not that this takes much) finds it useful until this is fixed.

#!/bin/sh
eval `dbus-launch --sh-syntax --exit-with-session`
/usr/lib/libgconf2-4/gconfd-2&
if [ -z "$DISPLAY" ]; then
  DISPLAY=:0
  export DISPLAY
fi

title="`whoami`@`uname -n`"
cmd="gnome-terminal --disable-factory --sm-client-disable --window --title \"$title\""
# open six tabs
tab_count=5
i=0
while [ $i -lt $tab_count ]
do
  i=`expr $i + 1`
  cmd="${cmd} --tab --title \"${title}\""
done

eval $cmd < /dev/null > /dev/null 2>&1 &