내 집 컴퓨터에서 SSH를 통해 내 사무실 컴퓨터에 로그인하려면 다음 두 단계를 수행해야 합니다. 먼저 내 사무실 서버에 로그인합니다. ssh -X myOfficeServerID@myofficeServer
그런 다음 로컬 IP를 사용하여 내 컴퓨터에 로그인합니다 ssh -X myOfficeComputerID@myOfficeComputerIP
. 내 데스크탑을 원격으로 보고 GUI를 사용할 수 있기를 원합니다.
이것은 실행 결과입니다 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
명령에서 볼 수 있듯이 이 명령은 ^C를 누를 때까지 중단 없이 계속 실행됩니다.
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
동시에 내 사무실 컴퓨터에서 실행하는 것과 비슷 firefox
하지만 하단 패널에서 항목 로드가 중단되지 않습니다.
답변1
두 SSH 세션 모두 -X 옵션을 사용하여 시작해야 합니다.
그러나 전체 세션을 원할 경우 다음과 같은 것을 사용하는 것이 좋습니다.엑스투고이미지를 압축하고 일부 프록시를 포함하므로 대역폭 소비가 훨씬 줄어들고 세션을 다시 시작할 수 있습니다.
원격 gnome 세션이 로컬 창 관리자 대신 원격 메타시티를 시작할 때 전체 gnome 세션을 실행하면 불쾌한 부작용이 발생할 수 있습니다.
귀하의 추가 정보에는 제가 언급한 "불쾌한 부작용"이 나와 있습니다. gnome-session
gnome-session이 인계를 시도하고 실행 중인 데스크탑 환경에서는 이를 쉽게 수행할 수 없기 때문에 이미 실행 중인 데스크톱 환경이 있을 때 간단히 실행할 수는 없습니다 . X 프로그램이 SSH를 통해 원격으로 실행되거나 로컬로 실행되는지 여부는 차이가 없습니다.
달성하려는 목표에 따라 xnest
세션을 시작하고 원격 gnome 세션과 함께 사용할 수 있습니다.
xnest -geometry 1280x1024 :123 &
DISPLAY=:123 ssh -X firsthop
ssh -X secondhop
gnome-session
참고: 일부 배포판에서는 바이너리 이름이 Xnest
대문자 x로 지정됩니다.
답변2
동일한 오류가 발생하여 파일 탐색기(노틸러스) 인스턴스를 여러 개 열었지만 계정에 제대로 연결할 수 없습니다.
오늘 제가 발견한 이유는 ~.cshrc에 다음 줄이 있기 때문입니다: "setenv DISPLAY unix:0.0"
주석을 달고 나면 모든 것이 잘 작동합니다. 따라서 SSH를 통해 연결할 때 디스플레이가 SSH당 한 번, 사용자-cshrc당 한 번씩 두 번 설정되어 약간의 혼란을 야기합니다.
답변3
그래픽 세션은 SSH를 통해 시작할 수 없으며 VNC 서버 또는 원격 데스크톱 연결을 사용해야 합니다. SSH는 사용자가 시스템에 로그인하는 방식으로 액세스 권한이 있는 X-Session에 대한 gnome 세션을 열 수 없기 때문에 쉘 액세스만 제공합니다. 따라서 목표가 완전한 그래픽 데스크탑(RealVNC와 같은 VNC 뷰어를 통해 연결할 수 있음)을 얻는 것이라면 VNC를 사용하십시오. 컴퓨터에 VNC 서버를 설치하여 설정할 수 있습니다 tightvncserver
. 설치가 완료되면 셸에 다음을 입력하여 VNC 서버를 시작할 수 있습니다.tightvnc
username@hostname $tightvncserver --geometry 1024x760
답변4
어쩌면 당신은 명령을 잊어버렸을 수도 있습니다: ( xhost +
ssh 명령 바로 앞에:) ssh -XY username@servername
.