Newsgroup: it.comp.os.linux.sys
Titolo: x11vnc

Ciao a tutti,
vi chiedo se qualcuno di voi riesce a utilizzare correttamente x11vnc 
insieme a xinetd, in particolare se chi e' riuscito puo' gentilmente 
postare i suoi file di configurazione.
Molte grazie,
Lorenzo

 insieme a xinetd
Io lo uso con inetd. xinetd l'avevo usato quando avevo installato RedHat
7.3, piu' o meno e' la stessa cosa, cambia solo la sintassi (un bel ma
xinetd...).
In /etc/services aggiungi:
  vnc50  5950/tcp  # VNC with inetd
In /etc/inetd.conf (oppure un nuovo file in /etc/xinetd.d/ con la
sintassi per xinetd):
  vnc50 stream tcp nowait root /usr/sbin/tcpd /usr/local/bin/Xvnc -ac
-once -query localhost -inetd -geometry 1010x690 -depth 24 -fp unix/:7100
Ho abilitato XDMCP sul gdm (o il login manager che usi tu) e l'xfs.
Per collegarti vncviewer nomehost:50.
Ciao,
  Luca

   vnc50 stream tcp nowait root /usr/sbin/tcpd /usr/local/bin/Xvnc -ac
...non e' che ti confondi con VNC?
Lorenzo

 ...non e' che ti confondi con VNC?
Perdonami Lorenzo, hai ragione. Credevo che x11vnc==Xvnc...
Ho provato con x11vnc (non sapevo che esistesse un tool cosi' utile,
grazie!), e bisogna solamente prestare attenzione a mettergli l'opzione
-q. La righe diventano:
/etc/services:
vnc00  5900/tcp
/etc/inetd.conf (o /etc/xinetd.d/...)
vnc00   stream  tcp     nowait  root    /usr/sbin/tcpd
/usr/local/bin/x11vnc -inetd -q -users nobody -display :0
Devi fare attenzione pero' ad aggiungere almeno 'localhost' agli host
abilitati per accedere ad X: xhost +localhost
Ciao e scusami per ancora la gaffe clamorosa...
  Luca

 Perdonami Lorenzo, hai ragione. Credevo che x11vnc==Xvnc...
Grazie moltissimo per l'aiuto!
Ti spiego la mia situazione: ho aggiunto in /etc/services le entry per 
x11nvc e vnc:
[..]
x11vncservice 5900/tcp
vnc-1400x1050x16 5901/tcp
vnc-1280x1024x16 5902/tcp
vnc-1024x768x16 5903/tcp
vnc-800x600x16 5904/tcp
e questo era il mio /etc/xinetd.d/x11vncservice (server_args va a capo, 
in realta' e' ok...):
service x11vncservice
{
         flags                  = REUSE NAMEINARGS
         port                   = 5900
         type                   = UNLISTED
         socket_type            = stream
         protocol               = tcp
         wait                   = no
         user                   = root
         server                 = /usr/bin/x11vnc
        server_args             = -inetd -display :0 -auth 
/var/gdm/:0.Xauth -o /var/log/x11vnc_sh.log
        server-args             = -inetd -q -users nobody -display :0
}
Come risultato ottengo che se mi connetto con tightvnc sul display 0 non 
accade nulla (non mi segnala neanche un errore...), ma dopo posso 
connettermi sul display 5 (?) e funziona correttamente. Se non passo 
dallo 0 non va.
Il bello e' che mi viene mostrata la schermata di login di gnome, come 
del resto sul monitor del pc, ma appena mi loggo mi si disconnette! Devo 
riconnettermi prima sul display 0 poi sul 5.
Leggendo invece il tuo aiuto e adattandolo per il formato xinetd ho 
modificato x11vncservices cosi':
service x11vncservice
{
         protocol                = tcp
         socket_type             = stream
         wait                    = no
         user                    = nobody
         server                  = /usr/bin/x11vnc
         server_args             = -inetd -q -users nobody -display :0
}
Ma continua a funzionare come prima... ora, leggendo il log (tagliato 
dove indico [..]) vedo che e' in ascolto sul display 6, e infatti sono 
riuscito ad accedere...
Settings:
  display:    :0
  authfile:   /var/gdm/:0.Xauth
  subwin:     0x0
  rootshift:  0
  flashcmap:  0
  force_idx:  0
  overlay:    0
  ovl_cursor: 1
  visual:     null
  scaling:    0 1.00000
  viewonly:   0
  shared:     0
  conn_once:  1
  inetd:      0
  connect:    null
[..]
  noremote:   0
04/04/2005 22:08:24 x11vnc version: 0.7pre lastmod: 2004-12-23
04/04/2005 22:08:24 Using X display :0
04/04/2005 22:08:24 XFIXES available on display, resetting cursor mode
04/04/2005 22:08:24   to: '-cursor most'.
04/04/2005 22:08:24   to disable this behavior use: '-cursor arrow'.
04/04/2005 22:08:24 using XFIXES for cursor drawing.
04/04/2005 22:08:24 default visual ID: 0x21
04/04/2005 22:08:24 Read initial data from X display into framebuffer.
04/04/2005 22:08:24 X display :0.0 is 16bpp depth=16 true color
FrameBuffer Info:
(END)
  width:            1024
  height:           768
[..]
  bitmap_bit_order: LSBFirst
04/04/2005 22:08:24 setting up 32 cursors...
04/04/2005 22:08:24   done.
04/04/2005 22:08:24 Autoprobing TCP port
04/04/2005 22:08:24 Autoprobing selected port 5906
04/04/2005 22:08:24 created 32 tile_row shm polling images.
04/04/2005 22:08:24 screen setup finished.
04/04/2005 22:08:24
04/04/2005 22:08:24 The VNC desktop is tux:6
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@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^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^
@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@04/04/2005 
22:18:50 rfbProcessClientNormalMessage: read: Connection timed out
04/04/2005 22:18:50 client_count: 0
04/04/2005 22:18:50 Restored X server key autorepeat to: 1
04/04/2005 22:18:50 viewer exited.
04/04/2005 22:18:50 deleted 32 tile_row polling images.
Vorrei ovviamente che lavorasse solo sul display 0, e che non mi 
buttasse fuori dopo il login...
Grazie ancora per la pazienza,
Lorenzo

 04/04/2005 22:08:24 Autoprobing selected port 5906
Sembra che non prenda il comando -inetd. Infatti non deve stare in
ascolto su nessuna porta. Non e' che magari e' una versione vecchia che
non supporta -inetd? O prova magari a spostare -inetd in fondo agli
argomenti...
A risentirci,
  Luca

 argomenti...
Sono arrivato qui:
service x11vnc
{
         protocol                = tcp
         socket_type             = stream
         wait                    = no
         user                    = root
         server                  = /usr/bin/x11vnc
         server_args             = -inetd -o /var/log/x11vnc_sh.log 
-auth /var/gdm/:0.Xauth -display :0
}
Ora parte sempre sulla 5900, l'unica cosa e' cha quando mi loggo mi 
caccia fuori e devo riconnettermi. Vorrei evitare questo.
Inoltre quando mi riconnetto non mi chiede la password.
Visto che lo voglio portare fuori dalla lan, bisogna che ci imposti una 
password, anche fissa, come fa vnc. Direi che ce la posso fare anche da 
solo (spero!!!).
GRAZIE!!!
Lorenzo