Форум русскоязычного сообщества Ubuntu


Хотите сделать посильный вклад в развитие Ubuntu и русскоязычного сообщества?
Помогите нам с документацией!

Автор Тема: Просмотр рабочего стола по VNC  (Прочитано 3555 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн AlexeyVAG

  • Автор темы
  • Новичок
  • *
  • Сообщений: 6
    • Просмотр профиля
Добрый день, есть такой вопрос:

Есть компьютер на нем стоит Xubuntu и работает оператор под пользователем operator. У меня есть доступ к этому компьютеру по SSH под пользователем administrator (с полными правами), как можно подключившись по SSH поставить там сервер VNC чтобы подключившись увидеть что делает operator и помочь ему ???

Заранее благодарю за помощь


=================================================================

Решение таково:
Устанавливаем x11vnc, затем смотрим по процессам Х кто залогинен ps aux | grep X и запускаем VNC сервер c правами root sudo x11vnc -auth /var/run/lightdm/root/:0 и все работаем видно что делает человек за компьютером и можно ему помочь и подсказать что и требовалось сделать =)
Потом я еще добавил ключ -noxdamage который как я понял отключает графические украшательства Use x11vnc -noxdamage or disable the Beryl/Compiz app., т.к. при работе постоянно вываливалась такая ошибка.

« Последнее редактирование: 06 Мая 2014, 11:32:00 от AlexeyVAG »

Оффлайн victor00000

  • Старожил
  • *
  • Сообщений: 15568
  • Глухонемой (Deaf)
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #1 : 05 Мая 2014, 13:33:51 »
ps aux | grep X?
Wars ~.o

Оффлайн AlexeyVAG

  • Автор темы
  • Новичок
  • *
  • Сообщений: 6
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #2 : 05 Мая 2014, 13:40:49 »
ps aux | grep X?
kradministrator@pavlovskaya-terminal:~$ sudo ps aux | grep X
root      1049  1.2  3.1 134680 60224 tty7     Ssl+ 11:21   1:44 /usr/bin/X -core :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
nx        1395  0.0  1.6 103432 31732 ?        Sl   11:21   0:01 /usr/NX/bin/nxserver.bin root 1077 --startup
nx        1464  0.0  1.5  59332 30712 ?        Sl   11:21   0:01 /usr/NX/bin/nxserver.bin --localsession
nx        1470  0.0  0.1  53444  3400 ?        Sl   11:21   0:00 /usr/NX/bin/nxd
cinema    1678  0.0  0.0   2272   552 ?        Ss   11:21   0:00 /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc
cinema    2073  0.0  1.4 211708 28004 ?        S<l  11:21   0:02 /usr/NX/bin/nxnode.bin
cinema    2102  0.0  0.9 153272 17788 ?        Sl   11:21   0:00 /usr/NX/bin/nxclient.bin --monitor --pid 1604
1000      3865  0.0  0.3  12028  6084 pts/1    S    12:59   0:00 Xvnc4 :1 -desktop pavlovskaya-terminal:1 (kradministrator) -auth /home/kradministrator/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /home/kradministrator/.vnc/passwd -rfbport 5901 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb
1000      4037  0.0  0.0   5948   828 pts/1    S+   13:37   0:00 grep --color=auto X


NX и VNC4SERVER это я пытался сделать... безуспешно...

Оффлайн victor00000

  • Старожил
  • *
  • Сообщений: 15568
  • Глухонемой (Deaf)
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #3 : 05 Мая 2014, 13:44:20 »
sudo x11vnc -auth /var/run/lightdm/root/:0
Wars ~.o

Оффлайн AlexeyVAG

  • Автор темы
  • Новичок
  • *
  • Сообщений: 6
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #4 : 05 Мая 2014, 13:52:18 »
sudo x11vnc -auth /var/run/lightdm/root/:0

Запускаю Viewer у себя выскакивает окно и тут-же закрывается без ошибок... (Remmina)

После запуска x11VNC
kradministrator@pavlovskaya-terminal:~$ sudo x11vnc -auth /var/run/lightdm/root/:0
###############################################################
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  **  WARNING  **  WARNING  **  WARNING  **  WARNING  **   @#
#@                                                           @#
#@        YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!!        @#
#@                                                           @#
#@  This means anyone with network access to this computer   @#
#@  may be able to view and control your desktop.            @#
#@                                                           @#
#@ >>> If you did not mean to do this Press CTRL-C now!! <<< @#
#@                                                           @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  You can create an x11vnc password file by running:       @#
#@                                                           @#
#@       x11vnc -storepasswd password /path/to/passfile      @#
#@  or   x11vnc -storepasswd /path/to/passfile               @#
#@  or   x11vnc -storepasswd                                 @#
#@                                                           @#
#@  (the last one will use ~/.vnc/passwd)                    @#
#@                                                           @#
#@  and then starting x11vnc via:                            @#
#@                                                           @#
#@      x11vnc -rfbauth /path/to/passfile                    @#
#@                                                           @#
#@  an existing ~/.vnc/passwd file from another VNC          @#
#@  application will work fine too.                          @#
#@                                                           @#
#@  You can also use the -passwdfile or -passwd options.     @#
#@  (note -passwd is unsafe if local users are not trusted)  @#
#@                                                           @#
#@  Make sure any -rfbauth and -passwdfile password files    @#
#@  cannot be read by untrusted users.                       @#
#@                                                           @#
#@  Use x11vnc -usepw to automatically use your              @#
#@  ~/.vnc/passwd or ~/.vnc/passwdfile password files.       @#
#@  (and prompt you to create ~/.vnc/passwd if neither       @#
#@  file exists.)  Under -usepw, x11vnc will exit if it      @#
#@  cannot find a password to use.                           @#
#@                                                           @#
#@                                                           @#
#@  Even with a password, the subsequent VNC traffic is      @#
#@  sent in the clear.  Consider tunnelling via ssh(1):      @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/#tunnelling            @#
#@                                                           @#
#@  Or using the x11vnc SSL options: -ssl and -stunnel       @#
#@                                                           @#
#@  Please Read the documention for more info about          @#
#@  passwords, security, and encryption.                     @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/faq.html#faq-passwd    @#
#@                                                           @#
#@  To disable this warning use the -nopw option, or put     @#
#@  'nopw' on a line in your ~/.x11vncrc file.               @#
#@                                                           @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
###############################################################
05/05/2014 13:47:58 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 4067
05/05/2014 13:47:58 XOpenDisplay("") failed.
05/05/2014 13:47:58 Trying again with XAUTHLOCALHOSTNAME=localhost ...
05/05/2014 13:47:58
05/05/2014 13:47:58 *** XOpenDisplay failed. No -display or DISPLAY.
05/05/2014 13:47:58 *** Trying ":0" in 4 seconds.  Press Ctrl-C to abort.
05/05/2014 13:47:58 *** 1 2 3 4
05/05/2014 13:48:02 *** XOpenDisplay of ":0" successful.
05/05/2014 13:48:02
05/05/2014 13:48:02 Using X display :0
05/05/2014 13:48:02 rootwin: 0x8f reswin: 0x1c00001 dpy: 0x9e6e1e8
05/05/2014 13:48:02
05/05/2014 13:48:02 ------------------ USEFUL INFORMATION ------------------
05/05/2014 13:48:02 X DAMAGE available on display, using it for polling hints.
05/05/2014 13:48:02   To disable this behavior use: '-noxdamage'
05/05/2014 13:48:02
05/05/2014 13:48:02   Most compositing window managers like 'compiz' or 'beryl'
05/05/2014 13:48:02   cause X DAMAGE to fail, and so you may not see any screen
05/05/2014 13:48:02   updates via VNC.  Either disable 'compiz' (recommended) or
05/05/2014 13:48:02   supply the x11vnc '-noxdamage' command line option.
05/05/2014 13:48:02
05/05/2014 13:48:02 Wireframing: -wireframe mode is in effect for window moves.
05/05/2014 13:48:02   If this yields undesired behavior (poor response, painting
05/05/2014 13:48:02   errors, etc) it may be disabled:
05/05/2014 13:48:02    - use '-nowf' to disable wireframing completely.
05/05/2014 13:48:02    - use '-nowcr' to disable the Copy Rectangle after the
05/05/2014 13:48:02      moved window is released in the new position.
05/05/2014 13:48:02   Also see the -help entry for tuning parameters.
05/05/2014 13:48:02   You can press 3 Alt_L's (Left "Alt" key) in a row to
05/05/2014 13:48:02   repaint the screen, also see the -fixscreen option for
05/05/2014 13:48:02   periodic repaints.
05/05/2014 13:48:02
05/05/2014 13:48:02 XFIXES available on display, resetting cursor mode
05/05/2014 13:48:02   to: '-cursor most'.
05/05/2014 13:48:02   to disable this behavior use: '-cursor arrow'
05/05/2014 13:48:02   or '-noxfixes'.
05/05/2014 13:48:02 using XFIXES for cursor drawing.
05/05/2014 13:48:02 GrabServer control via XTEST.
05/05/2014 13:48:02
05/05/2014 13:48:02 Scroll Detection: -scrollcopyrect mode is in effect to
05/05/2014 13:48:02   use RECORD extension to try to detect scrolling windows
05/05/2014 13:48:02   (induced by either user keystroke or mouse input).
05/05/2014 13:48:02   If this yields undesired behavior (poor response, painting
05/05/2014 13:48:02   errors, etc) it may be disabled via: '-noscr'
05/05/2014 13:48:02   Also see the -help entry for tuning parameters.
05/05/2014 13:48:02   You can press 3 Alt_L's (Left "Alt" key) in a row to
05/05/2014 13:48:02   repaint the screen, also see the -fixscreen option for
05/05/2014 13:48:02   periodic repaints.
05/05/2014 13:48:02
05/05/2014 13:48:02 XKEYBOARD: number of keysyms per keycode 7 is greater
05/05/2014 13:48:02   than 4 and 51 keysyms are mapped above 4.
05/05/2014 13:48:02   Automatically switching to -xkb mode.
05/05/2014 13:48:02   If this makes the key mapping worse you can
05/05/2014 13:48:02   disable it with the "-noxkb" option.
05/05/2014 13:48:02   Also, remember "-remap DEAD" for accenting characters.
05/05/2014 13:48:02
05/05/2014 13:48:02 X FBPM extension not supported.
05/05/2014 13:48:02 X display is capable of DPMS.
05/05/2014 13:48:02 --------------------------------------------------------
05/05/2014 13:48:02
05/05/2014 13:48:02 Default visual ID: 0x20
05/05/2014 13:48:02 Read initial data from X display into framebuffer.
05/05/2014 13:48:02 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5464
05/05/2014 13:48:02 WARNING: Width (1366) is not a multiple of 4. VncViewer has problems with that.
05/05/2014 13:48:02
05/05/2014 13:48:02 X display :0 is 32bpp depth=24 true color
05/05/2014 13:48:02
05/05/2014 13:48:02 Autoprobing TCP port
05/05/2014 13:48:02 Autoprobing selected TCP port 5900
05/05/2014 13:48:02 Autoprobing TCP6 port
05/05/2014 13:48:02 Autoprobing selected TCP6 port 5900
05/05/2014 13:48:02 listen6: bind: Address already in use
05/05/2014 13:48:02 Not listening on IPv6 interface.
05/05/2014 13:48:02
05/05/2014 13:48:02 Xinerama is present and active (e.g. multi-head).
05/05/2014 13:48:02 Xinerama: number of sub-screens: 1
05/05/2014 13:48:02 Xinerama: no blackouts needed (only one sub-screen)
05/05/2014 13:48:02
05/05/2014 13:48:02 fb read rate: 488 MB/sec
05/05/2014 13:48:02 fast read: reset -wait  ms to: 10
05/05/2014 13:48:02 fast read: reset -defer ms to: 10
05/05/2014 13:48:02 The X server says there are 10 mouse buttons.
05/05/2014 13:48:02 screen setup finished.
05/05/2014 13:48:02
05/05/2014 13:48:02 WARNING: You are running x11vnc WITHOUT a password.  See
05/05/2014 13:48:02 WARNING: the warning message printed above for more info.
05/05/2014 13:48:02

The VNC desktop is:      pavlovskaya-terminal: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

Потом пытаюсь подключиться...
05/05/2014 13:48:41 Got connection from client 192.168.5.79
05/05/2014 13:48:41   other clients:
05/05/2014 13:48:41 Normal socket connection
05/05/2014 13:48:41 Disabled X server key autorepeat.
05/05/2014 13:48:41   to force back on run: 'xset r on' (3 times)
05/05/2014 13:48:41 incr accepted_client=1 for 192.168.5.79:38057  sock=11
05/05/2014 13:48:41 Client Protocol Version 3.8
05/05/2014 13:48:41 Protocol version sent 3.8, using 3.8
05/05/2014 13:48:41 rfbProcessClientSecurityType: executing handler for type 1
05/05/2014 13:48:41 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
05/05/2014 13:48:41 copy_tiles: allocating first_line at size 44
05/05/2014 13:48:41 Pixel format for client 192.168.5.79:
05/05/2014 13:48:41   8 bpp, depth 8
05/05/2014 13:48:41   true colour: max r 7 g 7 b 3, shift r 0 g 3 b 6
05/05/2014 13:48:41 rfbProcessClientNormalMessage: ignoring unsupported encoding type ultraZip
05/05/2014 13:48:41 Using compression level 9 for client 192.168.5.79
05/05/2014 13:48:41 Using image quality level 0 for client 192.168.5.79
05/05/2014 13:48:41 Using JPEG subsampling 1, Q15 for client 192.168.5.79
05/05/2014 13:48:41 Enabling X-style cursor updates for client 192.168.5.79
05/05/2014 13:48:41 Enabling full-color cursor updates for client 192.168.5.79
05/05/2014 13:48:41 Enabling cursor position updates for client 192.168.5.79
05/05/2014 13:48:41 Enabling KeyboardLedState protocol extension for client 192.168.5.79
05/05/2014 13:48:41 Enabling NewFBSize protocol extension for client 192.168.5.79
05/05/2014 13:48:41 Enabling LastRect protocol extension for client 192.168.5.79
05/05/2014 13:48:41 Enabling SupportedMessages protocol extension for client 192.168.5.79
05/05/2014 13:48:41 Enabling SupportedEncodings protocol extension for client 192.168.5.79
05/05/2014 13:48:41 Enabling ServerIdentity protocol extension for client 192.168.5.79
05/05/2014 13:48:41 Using tight encoding for client 192.168.5.79
05/05/2014 13:48:41 rfbSendUpdateBuf: write: Connection reset by peer
05/05/2014 13:48:41 client_count: 0
05/05/2014 13:48:41 Restored X server key autorepeat to: 1
05/05/2014 13:48:41 viewer exited.
05/05/2014 13:48:41 deleted 43 tile_row polling images.


Оффлайн victor00000

  • Старожил
  • *
  • Сообщений: 15568
  • Глухонемой (Deaf)
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #5 : 05 Мая 2014, 14:07:24 »
/etc/rc.local
...
...
...
while true
do
echo "|======| x11vnc START `date +%T` |=======|"
x11vnc -auth /var/run/lightdm/root/:0
sleep 5
done &>/tmp/x11vnc.log &
...
...
exit 0
и ребут.
смотри лог /tmp/x11vnc.log
Wars ~.o

Оффлайн hon

  • Старожил
  • *
  • Сообщений: 1044
  • Ubuntu 12.04 LTS
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #6 : 05 Мая 2014, 16:13:22 »
Предлагаю сделать проще. Настроить vino-server (удаленный доступ к рабочему столу), затем подключится через Reminna.

Оффлайн AlexeyVAG

  • Автор темы
  • Новичок
  • *
  • Сообщений: 6
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #7 : 05 Мая 2014, 17:03:53 »
Пока не могу перезагрузить тот компютер т.к. на нем работают....

Попробовал gvncviewer работает, наверное проблема Remmina, только тормозит сильно, как ограничить кол-во цветов и качество??

Поставил старый Vinagre тоже все работает, значит точно проблема в клиенте
« Последнее редактирование: 05 Мая 2014, 17:17:27 от AlexeyVAG »

Оффлайн hon

  • Старожил
  • *
  • Сообщений: 1044
  • Ubuntu 12.04 LTS
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #8 : 05 Мая 2014, 17:51:45 »
Для настройки vino-server не требуется перезагрузка. Тем более, он работает от имени обычного пользователя. Качество и кол-во цветов можно ограничить в настройках подключения в Reminna.

Оффлайн xeon_greg

  • Активист
  • *
  • Сообщений: 981
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #9 : 05 Мая 2014, 18:45:59 »
установи teamviewer и не мучайся

Оффлайн hon

  • Старожил
  • *
  • Сообщений: 1044
  • Ubuntu 12.04 LTS
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #10 : 05 Мая 2014, 19:14:24 »
Какой TeamViewer? Он проприетатный, ненадежный, медленный и завязан на сервере TeamViewer.
На компьютере, к которому нужно подключатся нужно настроить vino-server.
На компьютере, с которого нужно подключатся нужно настроить reminna.

Оффлайн AnrDaemon

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 28366
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #11 : 05 Мая 2014, 19:49:01 »
Проприетарный - согласен.
Медленный - очень спорно.
Ненадёжный - ? Извините, но надежнее я пока ничего не видел. Работаете везде, где мне приходилось им пользоваться.
Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…

Оффлайн hon

  • Старожил
  • *
  • Сообщений: 1044
  • Ubuntu 12.04 LTS
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #12 : 05 Мая 2014, 19:54:17 »
Медленные, потому что использует сервер TeamViewer. Получается прокси.
Ненадежный, потому что компания TeamViewer может записывать и перехватывать сеансы.
Также, будучи проприетатным TeamViewer может содержать бекдоры, баги и прочее.
Также, в случае недоступности сервера TeamViewer (могут, например, обанкротиться) сеанс установиьт будет невозможно.

Оффлайн xeon_greg

  • Активист
  • *
  • Сообщений: 981
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #13 : 06 Мая 2014, 10:43:10 »
слишком много всяких потому и может. холиварить не буду. если надо быстро и не заморачиваться тим - самое оно, если есть время и желание повозиться - есть варианты... да и выбор делать ТС

Оффлайн AlexeyVAG

  • Автор темы
  • Новичок
  • *
  • Сообщений: 6
    • Просмотр профиля
Re: Просмотр рабочего стола по VNC
« Ответ #14 : 06 Мая 2014, 11:31:29 »
Пора заканчивать споры, TeamViewer не подходит по условиям задачи, так как надо просить человека что-бы он скачивал и устанавливал. Вариант с x11VNC оказался рабочим, единственный минус это не работоспособность с Remmina, насчет Vino это помоему тоже программа с графическим интерфейсом которая называеться "Общий доступ к рабочему столу" (Могу ошибаться). Так что под итожим!

Решение таково:
Устанавливаем x11vnc, затем смотрим по процессам Х кто залогинен ps aux | grep X и запускаем VNC сервер c правами root sudo x11vnc -auth /var/run/lightdm/root/:0 и все работаем видно что делает человек за компьютером и можно ему помочь и подсказать что и требовалось сделать =)
Потом я еще добавил ключ -noxdamage который как я понял отключает графические украшательства Use x11vnc -noxdamage or disable the Beryl/Compiz app., т.к. при работе постоянно вываливалась такая ошибка.


 

Страница сгенерирована за 0.054 секунд. Запросов: 25.