Re: Question sur vncserver
On 2004-05-18 00:06:24 +0200, neo83.ath.cx wrote:
> Donc pour l'instant je l'utilise sur le display 1 ( ce qui n'est pas
> gênant en soient), mais si quelqu'un connait un moyen d'utiliser vnc
> sur le display 0 avec un serveur X lancer, je suis preneur, sinon
> une autre solution pour faire du contrôle à distance me conviendrai
> aussi parfaitement.
Si j'ai bien compris, tu veux pouvoir contrôler une session X (que tu
utilises localement) par VNC à distance. Deux solutions:
1) Lance un vncserver (qui contiendra donc une session X) et une
seconde session X avec uniquement un client VNC. J'utilise le script
suivant:
#!/bin/sh
display=`vncserver -alwaysshared 2>&1 | \
sed -n "s/New 'X' desktop is \(.*\)/\\1/p"`
echo "Display is $display"
startx $HOME/.xinitrc -vnc -fullscreen $display
et mon .xinitrc contient vers la fin:
if [ "$1" = "-vnc" ]; then
shift
# Though the keyboard and the mouse are not used, the video output
# can still be useful (when doing keyboard/mouse sharing only). So
# increase the screen-saver timeout to one hour.
xset s 3600
xset dpms 0 0 3600
# Try vncviewer, else xvncviewer.
vnc="vncviewer -passwd $HOME/.vnc/passwd $*"
trap "exec x$vnc" EXIT
exec $vnc
fi
C'est cette solution que j'ai choisie.
2) Utilise un serveur qui écoute les événements X. Le paquet x11vnc
fait cela:
Description: A VNC server which uses your current X11 session
With x11vnc you can export your currently running X11 session to any VNC
client. You do not have to launch another session as the regular VNC server
does. So it's very useful, if you want to move to another computer without
having to log out, or to help a distant colleague to solve a problem with
their desktop.
C'est a priori une meilleure solution, plus souple et plus légère.
Malheureusement, le contrôle à distance est très saccadé. C'est
pourquoi je ne l'utilise pas.
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
Reply to: