PDA

View Full Version : Servizio XDMCP e macchina Windows


balubeto
25-03-2007, 13:03
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

balubeto
27-03-2007, 10:27
Mi accade una cosa strana:

Se, sulla macchina Linux, attivo il Login testuale, riesco da una shell remota a caricare X, mediante il comando startx & , ed a caricare un server VNC con il comando x11vnc -logfile /var/log/x11vnc.log -rfbauth $HOME/.vnc/passwd -localhost -forever -bg. In questo modo, con un viewer VNC per Windows, caricato sulla macchina Windows, a controllare da remoto, una sessione X.Org che gira sulla macchina Linux.

Ora, avendo installato GDM per effettuare, in locale, un Login grafico, non riesco a controllare da remoto il GDM con il servizio XDMCP attivato in quanto se da una shell remota, digito il comando x11vnc -logfile /var/log/x11vnc.log -rfbauth $HOME/.vnc/passwd -localhost -display :0 -auth /var/lib/gdm/:0.Xauthvt7 -forever -bg , mi da il seguente errore:


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


Come mai il server x11vnc non funziona piu`?

GRAZIE

CIAO

mic1
27-03-2007, 13:23
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

Io uso Xming che consiste nel server x.org per winzoz.
http://www.straightrunning.com/XmingNotes/

Ciao

balubeto
16-04-2007, 08:58
Non riesco ad usare il comando xauth per creare e gestire il file .AUTHORYTY in modo che il server x11vnc abbia l'autorizzazione di usare il display usato da GDM anche quando non c'e` una sessione di X attiva. Mi potete aiutare?

GRAZIE

CIAO