[Lubuntu 13.10] x11vnc and UltraVNC

Non importa se ti serve una mano per partire o se vuoi un consiglio avanzato: gli utenti "del Pinguino" hanno una risposta per ogni necessità.
Regole del forum
Avatar utente
ninja
Livello: Chiavetta USB (8/15)
Livello: Chiavetta USB (8/15)
Messaggi: 487
Iscritto il: lun ago 26, 2013 8:52 pm

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da ninja »

balubeto ha scritto:/etc/rc2.d/s99x11vnc
Lo sai che i sistemi Unix sono case sensitive?

Prova con:

Codice: Seleziona tutto

sudo mv /etc/rc2.d/s99x11vnc /etc/rc2.d/S99x11vnc
System
System
Bot ufficiale TurboLab.it
Bot
Messaggi:
Iscritto il: sab dic 31, 2016 6:19 pm
Contatta: Contatta

Re: Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da System » ven apr 04, 2014 10:33 pm


Avatar utente
balubeto
Livello: DVD-ROM (5/15)
Livello: DVD-ROM (5/15)
Messaggi: 165
Iscritto il: ven lug 12, 2013 10:52 am

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da balubeto »

ninja ha scritto:
balubeto ha scritto:/etc/rc2.d/s99x11vnc
Lo sai che i sistemi Unix sono case sensitive?

Prova con:

Codice: Seleziona tutto

sudo mv /etc/rc2.d/s99x11vnc /etc/rc2.d/S99x11vnc
Ho fatto tale modifica (che cretino!!!) ma non funziona ancora. Come mai?

Grazie

Ciao
balubeto
Avatar utente
ninja
Livello: Chiavetta USB (8/15)
Livello: Chiavetta USB (8/15)
Messaggi: 487
Iscritto il: lun ago 26, 2013 8:52 pm

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da ninja »

Cosa ti dice il file dei log?
È /var/log/x11vnc.log se non ricordo male...
Avatar utente
balubeto
Livello: DVD-ROM (5/15)
Livello: DVD-ROM (5/15)
Messaggi: 165
Iscritto il: ven lug 12, 2013 10:52 am

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da balubeto »

Riepilogando:

Ho trovato questo link https://wiki.edubuntu.org/InstallX11VncOnLtspClients che contiene uno script di x11vnc da inserire nella directory /etc/init.d . Essendo un vecchio script, ho trasformato in :

Codice: Seleziona tutto

#!/bin/sh

case "$1" in
        start)
                start-stop-daemon --start --oknodo \
                        --pidfile /var/run/x11vnc.pid --background \
                        --nicelevel 15 --make-pidfile --exec \
                        /usr/bin/x11vnc -rfbport 5900 -auth /var/run/lightdm/root/:0 -rfbauth /etc/x11vnc.pass -nomodtweak -noxrecord -shared -forever -loop -o /var/log/x11vnc.log
        ;;
        stop)
                start-stop-daemon --stop --oknodo --pidfile /var/run/x11vnc.pid
        ;;
        restart)
                $0 stop
                $0 start
        ;;
        *)
                echo "Usage: $0 start|stop|restart"
        ;;
esac

exit 0
Quindi ho scritto i comandi sudo chmod 755 /etc/init.d/x11vnc e sudo ln -s /etc/init.d/x11vnc /etc/rc2.d/S99x11vnc . Infatti:

Codice: Seleziona tutto

lrwxrwxrwx 1 root root 18 apr  4 19:21 /etc/rc2.d/S99x11vnc -> /etc/init.d/x11vnc
I comandi per creare la password non li ho fatti in quanto li avevo gia fatti all`inizio di questa discussione . Dunque, ho riavviato la macchina, ma il server x11vnc non e` partito ed in piu` non mi ha creato nessun file log. Come mai?

Grazie

Ciao
balubeto
Avatar utente
ninja
Livello: Chiavetta USB (8/15)
Livello: Chiavetta USB (8/15)
Messaggi: 487
Iscritto il: lun ago 26, 2013 8:52 pm

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da ninja »

Prova ad avviarlo tu da terminale e vedi quale output fornisce...

Codice: Seleziona tutto

sudo /etc/init.d/x11vnc start
Avatar utente
balubeto
Livello: DVD-ROM (5/15)
Livello: DVD-ROM (5/15)
Messaggi: 165
Iscritto il: ven lug 12, 2013 10:52 am

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da balubeto »

ninja ha scritto:Prova ad avviarlo tu da terminale e vedi quale output fornisce...

Codice: Seleziona tutto

sudo /etc/init.d/x11vnc start
Ho provato ad eseguire il comando sudo /etc/init.d/x11vnc start e come l'ouput esce:

Codice: Seleziona tutto

start-stop-daemon: invalid option -- 'f'
Come mai?

Grazie

Ciao
balubeto
Avatar utente
ninja
Livello: Chiavetta USB (8/15)
Livello: Chiavetta USB (8/15)
Messaggi: 487
Iscritto il: lun ago 26, 2013 8:52 pm

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da ninja »

Mi viene un dubbio...

Codice: Seleziona tutto

find /var/run/lightdm/
Posta l'output.
Avatar utente
balubeto
Livello: DVD-ROM (5/15)
Livello: DVD-ROM (5/15)
Messaggi: 165
Iscritto il: ven lug 12, 2013 10:52 am

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da balubeto »

ninja ha scritto:Mi viene un dubbio...

Codice: Seleziona tutto

find /var/run/lightdm/
Posta l'output.
Se scrivo questo comando, mi da "Accesso negato"; mentre se eseguo con sudo, ho:

Codice: Seleziona tutto

/var/run/lightdm/
/var/run/lightdm/root
/var/run/lightdm/root/:0
Inoltre, ho creato questo script:

Codice: Seleziona tutto

#! /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: "
#                   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
ed ho salvato in /etc/init.d/x11vnc e, a quanto pare, funziona e riesco a controllare anche il LightDM. Ho notato che, anche se decomento le righe della variabile XKL_XMODMAP_DISABLE, l'X Server non va piu` in crash ma i miei problemi con la tastiera remota. Ora, cosa faccio?

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. Come mai?

Grazie

Ciao
balubeto
Avatar utente
balubeto
Livello: DVD-ROM (5/15)
Livello: DVD-ROM (5/15)
Messaggi: 165
Iscritto il: ven lug 12, 2013 10:52 am

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da balubeto »

Riguardo all'ultimo problema:

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
balubeto
Avatar utente
ninja
Livello: Chiavetta USB (8/15)
Livello: Chiavetta USB (8/15)
Messaggi: 487
Iscritto il: lun ago 26, 2013 8:52 pm

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da ninja »

Prova a dare una letta a questo, forse potresti trovare lo spunto per risolvere...

https://wiki.archlinux.org/index.php/Ke ... on_in_Xorg
Avatar utente
balubeto
Livello: DVD-ROM (5/15)
Livello: DVD-ROM (5/15)
Messaggi: 165
Iscritto il: ven lug 12, 2013 10:52 am

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da balubeto »

Usando questo script:

Codice: Seleziona tutto

#! /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
[code]

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

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
balubeto
Avatar utente
balubeto
Livello: DVD-ROM (5/15)
Livello: DVD-ROM (5/15)
Messaggi: 165
Iscritto il: ven lug 12, 2013 10:52 am

Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da balubeto »

Usando questo script:

Codice: Seleziona tutto

#! /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
balubeto
System
System
Bot ufficiale TurboLab.it
Bot
Messaggi:
Iscritto il: sab dic 31, 2016 6:19 pm
Contatta: Contatta

Re: Re: [Lubuntu 13.10] x11vnc and UltraVNC

Messaggio da System » mer apr 09, 2014 12:58 pm


Rispondi