Differences between revisions 3 and 14 (spanning 11 versions)
Revision 3 as of 2010-10-07 12:56:16
Size: 992
Editor: bonaccos
Comment:
Revision 14 as of 2013-11-06 07:04:00
Size: 2570
Editor: hgiger
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
 * Start VNC Server on remote host  1. Start VNC Server on remote host
 {{{
  $ ssh <remoteHost>
  $ vncserver :<display#> -localhost
 }}}
 /!\ Warning!
 Always choose a [[http://en.wikipedia.org/wiki/Password_strength|strong password]] when starting vncserver. Otherwise, you'll
 make it trivial for intruders to hijack your account!
 <<BR>><<BR>>
 1. Start VNC viewer on your machine
 {{{
  $ vncviewer -via <remotehost>.ee.ethz.ch localhost:<display#>
 }}}
Line 7: Line 19:
{{{
vncserver :<display#> -localhost
}}}
 * Start viewer on client
  '''Note:''' Windows users might like [[http://www.karlrunge.com/x11vnc/ssvnc.html|SSVNC]] which eases connecting to VNC via SSH tunnel.<<BR>>
  Mac users may establish the tunnel via SSH, then use "open vnc://localhost:PORT" to use the built-in VNC client.
 <<BR>>
 1. And finally, after you have closed the VNC-Window on your machine, '''it's important to end the vnc process on the remote host to avoid unused processes''':
 {{{
  $ ssh <remoteHost>
  $ vncserver -kill :<display#>
 }}}
 
= Troubleshooting =
Line 12: Line 30:
{{{
vncviewer -via <remotehost>.ee.ethz.ch localhost:<display#>
 1. If you are using gnome as default desktop environment and are affected by completely wrong keyboard-layout after logon to gnome (http://bugs.debian.org/476727) use the following workaround:

 Directly in the line before {{{/etc/X11/Xsession}}} of {{{$HOME/.vnc/xstartup}}} add the line

 {{{
  export XKL_XMODMAP_DISABLE=1
 }}}

 1. If you still want to use gnome2 or xfce instead of gnome3 change following:
   {{{
   #!/bin/sh

    xrdb $HOME/.Xresources
    xsetroot -solid grey
    export XKL_XMODMAP_DISABLE=1
    /usr/bin/gnome-session-fallback
   #/etc/X11/Xsession
   #/usr/bin/wmaker
   #/usr/bin/startkde
Line 16: Line 51:
= Troubeshooting =    In this case with gnome-session-falllback please make sure to check next point with the keyboard changes. Point 3
Line 18: Line 53:
If you are using gnome as default desktop environment and are affected by completely wrong keyboard-layout after logon to gnome (http://bugs.debian.org/476727) use the following workaround:
Line 20: Line 54:
Directly in the line before {{{/etc/X11/Xsession}}} of {{{$HOME/.vnc/xstartup}}} add the line  1. If you are using gnome as default desktop environment and the up and down arrows behave wrong (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679543) do the following:
Line 22: Line 56:
{{{
export XKL_XMODMAP_DISABLE=1
}}}
    * Go to: Applications->System Tools->Preferences->System Settings->Keyboard->Shortcuts->Windows
    * And disable options: "Toggle maximization state" and "Restore windows"

----
[[CategoryLXCL]]

How do I use VNC?

Start a vnc-server on the machine you want to control, with vncserver :1 (:1 means display 1). You will be asked to define a password for accessing your server and another one for just observing without interacting. After that, your server is up and running and you can connect to it with any available VNC-clients (e.g. TightVNC) by entering the hostname you want to connect to, like hostname:1.

VNC through SSH tunnel

  1. Start VNC Server on remote host
      $ ssh <remoteHost>
      $ vncserver :<display#> -localhost

    /!\ Warning! Always choose a strong password when starting vncserver. Otherwise, you'll make it trivial for intruders to hijack your account!

  2. Start VNC viewer on your machine
      $ vncviewer -via <remotehost>.ee.ethz.ch localhost:<display#>
    • Note: Windows users might like SSVNC which eases connecting to VNC via SSH tunnel.
      Mac users may establish the tunnel via SSH, then use "open vnc://localhost:PORT" to use the built-in VNC client.


  3. And finally, after you have closed the VNC-Window on your machine, it's important to end the vnc process on the remote host to avoid unused processes:

      $ ssh <remoteHost>
      $ vncserver -kill :<display#>

Troubleshooting

  1. If you are using gnome as default desktop environment and are affected by completely wrong keyboard-layout after logon to gnome (http://bugs.debian.org/476727) use the following workaround:

    Directly in the line before /etc/X11/Xsession of $HOME/.vnc/xstartup add the line

      export XKL_XMODMAP_DISABLE=1
  2. If you still want to use gnome2 or xfce instead of gnome3 change following:
    •    #!/bin/sh
      
          xrdb $HOME/.Xresources
          xsetroot -solid grey
          export XKL_XMODMAP_DISABLE=1
          /usr/bin/gnome-session-fallback
         #/etc/X11/Xsession
         #/usr/bin/wmaker
         #/usr/bin/startkde
      In this case with gnome-session-falllback please make sure to check next point with the keyboard changes. Point 3
  3. If you are using gnome as default desktop environment and the up and down arrows behave wrong (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679543) do the following:

    • Go to: Applications->System Tools->Preferences->System Settings->Keyboard->Shortcuts->Windows

    • And disable options: "Toggle maximization state" and "Restore windows"


CategoryLXCL