Indice del forum Olimpo Informatico
I Forum di Zeus News
Leggi la newsletter gratuita - Attiva il Menu compatto
 
 FAQFAQ   CercaCerca   Lista utentiLista utenti   GruppiGruppi   RegistratiRegistrati 
 ProfiloProfilo   Messaggi privatiMessaggi privati   Log inLog in 

    Newsletter RSS Facebook Twitter Contatti Ricerca
[Lubuntu 13.10] x11vnc and UltraVNC
Nuovo argomento   Rispondi    Indice del forum -> *Ubuntu
Precedente :: Successivo  
Autore Messaggio
balubeto
Dio minore
Dio minore


Registrato: 19/05/06 08:22
Messaggi: 757

MessaggioInviato: 22 Mar 2014 12:53    Oggetto: [Lubuntu 13.10] x11vnc and UltraVNC Rispondi citando

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
Top
Profilo Invia messaggio privato
balubeto
Dio minore
Dio minore


Registrato: 19/05/06 08:22
Messaggi: 757

MessaggioInviato: 25 Mar 2014 09:28    Oggetto: Rispondi citando

Da Linux, ho scritto dal terminale:

Citazione:

sudo x11vnc -storepasswd /etc/x11vnc.pass


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

Citazione:

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
Top
Profilo Invia messaggio privato
balubeto
Dio minore
Dio minore


Registrato: 19/05/06 08:22
Messaggi: 757

MessaggioInviato: 25 Mar 2014 19:34    Oggetto: Rispondi citando

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

Citazione:

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
Top
Profilo Invia messaggio privato
balubeto
Dio minore
Dio minore


Registrato: 19/05/06 08:22
Messaggi: 757

MessaggioInviato: 26 Mar 2014 12:01    Oggetto: Rispondi citando

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
Top
Profilo Invia messaggio privato
balubeto
Dio minore
Dio minore


Registrato: 19/05/06 08:22
Messaggi: 757

MessaggioInviato: 27 Mar 2014 12:16    Oggetto: Rispondi citando

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`:

Citazione:

!/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.
Top
Profilo Invia messaggio privato
balubeto
Dio minore
Dio minore


Registrato: 19/05/06 08:22
Messaggi: 757

MessaggioInviato: 27 Mar 2014 19:49    Oggetto: Rispondi citando

Ho notato che con il comando:

Codice:

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
Top
Profilo Invia messaggio privato
balubeto
Dio minore
Dio minore


Registrato: 19/05/06 08:22
Messaggi: 757

MessaggioInviato: 30 Mar 2014 16:36    Oggetto: Rispondi citando

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

Codice:

[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
Top
Profilo Invia messaggio privato
balubeto
Dio minore
Dio minore


Registrato: 19/05/06 08:22
Messaggi: 757

MessaggioInviato: 07 Apr 2014 11:57    Oggetto: Rispondi citando

Ho creato questo script:

Codice:

#! /bin/sh
#
### BEGIN INIT INFO
# Provides: x11vnc
# Required-Start: $syslog $local_fs
# Required-Stop: $syslog $local_fs
# Should-Start: LightDM
# Default-Start: 2
# Default-Stop: 1
# Short-Description: x11 vnc
# Description: x11vnc
### END INIT INFO

DAEMON=/usr/bin/x11vnc
NAME=x11vnc
DESC="X11 vnc"

test -x $DAEMON || exit 0

DAEMON_OPTS="-auth /var/run/lightdm/root/:0 -rfbauth /etc/x11vnc.pass -nomodtweak -shared -forever -o /var/log/x11vnc.log -bg"

set -e

 case "$1" in
           start)
                   echo -n "Starting $DESC: "
                   start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
                                                     --exec $DAEMON -- $DAEMON_OPTS &
                   echo "$NAME."
           ;;
           stop)
                   echo -n "Stopping $DESC: "
                   start-stop-daemon --stop --oknodo --quiet --pidfile /var/run/$NAME.pid \
                                                    --exec $DAEMON
                   echo "$NAME."
           ;;
           restart)
                      echo -n "Restarting $DESC: "
                      start-stop-daemon --stop --quiet --pidfile \
                      /var/run/$NAME.pid --exec $DAEMON
                      sleep 1
                      start-stop-daemon --start --quiet --pidfile \
                      /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
                      echo "$NAME."
          ;;
          status)
                     if [ -s /var/run/$NAME.pid ]; then
                        RUNNING=$(cat /var/run/$NAME.pid)
                        if [ -d /proc/$RUNNING ]; then
                            if [ $(readlink /proc/$RUNNING/exe) = $DAEMON ]; then
                                echo "$NAME is running."
                                exit 0
                            fi
                        fi
                        # No such PID, or executables don't match
                        echo "$NAME is not running, but pidfile existed."
                        rm /var/run/$NAME.pid
                        exit 1
                     else
                           rm -f /var/run/$NAME.pid
                           echo "$NAME not running."
                           exit 1
                     fi
          ;;
          *)
            N=/etc/init.d/$NAME
            echo "Usage: $N {start|stop|restart|force-reload}" >&2
            exit 1
           ;;
 esac

exit 0


ed ho salvato in /etc/init.d/x11vnc e, a quanto pare, funziona e riesco a controllare anche il LightDM. Ora, come faccio a risolvere i problemi con la tastiera remota?

Ora, mi sono accorto che, quando un client VNC e` connesso, la funzione di ripetizione della tastiera dell'host (e del client sul host) si disattiva automaticamente e viene ripristinata quando i client VNC si disconnettono.

Per esempio, in condizioni nornali, quando tengo premuto un tasto sull`host, il suo input viene ripetuto fino a quando lo lascio andare; mentre quando un client VNC e` connesso, questa funzione di ripetizione del tasto non funziona piu`.


Come mai?

Grazie

Ciao
Top
Profilo Invia messaggio privato
balubeto
Dio minore
Dio minore


Registrato: 19/05/06 08:22
Messaggi: 757

MessaggioInviato: 09 Apr 2014 12:01    Oggetto: Rispondi

Usando questo script:

Codice:

#! /bin/sh
#
### BEGIN INIT INFO
# Provides: x11vnc
# Required-Start: $syslog $local_fs
# Required-Stop: $syslog $local_fs
# Should-Start: LightDM
# Default-Start: 2
# Default-Stop: 1
# Short-Description: x11 vnc
# Description: x11vnc
### END INIT INFO

DAEMON=/usr/bin/x11vnc
NAME=x11vnc
DESC="X11 vnc"

test -x $DAEMON || exit 0

DAEMON_OPTS="-auth /var/run/lightdm/root/:0 -rfbauth /etc/x11vnc.pass -noxkb -modtweak -capslock -repeat -flashcmap -shared -forever -o /var/log/x11vnc.log -bg"

set -e

 case "$1" in
           start)
                   echo -n "Starting $DESC: "
                   export XKL_XMODMAP_DISABLE=1
                   start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
                                                     --exec $DAEMON -- $DAEMON_OPTS &
                   echo "$NAME."
           ;;
           stop)
                   export XKL_XMODMAP_DISABLE=0
                   echo -n "Stopping $DESC: "
                   start-stop-daemon --stop --oknodo --quiet --pidfile /var/run/$NAME.pid \
                                                    --exec $DAEMON
                   echo "$NAME."
           ;;
           restart)
                      export XKL_XMODMAP_DISABLE=1
                      echo -n "Restarting $DESC: "
                      start-stop-daemon --stop --quiet --pidfile \
                      /var/run/$NAME.pid --exec $DAEMON
                      sleep 1
                      start-stop-daemon --start --quiet --pidfile \
                      /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
                      echo "$NAME."
          ;;
          status)
                     if [ -s /var/run/$NAME.pid ]; then
                        RUNNING=$(cat /var/run/$NAME.pid)
                        if [ -d /proc/$RUNNING ]; then
                            if [ $(readlink /proc/$RUNNING/exe) = $DAEMON ]; then
                                echo "$NAME is running."
                                exit 0
                            fi
                        fi
                        # No such PID, or executables don't match
                        echo "$NAME is not running, but pidfile existed."
                        rm /var/run/$NAME.pid
                        exit 1
                     else
                           rm -f /var/run/$NAME.pid
                           echo "$NAME not running."
                           exit 1
                     fi
          ;;
          *)
            N=/etc/init.d/$NAME
            echo "Usage: $N {start|stop|restart|force-reload}" >&2
            exit 1
           ;;
 esac

exit 0


riesco, da remoto, ad avere il layout di una tastiera US (di Linux) meno il simbolo >. Ossia, quando premo Shift+>, mi appare il simbolo <. In altre parole, da remoto, ho due simboli <. Come mai? Come devo fare a risolverlo?

Vi ricordo che il layout della tastiera di Windows e` inglese-Stati uniti (EN); mentre quello della tatiera di Linux e` italiano-Italiano.

Grazie

Ciao
Top
Profilo Invia messaggio privato
Mostra prima i messaggi di:   
Nuovo argomento   Rispondi    Indice del forum -> *Ubuntu Tutti i fusi orari sono GMT + 1 ora
Pagina 1 di 1

 
Vai a:  
Non puoi inserire nuovi argomenti
Non puoi rispondere a nessun argomento
Non puoi modificare i tuoi messaggi
Non puoi cancellare i tuoi messaggi
Non puoi votare nei sondaggi