[SOLVED] SSH - X Forwarding - Was working, now 'broken'
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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.
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.
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.
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.
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.
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.
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.
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.
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?
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.