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 <[EMAIL PROTECTED]> - 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

Répondre à