LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-22-2012, 03:27 AM   #1
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Rep: Reputation: 13
SSH - X Forwarding - Was working, now 'broken'


Hi all,

I used to have my computers set up brilliantly for me. I have a media computer which has speakers attached and I use SSH X forwarding so I can control Rhythmbox on my netbook. Recently after a Distro upgrade this has all stopped working.

I use
Code:
ssh -X user@server
to start the SSH session and then type rhythmbox to start the program. It now returns the following error:

Code:
rhythmbox
Gtk-Message: Failed to load module "canberra-gtk-module"

** (rhythmbox:4752): WARNING **: Error connecting: Connection refused

** (rhythmbox:4752): WARNING **: Error connecting: Connection refused

** (rhythmbox:4752): WARNING **: Error connecting: Connection refused

** (rhythmbox:4752): WARNING **: Error connecting: Connection refused

** (rhythmbox:4752): WARNING **: Error connecting: Connection refused

** (rhythmbox:4752): WARNING **: Error connecting: Connection refused

** (rhythmbox:4752): WARNING **: Error connecting: Connection refused

(rhythmbox:4752): Rhythmbox-CRITICAL **: Error connecting: Connection refused

** (rhythmbox:4752): WARNING **: Error connecting: Connection refused
It's not just rhythmbox though, as when I try gedit just for testing purposes, a common theme appears.

Code:
 gedit
Gtk-Message: Failed to load module "canberra-gtk-module"

** (gedit:4763): WARNING **: Could not connect to session bus
DuckDuckGoing produces little help in the way of the "Gtk-Message: Failed to load module "canberra-gtk-module"" error message. I have libcanberra-gtk-module, libcanberra-gtk0 and libcanberra-gtk3-0 installed.

My most sincere apologies for this long post, but I've tried to post all the relevant information to aid you gurus in knowing what I'm doing wrong. I'd like to finish this by pointing out I'm not very good with computers, I'm not 'into' computers, I just like them when they work.

Thanks
 
Old 06-22-2012, 04:59 AM   #2
i_joh
Member
 
Registered: Apr 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 5
Check your /etc/ssh/sshd_config on the server side for the line:
X11Forwarding yes

Remove the # at the beginning of the line and either restart the server machine or restart sshd.
 
Old 06-22-2012, 05:13 AM   #3
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
Hi,

Thanks for the fast reply, checked the file and there's not # in the beginning of that line.
 
Old 06-22-2012, 05:28 AM   #4
i_joh
Member
 
Registered: Apr 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 5
Try to run xcalc. Might be a problem with dbus not running. In short, try running something that doesn't require dbus. I'm guessing old xcalc might not require it.
 
1 members found this post helpful.
Old 06-22-2012, 05:44 AM   #5
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
Xcalc works!

What's dbus? Why might it not be running? Do I want it running? I'm running Cinnamon if that's any help on both systems.
 
Old 06-22-2012, 06:00 AM   #6
i_joh
Member
 
Registered: Apr 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 5
Well then we've established that your ssh connection is working for X forwarding. Now if you're able to run that program on the media center box directly then dbus should be allright. (dbus is a program used by programs to communicate with eachother). If dbus is running and your Gnome programs can't connect to it (connection refused message in your terminal output) then this might be a permission problem.

This is interesting:
https://bugs.launchpad.net/ubuntu/+s...nf/+bug/367169

Basically says to check that everything in your ~/.dbus/session-bus directory is owned by you. Try that.
 
Old 06-22-2012, 06:03 AM   #7
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
On the media PC I've done this:

Code:
ls -l ~/.dbus/session-bus
total 4
-rw-r--r-- 1 myuser myuser 463 Jun 21 09:19 3c57545fd9007fcac1f08fcd00001118-0
I've also just double checked, Rhythmbox does run when you launch it from the media computer directly.

Last edited by NotAComputerGuy; 06-22-2012 at 06:07 AM.
 
Old 06-22-2012, 06:11 AM   #8
i_joh
Member
 
Registered: Apr 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 5
Quote:
Originally Posted by NotAComputerGuy View Post
On the media PC I've done this:

Code:
ls -l ~/.dbus/session-bus
total 4
-rw-r--r-- 1 myuser myuser 463 Jun 21 09:19 3c57545fd9007fcac1f08fcd00001118-0
Is 'myuser' your current user account? Run the following as your own user (not as root). Nothing should be displayed. If something is displayed then that means something is not owned by you.

Code:
$ find ~/.dbus/ ! -user $USER
$ find ~/.dbus/ ! -group $USER
 
Old 06-22-2012, 06:15 AM   #9
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
Hi,

Due to paranoia, I have replaced my username with myuser just for the sake of the public domain. I'm sure it's daft but the internet, quite frankly, scares me.

I've Have run both of those, and nothing is returned.
 
Old 06-22-2012, 06:29 AM   #10
i_joh
Member
 
Registered: Apr 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 5
I'm betting on this being a dbus problem. Try this:

Code:
dbus-launch <name of program>
Where program would be the command to launch the program. This will set up some environment variables for the program so that (hopefully) it will connect to dbus.
 
1 members found this post helpful.
Old 06-22-2012, 06:34 AM   #11
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
Wow!

Code:
dbus-launch rhythmbox
Gtk-Message: Failed to load module "canberra-gtk-module"

(rhythmbox:5808): Rhythmbox-WARNING **: Unable to grab media player keys: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface `org.gnome.SettingsDaemon.MediaKeys' on object at path /org/gnome/SettingsDaemon/MediaKeys
But it launched and worked! I guess I can just alias it!

Any suggestions for a 'better' way of doing it would be appreciated.
 
Old 06-22-2012, 06:48 AM   #12
i_joh
Member
 
Registered: Apr 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 5
Quote:
Originally Posted by NotAComputerGuy View Post
Any suggestions for a 'better' way of doing it would be appreciated.
Great! Try to add:

Code:
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
     ## if not found, launch a new one
     eval `dbus-launch --sh-syntax --exit-with-session`
     echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
fi
To your ~/.bash_profile so that it gets run automatically whenever you login through ssh.
 
Old 06-22-2012, 06:53 AM   #13
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
Hi,

Created the file ~/.bash_profile and added that, it works, but it's made ssh go *really* slow and ignore a few of my key strokes. Is that normal? Is there a fix?
 
Old 06-22-2012, 06:57 AM   #14
i_joh
Member
 
Registered: Apr 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 5
Quote:
Originally Posted by NotAComputerGuy View Post
Hi,

Created the file ~/.bash_profile and added that, it works, but it's made ssh go *really* slow and ignore a few of my key strokes. Is that normal? Is there a fix?
Try to reboot if it stays slow. dbus shouldn't mess up ssh at all. Might be the other dbus session that was started that's still around. That shouldn't happen with that code though after you reboot.
 
Old 06-22-2012, 07:12 AM   #15
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
Rebooted and it's still quite slow:

Just an example I typed: Hello, world. This a test.
It came out as: Hllo, wrld Tisis ts

Am I right in thinking if I remove that and just stick to 'dbus-launch' that's a perfectly acceptable way of running programs or does it have potential to cause long term hassle and issues?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
X forwarding though SSH not working: $DISPLAY not set vlsd Linux - Networking 8 12-09-2013 06:40 AM
ssh port forwarding not working tommiy Linux - Networking 1 04-22-2007 08:33 AM
Can't get X forwarding working with SSH. pdeman2 Fedora 21 06-18-2006 02:38 PM
IP forwarding not working on ppp-over-ssh vpn tingdahl Linux - Networking 3 08-27-2004 06:31 PM
ssh X forwarding has stopped working. microtim Linux - Networking 2 09-20-2003 05:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration