Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just installed Ubuntu 11.10 and created a new user (and added them to the sudo group).

When I log in as the new user (not root) and try to open gedit I get the following error:

** (gedit:17414): WARNING **: Could not connect to session bus

I've also used ufw to only allow OpenSSH and port 80 connections (if that is relevant?). I am using Putty and Xming to access the server (with exactly the same X11 setup as I've used successfully with other servers in the past).

I've read elsewhere that this is normal behaviour if you're logged in as root, but I am not...

Any ideas what I'm doing wrong?


share|improve this question
What's wrong with vi? :D – Jiri Xichtkniha May 15 '12 at 9:46
Maybe this is the excuse I need to make the switch... :) – Pete W May 15 '12 at 9:51

Hmmm. Looks like a D-Bus problem.

You are probably missing the dbus-launch --autolaunch process, as described in the following mailing-list entries:


In the mailing-list entries, the user had a conflicting dbus machine-id, so the dbus autolaunch process was not starting properly.

Try renaming /var/lib/dbus/machine-id to /var/lib/dbus/machine-id.orig (effectively removing the dbus machine-id, while backing it up), and see if you can get the system to re-generate it (ie: with a reboot or some such).

FYI, if the system doesn't regenerate the dbus machine-id, then you may not be able to load the desktop (graphics) until you've restored the backup id. I'm no dbus or gnome master, so use this tip at your own risk, but it's a pretty good bet that the id will be re-generated.

share|improve this answer
Thanks, but it doesn't seem to have worked for me. I did sudo mv /var/lib/dbus/machine-id /var/lib/dbus/machine-id.orig. Then after rebooting, the file had been regenerated, but I still get the same error as before when trying to open an X11 application... – Pete W May 17 '12 at 13:52
Renaming /machine-id to .orig worked for me. I am on a 64X PC with Ubuntu 12.04 LTS installed. I had the same gedit remote session problem. Thanks to David for the answer. – user126886 Jul 2 '12 at 22:55

In my case, a remote 12.04 server only had a bare minimum of gedit dependencies installed (apt-get install gedit --no-install-recommends). Installing dbus-x11 package solved the problem. dbus-x11 actually contain a missing dbus-launch.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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