내 목표는 전체 데스크탑 환경을 제어할 수 있도록 원격 호스트(Debian 실행)에 연결하는 것입니다. 그래서 다음 게시물에 표시된 대로 vnc/x11vnc를 사용해 보았습니다.
연결하고 싶을 때 Debian 호스트에서 다음 명령을 호출합니다.
❯ x11vnc -rfbauth ~/.vnc/passwd
12/05/2021 06:01:16 passing arg to libvncserver: -rfbauth
12/05/2021 06:01:16 passing argx to libvncserver: /home/massisenergy/.vnc/passwd
12/05/2021 06:01:16 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 3011
12/05/2021 06:01:16 XOpenDisplay("") failed.
12/05/2021 06:01:16 Trying again with XAUTHLOCALHOSTNAME=localhost ...
12/05/2021 06:01:16
12/05/2021 06:01:16 *** XOpenDisplay failed. No -display or DISPLAY.
12/05/2021 06:01:16 *** Trying ":0" in 4 seconds. Press Ctrl-C to abort.
12/05/2021 06:01:16 *** 1 2 3 4
12/05/2021 06:01:20 *** XOpenDisplay of ":0" successful.
12/05/2021 06:01:20
12/05/2021 06:01:20 Using X display :0
12/05/2021 06:01:20 rootwin: 0x143 reswin: 0x2400001 dpy: 0xc74adb40
12/05/2021 06:01:20
12/05/2021 06:01:20 ------------------ USEFUL INFORMATION ------------------
12/05/2021 06:01:20 X DAMAGE available on display, using it for polling hints.
12/05/2021 06:01:20 To disable this behavior use: '-noxdamage'
12/05/2021 06:01:20
12/05/2021 06:01:20 Most compositing window managers like 'compiz' or 'beryl'
12/05/2021 06:01:20 cause X DAMAGE to fail, and so you may not see any screen
12/05/2021 06:01:20 updates via VNC. Either disable 'compiz' (recommended) or
12/05/2021 06:01:20 supply the x11vnc '-noxdamage' command line option.
12/05/2021 06:01:20
12/05/2021 06:01:20 Wireframing: -wireframe mode is in effect for window moves.
12/05/2021 06:01:20 If this yields undesired behavior (poor response, painting
12/05/2021 06:01:20 errors, etc) it may be disabled:
12/05/2021 06:01:20 - use '-nowf' to disable wireframing completely.
12/05/2021 06:01:20 - use '-nowcr' to disable the Copy Rectangle after the
12/05/2021 06:01:20 moved window is released in the new position.
12/05/2021 06:01:20 Also see the -help entry for tuning parameters.
12/05/2021 06:01:20 You can press 3 Alt_L's (Left "Alt" key) in a row to
12/05/2021 06:01:20 repaint the screen, also see the -fixscreen option for
12/05/2021 06:01:20 periodic repaints.
12/05/2021 06:01:20
12/05/2021 06:01:20 XFIXES available on display, resetting cursor mode
12/05/2021 06:01:20 to: '-cursor most'.
12/05/2021 06:01:20 to disable this behavior use: '-cursor arrow'
12/05/2021 06:01:20 or '-noxfixes'.
12/05/2021 06:01:20 using XFIXES for cursor drawing.
12/05/2021 06:01:20 GrabServer control via XTEST.
12/05/2021 06:01:20
12/05/2021 06:01:20 Scroll Detection: -scrollcopyrect mode is in effect to
12/05/2021 06:01:20 use RECORD extension to try to detect scrolling windows
12/05/2021 06:01:20 (induced by either user keystroke or mouse input).
12/05/2021 06:01:20 If this yields undesired behavior (poor response, painting
12/05/2021 06:01:20 errors, etc) it may be disabled via: '-noscr'
12/05/2021 06:01:20 Also see the -help entry for tuning parameters.
12/05/2021 06:01:20 You can press 3 Alt_L's (Left "Alt" key) in a row to
12/05/2021 06:01:20 repaint the screen, also see the -fixscreen option for
12/05/2021 06:01:20 periodic repaints.
12/05/2021 06:01:20
12/05/2021 06:01:20 XKEYBOARD: number of keysyms per keycode 7 is greater
12/05/2021 06:01:20 than 4 and 51 keysyms are mapped above 4.
12/05/2021 06:01:20 Automatically switching to -xkb mode.
12/05/2021 06:01:20 If this makes the key mapping worse you can
12/05/2021 06:01:20 disable it with the "-noxkb" option.
12/05/2021 06:01:20 Also, remember "-remap DEAD" for accenting characters.
12/05/2021 06:01:20
12/05/2021 06:01:20 X FBPM extension not supported.
12/05/2021 06:01:20 X display is capable of DPMS.
12/05/2021 06:01:20 --------------------------------------------------------
12/05/2021 06:01:20
12/05/2021 06:01:20 Default visual ID: 0x21
12/05/2021 06:01:20 Read initial data from X display into framebuffer.
12/05/2021 06:01:20 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/7680
12/05/2021 06:01:20
12/05/2021 06:01:20 X display :0 is 32bpp depth=24 true color
12/05/2021 06:01:20
12/05/2021 06:01:20 Autoprobing TCP port
12/05/2021 06:01:20 Autoprobing selected TCP port 5900
12/05/2021 06:01:20 Autoprobing TCP6 port
12/05/2021 06:01:20 Autoprobing selected TCP6 port 5900
12/05/2021 06:01:20 listen6: bind: Address already in use
12/05/2021 06:01:20 Not listening on IPv6 interface.
12/05/2021 06:01:20
12/05/2021 06:01:20 Xinerama is present and active (e.g. multi-head).
12/05/2021 06:01:20 Xinerama: number of sub-screens: 1
12/05/2021 06:01:20 Xinerama: no blackouts needed (only one sub-screen)
12/05/2021 06:01:20
12/05/2021 06:01:20 fb read rate: 3248 MB/sec
12/05/2021 06:01:20 fast read: reset -wait ms to: 10
12/05/2021 06:01:20 fast read: reset -defer ms to: 10
12/05/2021 06:01:20 The X server says there are 20 mouse buttons.
12/05/2021 06:01:20 screen setup finished.
12/05/2021 06:01:20
The VNC desktop is: debianSR:0
PORT=5900
******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?
The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval. It should work with any VNC viewer. Try it by running:
x11vnc -ncache 10 ...
One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching
12/05/2021 06:01:23 Got connection from client 10.39.3.163
12/05/2021 06:01:23 other clients:
12/05/2021 06:01:23 Normal socket connection
12/05/2021 06:01:23 Disabled X server key autorepeat.
12/05/2021 06:01:23 to force back on run: 'xset r on' (3 times)
12/05/2021 06:01:23 incr accepted_client=1 for 10.39.3.163:57928 sock=11
12/05/2021 06:01:23 Client Protocol Version 3.3
12/05/2021 06:01:23 Protocol version sent 3.3, using 3.3
12/05/2021 06:01:23 created xdamage object: 0x2400040
12/05/2021 06:01:23 client useCopyRect: 10.39.3.163 0
12/05/2021 06:01:23 client_set_net: 10.39.3.163 0.0035
12/05/2021 06:01:24 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x000003F3)
12/05/2021 06:01:24 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x000003EA)
12/05/2021 06:01:24 Enabling full-color cursor updates for client 10.39.3.163
12/05/2021 06:01:24 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000450)
12/05/2021 06:01:24 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000044C)
12/05/2021 06:01:24 Enabling NewFBSize protocol extension for client 10.39.3.163
12/05/2021 06:01:24 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000044D)
12/05/2021 06:01:24 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000451)
12/05/2021 06:01:24 Using zlib encoding for client 10.39.3.163
12/05/2021 06:01:24 Pixel format for client 10.39.3.163:
12/05/2021 06:01:24 32 bpp, depth 32, little endian
12/05/2021 06:01:24 true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
12/05/2021 06:01:24 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x000003F3)
12/05/2021 06:01:24 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x000003EA)
12/05/2021 06:01:24 Enabling full-color cursor updates for client 10.39.3.163
12/05/2021 06:01:24 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000450)
12/05/2021 06:01:24 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000044C)
12/05/2021 06:01:24 Enabling NewFBSize protocol extension for client 10.39.3.163
12/05/2021 06:01:24 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000044D)
12/05/2021 06:01:24 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000451)
12/05/2021 06:01:24 Switching from zlib to zlib Encoding for client 10.39.3.163
12/05/2021 06:01:25 client 1 network rate 386.8 KB/sec (5119.8 eff KB/sec)
12/05/2021 06:01:25 client 1 latency: 0.5 ms
12/05/2021 06:01:25 dt1: 1.6203, dt2: 0.0000 dt3: 0.0005 bytes: 626674
12/05/2021 06:01:25 link_rate: LR_LAN - 1 ms, 386 KB/s
12/05/2021 06:01:26 copy_tiles: allocating first_line at size 61
12/05/2021 06:01:33 created selwin: 0x2400041
12/05/2021 06:01:33 called initialize_xfixes()
12/05/2021 06:01:39 client_count: 0
12/05/2021 06:01:39 Restored X server key autorepeat to: 1
12/05/2021 06:01:39 viewer exited.
12/05/2021 06:01:39 deleted 60 tile_row polling images.
하지만 얼마 후(아마 2분, 아마도 2시간) 작동이 멈췄는데 이유는 모르겠습니다. 다시 시작하면 잠시 동안 다시 작동합니다. 무슨 일이 일어나고 있는지/더 안정적이고 오래 지속되는(최대 8시간) vnc 연결을 설정하는 방법에 대해 알고 계시나요?
이것은 내 startup
파일입니다:
❯ cat ~/.vnc/xstartup
#!/bin/zsh
# unset SESSION_MANAGER
xrdb $HOME/.Xresources
startxfce4 &
/etc/X11/Xsession
- 다른 연결 방법에 대한 제안(예:XPula, 지금 고려 중)도 환영합니다!
- 양방향 클립보드를 사용할 수 없습니다( 에서는 회색으로 표시됨
Screen Sharing.app
). 이를 위해 Debian 호스트의 설정을 변경해야 합니까?
답변1
두 가지 옵션:
- X2Go
이것은 훌륭한 원격 데스크톱 솔루션입니다. 실제로 키보드 레이아웃 전환이 제대로 작동하는 곳을 찾을 수 있는 유일한 솔루션입니다(여러 키 레이아웃을 사용하는 경우). X2Go 서버는 Debian 저장소에서 사용할 수 있습니다. 자체 클라이언트가 필요하며 Mac 버전도 있습니다. - XRDP
이는 또한 작동하며 기본적으로 Microsoft 터미널 서버/RDS 프로토콜을 시작합니다. Debian 저장소에서도 찾을 수 있습니다. 클라이언트의 경우 Microsoft RDS 프로토콜 클라이언트가 필요합니다. Microsoft에는 공식 담당자도 있고 다른 담당자도 있는 것 같습니다.
위의 솔루션은 양방향 클립보드를 제공합니다.
나는 Xpra
원격을 사용했다애플리케이션사용 권한, X 전달보다 빠릅니다. 아직 원격 데스크톱에는 사용하지 않았습니다.
답변2
동시에 사용할 수 없습니다 x11vnc
. tightvnc
그들이 일하는 방식은 완전히 다릅니다. VNC 클라이언트에 액세스할 수 있는 새로운 숨겨진 X 서버를 생성하는 x11vnc
동시에 기존 REAL X 서버에 대한 원격 액세스를 허용합니다 .tightvnc
나는 x11vnc
그것이 당신이 실행하는 명령이기 때문에 당신이 사용하고 싶다고 가정합니다. 이 경우에는 사용 전용이므로 포장 tightvncserver
을 제거해 주십시오 .~/.vnc/xstartup
xstartup
tightvnc
또한 서버를 시작할 때 x11vnc
$DISPLAY 변수가 올바르게 설정되도록 기존 X 세션에서 시작하십시오.
데스크탑 환경에 따라 GUI 모드에서 실행되는 "X11VNC 서버"라는 애플리케이션을 찾아 x11vnc
쉽게 구성할 수 있습니다.
자동으로 시작되게 하려면 xinit를 사용하는 경우 이를 .xinitrc에 추가하세요. 디스플레이 관리자를 사용하는 경우 다음을 참조하세요.이 게시물.