Автор Тема: настроить удаленно x11vnc  (Прочитано 8465 раз)

Оффлайн vita55555

  • Участник
  • *
  • Сообщений: 97
настроить удаленно x11vnc
« : 26.01.2016 13:27:31 »
Всем привет,
Нужно настроить удаленно x11vnc на Кентавр 7.0.5
есть доступ по ssh

подключаюсь
ssh -p port ip
делаю:
x11vnc -storepasswdx11vnc -forever -display :0 -usepw &
Получаю:
XOpenDisplay(":0") failed.

Upd1:
Получилось преодолеть:
Цитировать
XOpenDisplay(":0") failed.
Путем:
ssh -Y -p port ipТеперь:
Цитировать
X11 MIT Shared Memory Attach failed:
  Is your DISPLAY=localhost:10.0 on a remote machine?
  Note:   DISPLAY=localhost:N suggests a SSH X11 redir to a remote machine.
  Suggestion, use: x11vnc -display :0 ... for local display :0

caught X11 error:
26/01/2016 13:01:45 deleted 36 tile_row polling images.
X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  130 (MIT-SHM)
  Minor opcode of failed request:  1 (X_ShmAttach)
  Serial number of failed request:  49
  Current serial number in output stream:  87
« Последнее редактирование: 26.01.2016 16:59:17 от vita55555 »

Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 361
  • Учиться .... Телепатами не рождаются, ими ....
Re: настроить удаленно x11vnc
« Ответ #1 : 26.01.2016 13:32:57 »
1. С каким ключом вы заходите по ssh
2. А точно надо указывать конкретный дисплей?

Оффлайн vita55555

  • Участник
  • *
  • Сообщений: 97
Re: настроить удаленно x11vnc
« Ответ #2 : 26.01.2016 13:35:40 »
1. С каким ключом вы заходите по ssh

ssh -p port ip

Оффлайн vita55555

  • Участник
  • *
  • Сообщений: 97
Re: настроить удаленно x11vnc
« Ответ #3 : 26.01.2016 13:39:56 »
2. А точно надо указывать конкретный дисплей?
[vitaadmin@host-199 ~]$ x11vnc -forever -usepw &

Спойлер
[1] 4787
[vitaadmin@host-199 ~]$ 26/01/2016 11:39:09 -usepw: found /home/vitaadmin/.vnc/passwd
26/01/2016 11:39:09 x11vnc version: 0.9.12 lastmod: 2010-09-09  pid: 4787
26/01/2016 11:39:09 XOpenDisplay("") failed.
26/01/2016 11:39:09 Trying again with XAUTHLOCALHOSTNAME=localhost ...
26/01/2016 11:39:09
26/01/2016 11:39:09 *** XOpenDisplay failed. No -display or DISPLAY.
26/01/2016 11:39:09 *** Trying ":0" in 4 seconds.  Press Ctrl-C to abort.
26/01/2016 11:39:09 *** 1 2 3 4
No protocol specified
26/01/2016 11:39:13 XOpenDisplay(":0") failed.
26/01/2016 11:39:13 Trying again with XAUTHLOCALHOSTNAME=localhost ...
No protocol specified
26/01/2016 11:39:13 XOpenDisplay(":0") failed.
26/01/2016 11:39:13 Trying again with unset XAUTHLOCALHOSTNAME ...
No protocol specified
26/01/2016 11:39:13

26/01/2016 11:39:13 ***************************************
26/01/2016 11:39:13 *** XOpenDisplay failed (:0)

Оффлайн berkut_174

  • Мастер
  • ***
  • Сообщений: 7 152
Re: настроить удаленно x11vnc
« Ответ #4 : 26.01.2016 13:41:21 »
XOpenDisplay(":0") failed.
export DISPLAY=:0
Сноси Винду, переходи на Линукс ! :)

Оффлайн vita55555

  • Участник
  • *
  • Сообщений: 97
Re: настроить удаленно x11vnc
« Ответ #5 : 26.01.2016 13:46:24 »
export DISPLAY=:0
запустил из под пользователя - вывод в консоль отсутствует.

Оффлайн berkut_174

  • Мастер
  • ***
  • Сообщений: 7 152
Re: настроить удаленно x11vnc
« Ответ #6 : 26.01.2016 13:48:52 »
запустил из под пользователя - вывод в консоль отсутствует.
... после свою команду выполняйте :-)
Сноси Винду, переходи на Линукс ! :)

Оффлайн vita55555

  • Участник
  • *
  • Сообщений: 97
Re: настроить удаленно x11vnc
« Ответ #7 : 26.01.2016 13:50:16 »
... после свою команду выполняйте :-)
[vitaadmin@host-199 ~]$ export DISPLAY=:0
[vitaadmin@host-199 ~]$

Оффлайн berkut_174

  • Мастер
  • ***
  • Сообщений: 7 152
Re: настроить удаленно x11vnc
« Ответ #8 : 26.01.2016 13:50:59 »
Эм... вот эту:
x11vnc -forever -display :0 -usepw &
Сноси Винду, переходи на Линукс ! :)

Оффлайн vita55555

  • Участник
  • *
  • Сообщений: 97
Re: настроить удаленно x11vnc
« Ответ #9 : 26.01.2016 13:53:14 »
Эм... вот эту:
x11vnc -forever -display :0 -usepw &
[vitaadmin@host-199 ~]$ export DISPLAY=:0
[vitaadmin@host-199 ~]$ x11vnc -forever -display :0 -usepw &
[1] 4973
[vitaadmin@host-199 ~]$ 26/01/2016 11:55:59 -usepw: found /home/vitaadmin/.vnc/passwd
26/01/2016 11:55:59 x11vnc version: 0.9.12 lastmod: 2010-09-09  pid: 4973
No protocol specified
26/01/2016 11:55:59 XOpenDisplay(":0") failed.
26/01/2016 11:55:59 Trying again with XAUTHLOCALHOSTNAME=localhost ...
No protocol specified

26/01/2016 11:55:59 ***************************************
26/01/2016 11:55:59 *** XOpenDisplay failed (:0)

« Последнее редактирование: 26.01.2016 13:55:06 от vita55555 »

Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 361
  • Учиться .... Телепатами не рождаются, ими ....
Re: настроить удаленно x11vnc
« Ответ #10 : 26.01.2016 14:41:40 »
Используйте ключ -Y

Оффлайн vita55555

  • Участник
  • *
  • Сообщений: 97
Re: настроить удаленно x11vnc
« Ответ #11 : 26.01.2016 15:05:01 »
Используйте ключ -Y
прогресс есть,
ssh -Y -p port ipно не заработало:
x11vnc -forever -usepw &
Цитировать
X11 MIT Shared Memory Attach failed:
  Is your DISPLAY=localhost:10.0 on a remote machine?
  Note:   DISPLAY=localhost:N suggests a SSH X11 redir to a remote machine.
  Suggestion, use: x11vnc -display :0 ... for local display :0

caught X11 error:
26/01/2016 13:01:45 deleted 36 tile_row polling images.
X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  130 (MIT-SHM)
  Minor opcode of failed request:  1 (X_ShmAttach)
  Serial number of failed request:  49
  Current serial number in output stream:  87
Спойлер
[vitaadmin@host-199 ~]$ x11vnc -forever -usepw &
[1] 5073
[vitaadmin@host-199 ~]$ 26/01/2016 13:01:38 -usepw: found /home/vitaadmin/.vnc/passwd
26/01/2016 13:01:38 x11vnc version: 0.9.12 lastmod: 2010-09-09  pid: 5073
26/01/2016 13:01:38
26/01/2016 13:01:38 WARNING: DISPLAY starts with localhost: 'localhost:10.0'
26/01/2016 13:01:38 WARNING: Is this an SSH X11 port forwarding?  You most
26/01/2016 13:01:38 WARNING: likely don't want x11vnc to use that DISPLAY.
26/01/2016 13:01:38 WARNING: You probably should supply something
26/01/2016 13:01:38 WARNING: like: -display :0  to access the physical
26/01/2016 13:01:38 WARNING: X display on the machine where x11vnc is running.
26/01/2016 13:01:38
26/01/2016 13:01:38 Using X display localhost:10.0
26/01/2016 13:01:38 rootwin: 0x16d reswin: 0x4400001 dpy: 0xa2c640
26/01/2016 13:01:38
26/01/2016 13:01:38 ------------------ USEFUL INFORMATION ------------------
26/01/2016 13:01:38 X DAMAGE available on display, using it for polling hints.
26/01/2016 13:01:38   To disable this behavior use: '-noxdamage'
26/01/2016 13:01:38
26/01/2016 13:01:38   Most compositing window managers like 'compiz' or 'beryl'
26/01/2016 13:01:38   cause X DAMAGE to fail, and so you may not see any screen
26/01/2016 13:01:38   updates via VNC.  Either disable 'compiz' (recommended) or
26/01/2016 13:01:38   supply the x11vnc '-noxdamage' command line option.
26/01/2016 13:01:38
26/01/2016 13:01:38 Wireframing: -wireframe mode is in effect for window moves.
26/01/2016 13:01:38   If this yields undesired behavior (poor response, painting
26/01/2016 13:01:38   errors, etc) it may be disabled:
26/01/2016 13:01:38    - use '-nowf' to disable wireframing completely.
26/01/2016 13:01:38    - use '-nowcr' to disable the Copy Rectangle after the
26/01/2016 13:01:38      moved window is released in the new position.
26/01/2016 13:01:38   Also see the -help entry for tuning parameters.
26/01/2016 13:01:38   You can press 3 Alt_L's (Left "Alt" key) in a row to
26/01/2016 13:01:38   repaint the screen, also see the -fixscreen option for
26/01/2016 13:01:38   periodic repaints.
26/01/2016 13:01:38
26/01/2016 13:01:38 XFIXES available on display, resetting cursor mode
26/01/2016 13:01:38   to: '-cursor most'.
26/01/2016 13:01:38   to disable this behavior use: '-cursor arrow'
26/01/2016 13:01:38   or '-noxfixes'.
26/01/2016 13:01:38 using XFIXES for cursor drawing.
26/01/2016 13:01:38 GrabServer control via XTEST.
26/01/2016 13:01:39
26/01/2016 13:01:39 Scroll Detection: -scrollcopyrect mode is in effect to
26/01/2016 13:01:39   use RECORD extension to try to detect scrolling windows
26/01/2016 13:01:39   (induced by either user keystroke or mouse input).
26/01/2016 13:01:39   If this yields undesired behavior (poor response, painting
26/01/2016 13:01:39   errors, etc) it may be disabled via: '-noscr'
26/01/2016 13:01:39   Also see the -help entry for tuning parameters.
26/01/2016 13:01:39   You can press 3 Alt_L's (Left "Alt" key) in a row to
26/01/2016 13:01:39   repaint the screen, also see the -fixscreen option for
26/01/2016 13:01:39   periodic repaints.
26/01/2016 13:01:39
26/01/2016 13:01:39 XKEYBOARD: number of keysyms per keycode 10 is greater
26/01/2016 13:01:39   than 4 and 98 keysyms are mapped above 4.
26/01/2016 13:01:39   Automatically switching to -xkb mode.
26/01/2016 13:01:39   If this makes the key mapping worse you can
26/01/2016 13:01:39   disable it with the "-noxkb" option.
26/01/2016 13:01:39   Also, remember "-remap DEAD" for accenting characters.
26/01/2016 13:01:39
26/01/2016 13:01:39 X FBPM extension not supported.
26/01/2016 13:01:40 X display is capable of DPMS.
26/01/2016 13:01:40 --------------------------------------------------------
26/01/2016 13:01:40
26/01/2016 13:01:40 Default visual ID: 0x21
[vitaadmin@host-199 ~]$ 26/01/2016 13:01:45 Read initial data from X display into framebuffer.
26/01/2016 13:01:45 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/4608
26/01/2016 13:01:45
26/01/2016 13:01:45 X display localhost:10.0 is 32bpp depth=24 true color
26/01/2016 13:01:45
26/01/2016 13:01:45 Autoprobing TCP port
26/01/2016 13:01:45 Autoprobing selected port 5900
26/01/2016 13:01:45 Listening also on IPv6 port 5900 (socket 10)
26/01/2016 13:01:45
26/01/2016 13:01:45 Xinerama is present and active (e.g. multi-head).
26/01/2016 13:01:45 Xinerama: number of sub-screens: 1
26/01/2016 13:01:45 Xinerama: no blackouts needed (only one sub-screen)
26/01/2016 13:01:45

X11 MIT Shared Memory Attach failed:
  Is your DISPLAY=localhost:10.0 on a remote machine?
  Note:   DISPLAY=localhost:N suggests a SSH X11 redir to a remote machine.
  Suggestion, use: x11vnc -display :0 ... for local display :0

caught X11 error:
26/01/2016 13:01:45 deleted 36 tile_row polling images.
X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  130 (MIT-SHM)
  Minor opcode of failed request:  1 (X_ShmAttach)
  Serial number of failed request:  49
  Current serial number in output stream:  87
[1]+  Exit 1                  x11vnc -forever -usepw

« Последнее редактирование: 26.01.2016 16:59:01 от vita55555 »

Оффлайн vita55555

  • Участник
  • *
  • Сообщений: 97
Re: настроить удаленно x11vnc
« Ответ #12 : 26.01.2016 15:08:05 »
x11vnc -forever -display :0 -usepw &
Спойлер
[vitaadmin@host-199 ~]$ x11vnc -forever -display :0 -usepw &
[1] 5078
[vitaadmin@host-199 ~]$ 26/01/2016 13:09:04 -usepw: found /home/vitaadmin/.vnc/passwd
26/01/2016 13:09:04 x11vnc version: 0.9.12 lastmod: 2010-09-09  pid: 5078
No protocol specified
26/01/2016 13:09:04 XOpenDisplay(":0") failed.
26/01/2016 13:09:04 Trying again with XAUTHLOCALHOSTNAME=localhost ...
No protocol specified

26/01/2016 13:09:04 ***************************************
26/01/2016 13:09:04 *** XOpenDisplay failed (:0)

*** x11vnc was unable to open the X DISPLAY: ":0", it cannot continue.
*** There may be "Xlib:" error messages above with details about the failure.

Some tips and guidelines:

** An X server (the one you wish to view) must be running before x11vnc is
   started: x11vnc does not start the X server.  (however, see the -create
   option if that is what you really want).

** You must use -display <disp>, -OR- set and export your $DISPLAY
   environment variable to refer to the display of the desired X server.
 - Usually the display is simply ":0" (in fact x11vnc uses this if you forget
   to specify it), but in some multi-user situations it could be ":1", ":2",
   or even ":137".  Ask your administrator or a guru if you are having
   difficulty determining what your X DISPLAY is.

** Next, you need to have sufficient permissions (Xauthority)
   to connect to the X DISPLAY.   Here are some Tips:

 - Often, you just need to run x11vnc as the user logged into the X session.
   So make sure to be that user when you type x11vnc.
 - Being root is usually not enough because the incorrect MIT-MAGIC-COOKIE
   file may be accessed.  The cookie file contains the secret key that
   allows x11vnc to connect to the desired X DISPLAY.
 - You can explicitly indicate which MIT-MAGIC-COOKIE file should be used
   by the -auth option, e.g.:
       x11vnc -auth /home/someuser/.Xauthority -display :0
       x11vnc -auth /tmp/.gdmzndVlR -display :0
   you must have read permission for the auth file.
   See also '-auth guess' and '-findauth' discussed below.

** If NO ONE is logged into an X session yet, but there is a greeter login
   program like "gdm", "kdm", "xdm", or "dtlogin" running, you will need
   to find and use the raw display manager MIT-MAGIC-COOKIE file.
   Some examples for various display managers:

     gdm:     -auth /var/gdm/:0.Xauth
              -auth /var/lib/gdm/:0.Xauth
     kdm:     -auth /var/lib/kdm/A:0-crWk72
              -auth /var/run/xauth/A:0-crWk72
     xdm:     -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk
     dtlogin: -auth /var/dt/A:0-UgaaXa

   Sometimes the command "ps wwwwaux | grep auth" can reveal the file location.

   Starting with x11vnc 0.9.9 you can have it try to guess by using:

              -auth guess

   (see also the x11vnc -findauth option.)

   Only root will have read permission for the file, and so x11vnc must be run
   as root (or copy it).  The random characters in the filenames will of course
   change and the directory the cookie file resides in is system dependent.

See also: http://www.karlrunge.com/x11vnc/faq.html
[1]+  Exit 1                  x11vnc -forever -display :0 -usepw


Оффлайн ruslandh

  • Поспешай не торопясь !
  • Модератор глобальный
  • *****
  • Сообщений: 32 361
  • Учиться .... Телепатами не рождаются, ими ....
Re: настроить удаленно x11vnc
« Ответ #13 : 26.01.2016 19:28:40 »
-display :0
Это-эе означает адрес 127.0.0.1:0 и как вы думаете - к какой машине это относится?

Оффлайн vita55555

  • Участник
  • *
  • Сообщений: 97
Re: настроить удаленно x11vnc
« Ответ #14 : 26.01.2016 20:43:53 »
-display :0
Это-эе означает адрес 127.0.0.1:0 и как вы думаете - к какой машине это относится?
к удаленной,
я же к ней подключился через ssh,
и думаю она стала localhost - как бы ...