Punto informatico Network
Login Esegui login | Non sei registrato? Iscriviti ora (è gratuito!)
Username: Password:
  • Annuncio Pubblicitario

[Lubuntu 13.10] x11vnc and UltraVNC

Il forum riservato agli amici del Pinguino e al software libero.

[Lubuntu 13.10] x11vnc and UltraVNC

Messaggioda balubeto » sab mar 22, 2014 12:54 pm

Ciao

In Windows 7 SP1 a 64 bit, uso UltraVNC viewer 1.1.9.6 a 64 bit con il plugin SecureVNCPlugin64.dsm .

Ora, ho un computer con Lubuntu 13.10 a 32 bit che esso ha installato il server x11vnc.

Come posso configurare tale server VNC in modo che io possa controllare remotamente questa macchina Linux completamente, compreso il suo Desktop Manager LightDM?

Grazie

Ciao
Balubeto

Su Facebook, e` nato il gruppo SoftHard per tutti http://www.facebook.com/group.php?gid=52641062213&ref=nf . Vi aspetto.
Avatar utente
balubeto
Senior Member
Senior Member
 
Messaggi: 434
Iscritto il: ven apr 20, 2007 12:17 pm

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggioda balubeto » sab mar 22, 2014 6:47 pm

Ciao

In Windows 7 SP1 a 64 bit, uso UltraVNC viewer 1.1.9.6 a 64 bit con il plugin SecureVNCPlugin64.dsm .

Ora, ho un computer con Lubuntu 13.10 a 32 bit che esso ha installato il server x11vnc.

Come posso configurare tale server VNC in modo che io possa controllare remotamente questa macchina Linux completamente, compreso il suo Display Manager LightDM?

Grazie

Ciao
Balubeto

Su Facebook, e` nato il gruppo SoftHard per tutti http://www.facebook.com/group.php?gid=52641062213&ref=nf . Vi aspetto.
Avatar utente
balubeto
Senior Member
Senior Member
 
Messaggi: 434
Iscritto il: ven apr 20, 2007 12:17 pm

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggioda ninjabionico » dom mar 23, 2014 5:05 pm

Vorrei consigliarti un paio di letture:

http://turbolab.it/263

e

http://turbolab.it/262
Io dico le cose così come stanno! Questo è il mio credo ninja - by Naruto Uzumaki
Expert-Advanced User Powered by Gnu/Linux
Avatar utente
ninjabionico
Membro Ufficiale (Gold)
Membro Ufficiale (Gold)
 
Messaggi: 5207
Iscritto il: lun mar 20, 2006 10:51 pm
Località: Prov. Pd


Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggioda balubeto » mar mar 25, 2014 9:28 am

Da Linux, ho scritto dal terminale:

sudo x11vnc -storepasswd /etc/x11vnc.pass


e, poi, ho creato, nella directory /etc/init, il file x11vnc.conf ed ho scritto:

start on login-session-start
script
/usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log
end script


ma, quando ho riavviato il computer, ho provato a collegarmi con UltraVNC senza il plugin SecureVNCPlugin64.dsm ma il server x11vnc non risponde e non mi crea nemmeno il file di log. Dove sbaglio?

Grazie

Ciao
Balubeto

Su Facebook, e` nato il gruppo SoftHard per tutti http://www.facebook.com/group.php?gid=52641062213&ref=nf . Vi aspetto.
Avatar utente
balubeto
Senior Member
Senior Member
 
Messaggi: 434
Iscritto il: ven apr 20, 2007 12:17 pm

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggioda balubeto » mar mar 25, 2014 7:50 pm

Eseguendo questo comando dal terminale con il comando sudo in quanto c'e` l'opzione -o, ottengo:

25/03/2014 18:30:24 passing arg to libvncserver: -rfbauth
25/03/2014 18:30:24 passing arg to libvncserver: /etc/x11vnc.pass
25/03/2014 18:30:24 passing arg to libvncserver: -rfbport
25/03/2014 18:30:24 passing arg to libvncserver: 5900
25/03/2014 18:30:24 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 2733
No protocol specified
25/03/2014 18:30:24 XOpenDisplay(":0") failed.
25/03/2014 18:30:24 Trying again with XAUTHLOCALHOSTNAME=localhost ...
No protocol specified

25/03/2014 18:30:24 ***************************************
25/03/2014 18:30:24 *** 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


Percio`, come faccio a risolvere questo problema?

Grazie

Ciao
Balubeto

Su Facebook, e` nato il gruppo SoftHard per tutti http://www.facebook.com/group.php?gid=52641062213&ref=nf . Vi aspetto.
Avatar utente
balubeto
Senior Member
Senior Member
 
Messaggi: 434
Iscritto il: ven apr 20, 2007 12:17 pm

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggioda balubeto » mer mar 26, 2014 12:01 pm

Lasciando il file x11vnc.conf nella directory /etc/init e riavviando il computer, noto che il file /var/run/lightdm/root/:0 viene creato ma, quando eseguo i comandi sudo netstat -anp | grep 5900 o sudo netstat -nlp | grep vnc o sudo ps -ef | grep [x]11vnc, non viene visualizzato nulla.

Quindi, ho eseguito da terminale il comando sudo /usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log viene ricreato il file /var/run/lightdm/root/:0 ma gli altri comandi danno sempre lo stesso risultato.

Dunque, ho riavviato il computer ed ho dato il comando sudo /usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -display :0 ma lo stesso file log viene visualizzato.

Come mai?

Grazie

Ciao
Balubeto

Su Facebook, e` nato il gruppo SoftHard per tutti http://www.facebook.com/group.php?gid=52641062213&ref=nf . Vi aspetto.
Avatar utente
balubeto
Senior Member
Senior Member
 
Messaggi: 434
Iscritto il: ven apr 20, 2007 12:17 pm

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggioda balubeto » gio mar 27, 2014 12:17 pm

Inoltre, ho provato anche a fare questo metodo:

Ho attivato la direttiva xauth_path nel file /etc/lxdm/default.conf (che punta al file /etc/alternatives/lxdm.conf), ho eseguito il comando sudo x11vnc -storepasswd <Password> /etc/x11vnc.pass per creare una password per accedere a x11vnc da remoto e ho creato il file /etc/lxdm/LoginReady cosi`:

!/bin/sh
# X11VNC AutoStart
sudo x11vnc -auth /tmp/.Xauth1000 -forever rfbauth /etc/x11vnc.pass -rfbport 5900 -o /var/log/x11vnc.log


Poi, l'ho reso eseguibile scrivendo sudo chmod u+x /etc/lxdm/LoginReady ed ho riavviato il computer.

Purtroppo non riesco ancora a collegarmi da remoto in quanto, quando tento di farlo, UltraVNC viewer non riesce a trovare il Server.

Inoltre, ho notato che il file di log non viene creato ed il processo x11vnc non e` attivo.

Quindi, come devo fare a risolvere questo problema?

Grazie

Ciao

P.S: Mi sono accorto che anche se eseguo il comando sudo x11vnc -auth /tmp/.Xauth1000 -forever rfbauth /etc/x11vnc.pass -rfbport 5900 -o /var/log/x11vnc.log, non funziona ma viene creato il file di log che e` sempre lo stesso.
Balubeto

Su Facebook, e` nato il gruppo SoftHard per tutti http://www.facebook.com/group.php?gid=52641062213&ref=nf . Vi aspetto.
Avatar utente
balubeto
Senior Member
Senior Member
 
Messaggi: 434
Iscritto il: ven apr 20, 2007 12:17 pm

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggioda balubeto » gio mar 27, 2014 7:40 pm

Ho notato che con il comando:

Codice: Seleziona tutto
sudo x11vnc -o /var/log/x11vnc.log -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared -forever -nowf -norc -notruecolor -bg -xkb


riesco, con UltraVNC, ad effettuare il controllo remoto della sessione corrente di Lubuntu 13.10. Quindi, per potere controllare anche LightDM, come devo fare a ottenere il file che l'opzione auth di x11vnc vuole? Dove devo mettere tale comando?

Grazie

Ciao
Balubeto

Su Facebook, e` nato il gruppo SoftHard per tutti http://www.facebook.com/group.php?gid=52641062213&ref=nf . Vi aspetto.
Avatar utente
balubeto
Senior Member
Senior Member
 
Messaggi: 434
Iscritto il: ven apr 20, 2007 12:17 pm

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggioda balubeto » dom mar 30, 2014 4:33 pm

Alla fine, ho editato il file /etc/lightdm/lightdm.conf in questo modo:

Codice: Seleziona tutto
[SeatDefaults]
greeter-session=lightdm-gtk-greeter
user-session=Lubuntu
display-setup-script=/usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -rfbauth /etc/x11vnc.pass -xkb -noxrecord -noxfixes -noxdamage -forever -bg -rfbport 5900


e funziona.

Ora, c'e` il problema di mappatura di caratteri e ho gia` provato a sostituire l'opzione -xkb con -noxkb ma il problema rimane:

Il computer con Windows e` mappato con la tastiera inglese-Stati uniti (EN) e quello di Lubuntu 13.10 ha la mappatura italiana-italiana (IT). Ora, facendo il controllo remoto dal computer Windows al computer Linux ed impostando la mappatura della tastiera di quest`ultimo computer con il layout della tastiera inglese (US), vedo che alcuni caratteri =, -, +, ... digitati dal computer Windows, vengono riprodotti nel computer Linux con i caratteri ), /,], ..... . Ho anche verificato direttamente collegando una tastiera al computer Linux e ho notato che questo problema non esiste anche se cambio il layout della tastiera.

Quindi come faccio a risolvere questo problema di mappatura causato dal controllo remoto?

Grazie

Ciao
Balubeto

Su Facebook, e` nato il gruppo SoftHard per tutti http://www.facebook.com/group.php?gid=52641062213&ref=nf . Vi aspetto.
Avatar utente
balubeto
Senior Member
Senior Member
 
Messaggi: 434
Iscritto il: ven apr 20, 2007 12:17 pm


Torna a Distribuzioni, Kernel e Software Applicativo

Chi c’è in linea

Visitano il forum: Nessuno e 5 ospiti

Powered by phpBB © 2002, 2005, 2007, 2008 phpBB Group
Traduzione Italiana phpBB.it

megalab.it: testata telematica quotidiana registrata al Tribunale di Cosenza n. 22/09 del 13.08.2009, editore Master New Media S.r.l.; © Copyright 2008 Master New Media S.r.l. a socio unico - P.I. 02947530784. GRUPPO EDIZIONI MASTER Spa Tutti i diritti sono riservati. Per la pubblicità: Master Advertising