Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

Thanks!

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
add comment

2 Answers

Hmmm. Looks like a D-Bus problem.

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

  1. http://lists.fedoraproject.org/pipermail/test/2011-July/101118.html
  2. http://lists.fedoraproject.org/pipermail/test/2011-July/101119.html

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
add comment

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
add comment

Your Answer

 
discard

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.