Googlare un poco...
Hai provato a seguire qualcuno di quei suggerimenti che ti stampa, e che mi hai icollato? Hai un server X attivato OLTRE al x11vnc server? Controlla la faccenda del MIT-MAGIC-COOKIE...
Blackfede ha scritto:Googlare un poco...
Hai provato a seguire qualcuno di quei suggerimenti che ti stampa, e che mi hai icollato? Hai un server X attivato OLTRE al x11vnc server? Controlla la faccenda del MIT-MAGIC-COOKIE...
PLUTO:~# cat /etc/inetd.conf
# /etc/inetd.conf: see inetd(8) for further informations.
#
# Internet superserver configuration database
#
#
# Lines starting with "#:LABEL:" or "#<off>#" should not
# be changed unless you know what you are doing!
#
# If you want to disable an entry so it isn't touched during
# package updates just comment it out with a single '#' character.
#
# Packages should modify this file by using update-inetd(8)
#
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
#
#:INTERNAL: Internal services
#discard stream tcp nowait root internal
#discard dgram udp wait root internal
#daytime stream tcp nowait root internal
#time stream tcp nowait root internal
#:STANDARD: These are standard services.
5900 stream tcp nowait nobody /usr/bin/x11vnc x11vnc -inetd -logfile /var/log/x11vnc.log -rfbauth /root/.vnc/passwd -forever -bg
#:BSD: Shell, login, exec and talk are BSD protocols.
#:MAIL: Mail, news and uucp services.
#:INFO: Info services
ident stream tcp wait identd /usr/sbin/identd identd
#:BOOT: TFTP service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers."
#:RPC: RPC based services
#:HAM-RADIO: amateur-radio services
#:OTHER: Other services
5900 stream tcp nowait nobody /usr/bin/Xvnc Xvnc -inetd -desktop=Server -query localhost -IdleTimeout 7200 -depth 16 -once securitytypes=none
PLUTO:~# cat /etc/inetd.conf | grep x11vnc
5900 stream tcp nowait nobody /usr/bin/x11vnc x11vnc -inetd -desktop=Server -query localhost -IdleTimeout 7200 -deph 16 -once securitytypes=none
Blackfede ha scritto:Hai anche provato a cambiare il "nobody" con un'utente reale? Che ne so, il tuo per esempio?
PLUTO:~# cat /etc/inetd.conf | grep x11vnc
5900 stream tcp nowait root /usr/bin/x11vnc x11vnc -inetd -logfile /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.authvt7 -forever
PLUTO:~# cat /etc/inetd.conf | grep x11vnc
5900 stream tcp nowait root /usr/bin/x11vnc x11vnc -inetd -logfile /var/log/x11vnc.log -desktop=Server -query localhost -display :0 -auth /var/lib/gdm/:0.authvt7 -forever
PLUTO:~# cat /etc/inetd.conf | grep x11vnc
5900 stream tcp nowait root /usr/bin/x11vnc x11vnc -inetd -logfile /var/log/x11vnc.log -desktop=Server -query localhost -rfbauth /root/.vnc/passwd -display :0 -auth /var/lib/gdm/:0.authvt7 -forever
PLUTO:~# cat /var/log/x11vnc.log
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
04/04/2007 18:54:23 ***************************************
04/04/2007 18:54:23 *** 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.
* 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 will be accessed. The cookie file contains the secret key that
allows x11vnc to connect to the desired X DISPLAY.
- You can explicity 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.
- 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
kdm: -auth /var/lib/kdm/A:0-crWk72
xdm: -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk
dtlogin: -auth /var/dt/A:0-UgaaXa
Only root will have read permission for the file, and so x11vnc must be run
as root. The random characters in the filenames will of course change,
and the directory the cookie file resides in may also be system dependent.
Sometimes the command "ps wwaux | grep auth" can reveal the file location.
See also: http://www.karlrunge.com/x11vnc/#faq
PLUTO:~# xauth generate :0 trusted
xauth: creating new authority file /root/.Xauthority
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xauth: (argv):1: unable to open display ":0".
PLUTO:~# cat .xserverrc
#!/bin/sh
mcookie|sed -e s/^/add :0 . /|xauth -q
exec /usr/X11R6/bin/X "$@" -auth "$HOME/.Xauthority"
PLUTO:~# ~/.xserverrc
sed: espressione -e #1, carattere 7: comando `s' non terminato
xauth: creating new authority file /root/.Xauthority
Fatal server error:
Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.
PLUTO:~# xdpyinfo -display :0
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
xdpyinfo: unable to open display ":0".
Torna a Altri sistemi operativi
Visitano il forum: Nessuno e 5 ospiti