Yvon
Yvon

Reputation: 2993

Getting gnome-terminal via SSH and Xming

I'm running Ubuntu 16.04 in VirtualBox with a hosted network adapter, everything on Windows. I have set up openssh on Ubuntu listening to port 3220. I can log on successfully with PuTTY, I can run nautilus, gedit, etc. and get the GUI by Xming with no problem. Now when I run gnome-terminal I get an error

Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Could not connect: Connection refused

I changed DISPLAY to several different possible values but none could work. Some SO answers suggest either :0 or :1. Someone else suggested putting IP address in front of the column symbol, and I tried all. The default value in my system is localhost:10.0.

My question is: There are 3 display "numbers" present in my setting. Xming claims its server at 0.0, PuTTY has a value in configuration (default when unset is :0), and Ubuntu (via SSH) has a variable DISPLAY. What are the relations between these numbers, and how should I coordinate them to get things work?

Upvotes: 2

Views: 3035

Answers (2)

Akhilesh Siddhanti
Akhilesh Siddhanti

Reputation: 100

I had the same error. A satisfactory solution is to press ALT-F2, type in xterm and execute the following:

dbus-update-activation-environment --all

Now, try running:

gnome-terminal

If it works fine, good. However, this will revert after reboot. You can make it permanent by adding it to /etc/profile.

echo "dbus-update-activation-environment --all" | sudo tee -a /etc/profile

Now try running nautilus and gnome-terminal on boot up.

Upvotes: 4

Yvon
Yvon

Reputation: 2993

There has been a discussion in this issue. The following should work around the problem.

dbus-launch gnome-terminal

Upvotes: 2

Related Questions