CIAO
Come si fa a controllare un DM come gdm utilizzando il servizio XDMCP da una macchina Windows XP Pro SP2? Siccome il protocollo XDMCP non e` criptografato, si puo` incapsuarlo in una connessione SSH? Se si`, come si fa?
GRAZIE
CIAO
PLUTO:~# cat /var/log/x11vnc.log
27/03/2007 09:51:02 passing arg to libvncserver: -rfbauth
27/03/2007 09:51:02 passing arg to libvncserver: /root/.vnc/passwd
Settings:
display: :0
authfile: /var/lib/gdm/:0.Xauthvt7
subwin: 0x0
-sid mode: 0
clip: null
flashcmap: 0
shiftcmap: 0
force_idx: 0
cmap8to24: 0
8to24_opts: null
24to32: 0
visual: null
overlay: 0
ovl_cursor: 1
scaling: 0 1.0000
viewonly: 0
shared: 0
conn_once: 0
timeout: 0
inetd: 0
filexfer: 1
http: 0
connect: null
connectfile null
vnc_conn: 1
allow: 127.0.0.1
input: null
passfile: null
unixpw: 0
unixpw_lst: null
stunnel: 0
accept: null
accept: null
gone: null
users: null
using_shm: 1
flipbytes: 0
onetile: 0
solid: null
blackout: null
xinerama: 1
xtrap: 0
xrandr: 0
xrandrmode: null
padgeom: null
logfile: /var/log/x11vnc.log
logappend: 0
flag: null
rc_file: ""
norc: 0
dbg: 0
bg: 1
mod_tweak: 1
isolevel3: 0
xkb: 0
skipkeys: null
sloppykeys: 0
skip_dups: 0
addkeysyms: 1
xkbcompat: 0
clearmods: 0
remap: null
norepeat: 1
norepeatcnt:2
nofb: 0
watchbell: 1
watchsel: 1
watchprim: 1
seldir: null
cursor: 1
multicurs: 0
curs_mode: null
arrow: 1
xfixes: 1
alphacut: 240
alphafrac: 0.33
alpharemove:0
alphablend: 1
cursorshape:1
cursorpos: 1
xwarpptr: 0
buttonmap: null
dragging: 1
wireframe: 0xff,3,0,32+8+8+8,all,0.15+0.30+5.0+0.125
wirecopy: always
scrollcopy: always
scr_area: 60000
scr_skip: ##Soffice.bin,##StarOffice
scr_inc: ##Nomatch
scr_keys: null
scr_term: null
scr_keyrep: null
scr_parms: 0+64+32+32,0.02+0.10+0.9,0.03+0.06+0.5+0.1+5.0
fixscreen: null
noxrecord: 0
grabbuster: 0
ptr_mode: 2
inputskip: 10
speeds: null
wmdt: null
debug_ptr: 0
debug_key: 0
defer: 30
waitms: 30
wait_ui: 2.00
nowait_bog: 0
slow_fb: 0.00
readtimeout: 20
take_naps: 1
sb: 60
fbpm: 1
xdamage: 1
xd_area: 20000
xd_mem: 1.000
sigpipe: null
threads: 0
fs_frac: 0.75
gaps_fill: 4
grow_fill: 3
tile_fuzz: 2
snapfb: 0
rawfb: null
pipeinput: null
gui: 0
gui_mode: null
noremote: 0
unsafe: 0
privremote: 0
safer: 0
nocmds: 0
deny_all: 0
pid: 3672
27/03/2007 09:51:02 x11vnc version: 0.8.2 lastmod: 2006-07-12
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
27/03/2007 09:51:02 ***************************************
27/03/2007 09:51:02 *** 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
Blackfede ha scritto:Allora la cosa che stai cercando di fare tu, non mi è molto chiaro...Stai cercando di avere al momento dell'attivazione di VNC la schermata di GDM per effettuare il login? Se si questo non credo sia possibile...
Ed infatti il messaggio è molto chiaro, "Non posso aprire il display :0" semplicemente perché il display zero viene creato ne momento in cui tu fai il login.
Questo credo sia quanto...
Altrimenti potrebbe essere problema di permessi...per accettare connessione XDMCP oppure connessioni X11 remote, la macchina che si collega al server deve essere autorizzata. Per farlo devi dare il comando (da root) "xhost +192.168.1.1" (ora non ricordo se ci va lo spazio tra il + e l'IP). Prova e fammi sapere!
PLUTO:~# export DISPLAY=:0
PLUTO:~# ps wwaux | grep auth
root 3063 0.3 1.1 10992 6076 tty7 Ss+ 10:15 0:00 /usr/bin/X :0 -dpi 96 -audit 0 -auth /var/lib/gdm/:0.Xauth vt7
root 3309 0.0 0.1 1952 624 pts/1 D+ 10:16 0:00 grep auth
PLUTO:~# x11vnc -logfile /var/log/x11vnc.log -rfbauth $HOME/.vnc/passwd -localhost -display :0 -auth /var/lib/gdm/:0.Xauthvt7 -forever -bg
PLUTO:~# cat /var/log/x11vnc.log
30/03/2007 10:16:58 passing arg to libvncserver: -rfbauth
30/03/2007 10:16:58 passing arg to libvncserver: /root/.vnc/passwd
Settings:
display: :0
authfile: /var/lib/gdm/:0.Xauthvt7
subwin: 0x0
-sid mode: 0
clip: null
flashcmap: 0
shiftcmap: 0
force_idx: 0
cmap8to24: 0
8to24_opts: null
24to32: 0
visual: null
overlay: 0
ovl_cursor: 1
scaling: 0 1.0000
viewonly: 0
shared: 0
conn_once: 0
timeout: 0
inetd: 0
filexfer: 1
http: 0
connect: null
connectfile null
vnc_conn: 1
allow: 127.0.0.1
input: null
passfile: null
unixpw: 0
unixpw_lst: null
stunnel: 0
accept: null
accept: null
gone: null
users: null
using_shm: 1
flipbytes: 0
onetile: 0
solid: null
blackout: null
xinerama: 1
xtrap: 0
xrandr: 0
xrandrmode: null
padgeom: null
logfile: /var/log/x11vnc.log
logappend: 0
flag: null
rc_file: ""
norc: 0
dbg: 0
bg: 1
mod_tweak: 1
isolevel3: 0
xkb: 0
skipkeys: null
sloppykeys: 0
skip_dups: 0
addkeysyms: 1
xkbcompat: 0
clearmods: 0
remap: null
norepeat: 1
norepeatcnt:2
nofb: 0
watchbell: 1
watchsel: 1
watchprim: 1
seldir: null
cursor: 1
multicurs: 0
curs_mode: null
arrow: 1
xfixes: 1
alphacut: 240
alphafrac: 0.33
alpharemove:0
alphablend: 1
cursorshape:1
cursorpos: 1
xwarpptr: 0
buttonmap: null
dragging: 1
wireframe: 0xff,3,0,32+8+8+8,all,0.15+0.30+5.0+0.125
wirecopy: always
scrollcopy: always
scr_area: 60000
scr_skip: ##Soffice.bin,##StarOffice
scr_inc: ##Nomatch
scr_keys: null
scr_term: null
scr_keyrep: null
scr_parms: 0+64+32+32,0.02+0.10+0.9,0.03+0.06+0.5+0.1+5.0
fixscreen: null
noxrecord: 0
grabbuster: 0
ptr_mode: 2
inputskip: 10
speeds: null
wmdt: null
debug_ptr: 0
debug_key: 0
defer: 30
waitms: 30
wait_ui: 2.00
nowait_bog: 0
slow_fb: 0.00
readtimeout: 20
take_naps: 1
sb: 60
fbpm: 1
xdamage: 1
xd_area: 20000
xd_mem: 1.000
sigpipe: null
threads: 0
fs_frac: 0.75
gaps_fill: 4
grow_fill: 3
tile_fuzz: 2
snapfb: 0
rawfb: null
pipeinput: null
gui: 0
gui_mode: null
noremote: 0
unsafe: 0
privremote: 0
safer: 0
nocmds: 0
deny_all: 0
pid: 3310
30/03/2007 10:16:58 x11vnc version: 0.8.2 lastmod: 2006-07-12
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
30/03/2007 10:16:58 ***************************************
30/03/2007 10:16:58 *** 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:~# cat /etc/gdm/gdm.conf
# GDM Configuration Customization file.
#
# This file is the appropriate place for specifying your customizations to the
# GDM configuration. If you run gdmsetup, it will automatically edit this
# file for you and will cause the daemon and any running GDM GUI programs to
# automatically update with the new configuration. Not all configuration
# options are supported by gdmsetup, so to modify some values it may be
# necessary to modify this file directly by hand.
#
# Older versions of GDM used the "gdm.conf" file for configuration. If your
# system has an old gdm.conf file on the system, it will be used instead of
# this file - so changes made to this file will not take effect. Consider
# migrating your configuration to this file and removing the gdm.conf file.
#
# To hand-edit this file, simply add or modify the key=value combination in
# the appropriate section in the template below. Refer to the comments in the
# /usr/share/gdm/defaults.conf file for information about each option. Also
# refer to the reference documentation.
#
# If you hand edit a GDM configuration file, you should run the following
# command to get the GDM daemon to notice the change. Any running GDM GUI
# programs will also be notified to update with the new configuration.
#
# gdmflexiserver --command="UPDATE_CONFIG <configuration key>"
#
# e.g, the "Enable" key in the "[debug]" section would be "debug/Enable".
#
# You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and
# re-read the new configuration settings. You can also restart GDM by sending
# a HUP or USR1 signal to the daemon. HUP behaves like gdm-restart and causes
# any user session started by GDM to exit immediately while USR1 behaves like
# gdm-safe-restart and will wait until all users log out before restarting GDM.
#
# For full reference documentation see the gnome help browser under
# GNOME|System category. You can also find the docs in HTML form on
# http://www.gnome.org/projects/gdm/
#
# NOTE: Lines that begin with "#" are considered comments.
#
# Have fun!
[daemon]
GtkModulesList=gail:atk-bridge:/usr/lib/gtk-2.0/modules/libkeymouselistener:/usr/lib/gtk-2.0/modules/libdwellmouselistener
AddGtkModules=true
RemoteGreeter=/usr/lib/gdm/gdmgreeter
[security]
AllowRoot=true
DisallowTCP=false
AllowRemoteRoot=true
[xdmcp]
Enable=true
HonorIndirect=false
[gui]
[greeter]
Browser=true
Include=root,balubeto
Exclude=
[chooser]
[debug]
Enable=true
# Note that to disable servers defined in the defaults.conf file (such as
# 0=Standard, you must put a line in this file that says 0=inactive, as
# described in the Configuration section of the GDM documentation.
#
[servers]
# Also note, that if you redefine a [server-foo] section, then GDM will
# use the definition in this file, not the defaults.conf file. It is
# currently not possible to disable a [server-foo] section defined
# in the defaults.conf file.
#
PLUTO:~#
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 -desktop=Server -query localhost -forever
#: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
PLUTO:~# ps axu
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 1948 656 ? Ss 13:25 0:00 init [2]
root 2 0.0 0.0 0 0 ? S 13:25 0:00 [migration/0]
root 3 0.0 0.0 0 0 ? SN 13:25 0:00 [ksoftirqd/0]
root 4 0.1 0.0 0 0 ? S< 13:25 0:01 [events/0]
root 5 0.0 0.0 0 0 ? S< 13:25 0:00 [khelper]
root 6 0.0 0.0 0 0 ? S< 13:25 0:00 [kthread]
root 9 0.0 0.0 0 0 ? S< 13:25 0:00 [kblockd/0]
root 10 0.0 0.0 0 0 ? S< 13:25 0:00 [kacpid]
root 96 0.0 0.0 0 0 ? S< 13:25 0:00 [kseriod]
root 132 0.0 0.0 0 0 ? S 13:25 0:00 [pdflush]
root 133 0.0 0.0 0 0 ? S 13:25 0:00 [pdflush]
root 134 0.0 0.0 0 0 ? S< 13:25 0:00 [kswapd0]
root 135 0.0 0.0 0 0 ? S< 13:25 0:00 [aio/0]
root 576 0.0 0.0 0 0 ? S< 13:25 0:00 [khubd]
root 623 0.0 0.0 0 0 ? S< 13:25 0:00 [khpsbpkt]
root 736 0.0 0.0 0 0 ? S 13:25 0:00 [knodemgrd_0]
root 875 0.0 0.0 0 0 ? S< 13:25 0:00 [scsi_eh_1]
root 876 0.0 0.0 0 0 ? S< 13:25 0:00 [usb-storage]
root 1076 0.0 0.0 0 0 ? S< 13:25 0:00 [reiserfs/0]
root 1257 0.0 0.2 2692 1148 ? S<s 13:25 0:00 udevd --daemon
root 1686 0.0 0.0 0 0 ? S< 13:25 0:00 [kpsmoused]
root 1714 0.0 0.0 0 0 ? S< 13:25 0:00 [pccardd]
root 1732 0.0 0.0 0 0 ? S< 13:25 0:00 [pccardd]
root 2082 0.0 0.0 0 0 ? S< 13:25 0:00 [kmirrord]
daemon 2398 0.0 0.0 1684 372 ? Ss 13:25 0:00 /sbin/portmap
root 2704 0.0 0.1 1752 616 ? Ss 13:25 0:00 /sbin/syslogd
root 2710 0.0 0.0 1700 384 ? Ss 13:25 0:00 /sbin/klogd -x
root 2727 0.0 0.7 3788 3804 ? SLs 13:25 0:00 /usr/sbin/slmodemd --alsa -c ITALY modem:1
root 2746 0.0 0.1 5008 916 ? Ss 13:26 0:00 /usr/sbin/hpiod
hplip 2749 0.0 0.9 9812 4884 ? S 13:26 0:00 python /usr/sbin/hpssd
root 2839 0.0 0.1 2100 1012 ? Ss 13:26 0:00 /usr/sbin/acpid -c /etc/acpi/events -s /var/run/acpid.socke
root 2862 0.0 0.3 4636 1732 ? Ss 13:26 0:00 /usr/sbin/cupsd
root 2869 0.0 0.2 12032 1300 ? Ssl 13:26 0:00 /usr/bin/cvslockd
103 2874 0.0 0.1 2248 856 ? Ss 13:26 0:00 /usr/bin/dbus-daemon --system
105 2882 0.1 0.8 5952 4400 ? Ss 13:26 0:01 /usr/sbin/hald
root 2883 0.0 0.1 2896 1024 ? S 13:26 0:00 hald-runner
105 2889 0.0 0.1 2016 856 ? S 13:26 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.s
105 2892 0.0 0.1 2016 864 ? S 13:26 0:00 hald-addon-keyboard: listening on /dev/input/event0
root 2910 0.0 0.1 1812 624 ? S 13:26 0:00 hald-addon-storage: polling /dev/sda
root 2913 0.0 0.1 1812 624 ? S 13:26 0:00 hald-addon-storage: polling /dev/hdc
root 2923 0.0 0.1 1860 672 ? Ss 13:26 0:00 /usr/sbin/dhcdbd --system
root 2930 0.0 0.3 12184 1992 ? Ssl 13:26 0:00 /usr/sbin/NetworkManager --pid-file /var/run/NetworkManager
avahi 2956 0.0 0.2 2556 1344 ? Ss 13:26 0:00 avahi-daemon: running [PLUTO.local]
avahi 2957 0.0 0.0 2556 484 ? Ss 13:26 0:00 avahi-daemon: chroot helper
root 2967 0.0 0.2 2932 1212 ? Ss 13:26 0:00 /usr/sbin/NetworkManagerDispatcher --pid-file /var/run/Netw
100 3036 0.0 0.1 5336 1000 ? Ss 13:26 0:00 /usr/sbin/exim4 -bd -q30m
root 3047 0.0 0.3 10808 1828 ? Ss 13:26 0:00 /usr/sbin/gdm
root 3048 0.0 0.4 11156 2568 ? S 13:26 0:00 /usr/sbin/gdm
root 3056 0.0 1.1 10988 6080 tty7 Ss+ 13:26 0:00 /usr/bin/X :0 -dpi 96 -audit 0 -auth /var/lib/gdm/:0.Xauth
root 3079 0.0 0.1 1748 576 ? Ss 13:26 0:00 /usr/sbin/inetd
root 3104 0.0 0.2 4928 1088 ? Ss 13:26 0:00 /usr/sbin/sshd
root 3150 0.0 0.1 3020 604 ? Ss 13:26 0:00 /usr/sbin/famd -T 0
statd 3158 0.0 0.1 1756 736 ? Ss 13:26 0:00 /sbin/rpc.statd
root 3171 0.0 0.1 1956 704 ? Ss 13:26 0:00 /usr/sbin/hcid
root 3179 0.0 0.0 1640 496 ? Ss 13:26 0:00 /usr/sbin/sdpd
root 3190 0.0 0.0 0 0 ? S< 13:26 0:00 [krfcommd]
daemon 3211 0.0 0.0 1956 416 ? Ss 13:26 0:00 /usr/sbin/atd
root 3218 0.0 0.1 2316 872 ? Ss 13:26 0:00 /usr/sbin/cron
root 3271 0.0 0.0 1576 496 tty1 Ss+ 13:26 0:00 /sbin/getty 38400 tty1
root 3272 0.0 0.0 1572 492 tty2 Ss+ 13:26 0:00 /sbin/getty 38400 tty2
root 3273 0.0 0.0 1572 488 tty3 Ss+ 13:26 0:00 /sbin/getty 38400 tty3
root 3274 0.0 0.0 1576 496 tty4 Ss+ 13:26 0:00 /sbin/getty 38400 tty4
root 3275 0.0 0.0 1572 492 tty5 Ss+ 13:26 0:00 /sbin/getty 38400 tty5
root 3276 0.0 0.0 1576 496 tty6 Ss+ 13:26 0:00 /sbin/getty 38400 tty6
gdm 3292 0.1 3.6 26728 18888 ? Ss 13:26 0:01 /usr/lib/gdm/gdmgreeter --gtk-module=gail:atk-bridge:/usr/l
root 3296 0.0 0.4 7672 2260 ? Rs 13:29 0:00 sshd: root@pts/1
root 3298 0.0 0.3 3144 1740 pts/1 Ss 13:29 0:00 -bash
root 3310 0.0 0.1 2532 940 pts/1 R+ 13:45 0:00 ps axu
PLUTO:~#
PLUTO:~# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:51968 *:* LISTEN
tcp 0 0 localhost:2208 *:* LISTEN
tcp 0 0 localhost:2402 *:* LISTEN
tcp 0 0 *:5900 *:* LISTEN
tcp 0 0 localhost:782 *:* LISTEN
tcp 0 0 localhost:52399 *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:x11 *:* LISTEN
tcp 0 0 *:auth *:* LISTEN
tcp 0 0 localhost:ipp *:* LISTEN
tcp 0 0 localhost:smtp *:* LISTEN
tcp6 0 0 ip6-localhost:2402 *:* LISTEN
tcp6 0 0 *:3500 *:* LISTEN
tcp6 0 0 *:x11 *:* LISTEN
udp 0 0 *:32768 *:*
udp 0 0 *:32769 *:*
udp 0 0 *:790 *:*
udp 0 0 *:xdmcp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:mdns *:*
udp 0 0 *:sunrpc *:*
udp 0 0 *:ipp *:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 7628 /var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 7695 /var/run/cups/cups.sock
unix 2 [ ACC ] STREAM LISTENING 7736 /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 7751 @/var/run/hald/dbus-FvEXgB2kMQ
unix 2 [ ACC ] STREAM LISTENING 9230 /var/run/avahi-daemon/socket
unix 2 [ ACC ] STREAM LISTENING 9422 /tmp/.gdm_socket
unix 2 [ ACC ] STREAM LISTENING 9460 /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 9723 /var/run/sdp
unix 2 [ ACC ] STREAM LISTENING 7752 @/var/run/hald/dbus-vKLjvCE2k2
Blackfede ha scritto:Normale che tu non veda il server x11vnc nei processi avviati... INETD serve proprio allo scopo. Cosa fa: Configuro il demone inetd per ascoltare su certe porta (nel nostro caso la 5900) e non appena riceve una comunicazione su una delle porte su cui è in ascolto attiva il programma giusto e gli gira la richiesta... Tutto questo meccanismo per risparmiare memoria.
Maggiori info:
http://en.wikipedia.org/wiki/Inetd
Ma hai provato a collegarti lo stesso?
Blackfede ha scritto:Puoi avviare a mano il server VNC usando la stringa che hai messo nel file di configurazione... Devi togliere il flag -intetd e poi provi a collegarti. Tieni presente che tutti gli errori ed il log del server VNC vanno sullo stderr, quindi li leggi in console!
PLUTO:~# /usr/bin/x11vnc -desktop=Server -query localhost -forever
02/04/2007 16:54:04
02/04/2007 16:54:04 *** XOpenDisplay failed. No -display or DISPLAY.
02/04/2007 16:54:04 *** Trying ":0" in 4 seconds. Press Ctrl-C to abort.
02/04/2007 16:54:04 *** 1 2 3 4
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
02/04/2007 16:54:08
02/04/2007 16:54:08 ***************************************
02/04/2007 16:54:08 *** 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
Torna a Altri sistemi operativi
Visitano il forum: Nessuno e 4 ospiti