Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am new to using SSH, so sorry if this question is too rudimentary. To sign into my office computer from my home computer through ssh I go through these two steps: first I login to my office server: ssh -X myOfficeServerID@myofficeServer then I sign in to my computer using the local IP: ssh -X myOfficeComputerID@myOfficeComputerIP. I want to be able to view my desktop remotely and work with the GUI.

This is result of running gnome-session:

[myOfficeComputerID@myOfficeComputer]$gnome-session
gnome-session[17491]: WARNING: Unable to determine session: Unable to lookup session information for process '17491'
GNOME_KEYRING_SOCKET=/tmp/keyring-TokklK/socket
SSH_AUTH_SOCK=/tmp/keyring-TokklK/socket.ssh
GNOME_KEYRING_PID=17507

** (gnome-settings-daemon:17510): WARNING **: You can only run one xsettings manager at a time; exiting

** (gnome-settings-daemon:17510): WARNING **: Unable to start xsettings manager: Could not initialize xsettings manager.

** (gnome-settings-daemon:17510): WARNING **: Connection failed, reconnecting...

** (gnome-settings-daemon:17510): WARNING **: Failed to connect context: Connection refused
Window manager warning: Screen 0 on display "localhost:10.0" already has a window manager; try using the --replace option to replace the current window manager.
Window manager warning: Screen 0 on display "localhost:10.0" already has a window manager; try using the --replace option to replace the current window manager.
Starting Dropbox...Connection failure: Connection refused
pa_context_connect() failed: Connection refused
Done!

(polkit-gnome-authentication-agent-1:17571): polkit-gnome-1-WARNING **: Unable to determine the session we are in: Remote Exception invoking org.freedesktop.ConsoleKit.Manager.GetSessionForUnixProcess() on /org/freedesktop/ConsoleKit/Manager at name org.freedesktop.ConsoleKit: org.freedesktop.ConsoleKit.Manager.GeneralError: Unable to lookup session information for process '17571' org.freedesktop.ConsoleKit.Manager.GeneralError Unable%20to%20lookup%20session%20information%20for%20process%20%2717571%27
system-config-printer-applet: failed to start NewPrinterNotification service

** (gnome-panel:17538): CRITICAL **: panel_applet_frame_change_background: assertion `PANEL_IS_WIDGET (GTK_WIDGET (frame)->parent)' failed

** (nm-applet:17578): WARNING **: <WARN>  request_name(): Could not acquire the NetworkManagerUserSettings service.
  Error: (9) Connection ":1.261" is not allowed to own the service "org.freedesktop.NetworkManagerUserSettings" due to security policies in the configuration file

Failed to play sound: Not available

** (gnome-volume-control-applet:17590): WARNING **: Connection failed, reconnecting...

** (gnome-volume-control-applet:17590): WARNING **: Failed to connect context: Connection refused
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension

** (gnome-volume-control-applet:17590): WARNING **: Connection failed, reconnecting...

** (gnome-volume-control-applet:17590): WARNING **: Failed to connect context: Connection refused

** (gnome-settings-daemon:17510): WARNING **: Grab failed for some keys, another application may already have access the them.

** (gnome-settings-daemon:17510): WARNING **: Clipboard manager is already running.

** (gnome-settings-daemon:17510): WARNING **: Connection failed, reconnecting...

** (gnome-settings-daemon:17510): WARNING **: Failed to connect context: Connection refused
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
failed to create drawable
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension
^CTraceback (most recent call last):
  File "/usr/share/system-config-printer/applet.py", line 434, in <module>
    waitloop.run()
KeyboardInterrupt
** Message: Got disconnected from the session message bus; retrying to reconnect every 10 seconds

(gnome-settings-daemon:17510): GConf-WARNING **: Directory `/desktop/gtk' was not being monitored by GConfClient 0xda21e0

(gnome-settings-daemon:17510): GConf-WARNING **: Directory `/desktop/gnome/interface' was not being monitored by GConfClient 0xda21e0

(gnome-settings-daemon:17510): GConf-WARNING **: Directory `/apps/gnome_settings_daemon/gtk-modules' was not being monitored by GConfClient 0xda21e0

(gnome-settings-daemon:17510): GConf-WARNING **: Directory `/desktop/gnome/font_rendering' was not being monitored by GConfClient 0xda21e0

(gnome-settings-daemon:17510): GConf-WARNING **: Directory `/desktop/gnome/sound' was not being monitored by GConfClient 0xda21e0
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-gk7tyDBsRK: Connection refused)
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-gk7tyDBsRK: Connection refused)
[myOfficeComputerID@myOfficeComputer ~]$ 
(gnome-settings-daemon:17510): GConf-WARNING **: Directory `/desktop/gnome/peripherals/mouse' was not being monitored by GConfClient 0xda21e0
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-gk7tyDBsRK: Connection refused)
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-gk7tyDBsRK: Connection refused)
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-gk7tyDBsRK: Connection refused)
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-gk7tyDBsRK: Connection refused)
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-gk7tyDBsRK: Connection refused)
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-gk7tyDBsRK: Connection refused)
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-gk7tyDBsRK: Connection refused)
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-gk7tyDBsRK: Connection refused)
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-gk7tyDBsRK: Connection refused)
^C

These commands keep on continuing non stop until I press ^C as you saw in the commands:

Initializing nautilus-gdu extension
Initializing nautilus-open-terminal extension
Initializing nautilus-dropbox 1.4.0
Shutting down dropbox extension
Shutting down nautilus-open-terminal extension
Shutting down nautilus-gdu extension

In the mean while things like firefox run from my office computer but the bottom panel won't stop loading things.

share|improve this question
    
ssh -X is usually too slow to work comfortably with, even if you just start a single application like Firefox and even if you are on local network, because most graphical applications rely on extensions like SHM to perform decently. Use something like VNC over SSH or X2Go –  pqnet Sep 2 at 1:29

3 Answers 3

up vote 4 down vote accepted

Both SSH sessions need to be started using the -X option.

However, if you want your entire session, you may want to think about using something like X2go because it compresses images and has some proxies which make this a lot less bandwidth hungry AND it can restore sessions ...

And running the entire gnome-session can have unpleasant side effects, when your remote gnome-session starts a remote metacity which replaces your local window manager.

Your additional imformation shows the "unpleasant side effects" I mentioned. You cannot simply run gnome-session when you already have a desktop environment running, because gnome-session will try to take over and your running desktop environment won't let it that easily. For a X program it makes exactly no difference whether run remotely via SSH or locally.

Depending on what you want to achieve you can start a xnest session and use that for your remote gnome-session.

xnest -geometry 1280x1024 :123 &
DISPLAY=:123 ssh -X firsthop
ssh -X secondhop
gnome-session

NOTE: In some distributions the binary is named Xnest with a capital x.

share|improve this answer
    
I am sorry if I hadn't expalined properly, I edited my question: both SSH commands do have a -X but still it doesn't work! –  makhlaghi Sep 1 '12 at 5:58
1  
does running a remote xterm work? –  Bananguin Sep 1 '12 at 6:44
    
Yes, xterm works. –  makhlaghi Sep 1 '12 at 7:00
    
I updated the question. –  makhlaghi Sep 1 '12 at 7:02
1  
It would be easy for the readers if you could correct the command from xnest to Xnest. Thanks again for helping me understand the problem and the solution. –  makhlaghi Sep 2 '12 at 12:33

Maybe you have just forgotten the command: xhost + (just before the ssh command: ssh -XY username@servername).

share|improve this answer
    
xhost + will open access to everybody. Bad idea ... –  Matteo May 27 at 10:01

I have run into the same error, that a bunch of File Browser (nautilus) instances open and I cannot connect properly to my account.

The reason as I found out today is, that I had this line in my ~.cshrc : "setenv DISPLAY unix:0.0"

After commenting it out, everything works fine. So apparently the display is set twice when connecting via ssh, once per ssh and once per user-cshrc, resulting in some chaos.

share|improve this answer

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.