screen---+!! My Sandbox

VNC on lxplus

VNC is very useful for working on lxplus (or any remove computer) for at least two reason:

  1. It is much faster than X forwarding if you open any GUIs or additional windows.
  2. If you loose you connection, it will not affect what you are working on. Everything will be waiting for you when you reconnect.
The basic idea is that you start a desktop/window manager on the remove computer and then you connect to it with your local computer. Everything is running on the remote machine and it is just sending you the image of the screen and taking your keyboard and mouse a input. So it is just as if you connected your monitor, keyboard, and mouse directly to the remove computer. Of course, if your connection is slow, it might lag a little, but it will always be faster than X forwarding and if you loose your connection it doesn't have any impact on what your were running.

Part 1: Starting a VNC server on an lxplus node

  • Log in to an lxplus node, but keep track of which one you are actually sent to (e.g., you will need to connect this specific lxplus machine to use VNC.
    ssh ${USER}
  • Set up a screen session and set up kerberos and afs tickets so that the VNC server you start will keep running after you disconnect. (For more information on screen, see the manual pages or google.)
    k5reauth -x -f pagsh
  • Start the VNC server with the geometry you want and the display number you want (e.g., :2). If display :2 is already in use, you will have to pick another number. It doesn't matter which display number you choose, but you must remember which one you used in order to connect later on. (I find the geometry 1880x970 convenient for 1920x1080 screens because you can see the whole desktop without going to fullscreen mode.).
    vncserver -geometry 1880x970 :2
  • If this is the first time you have started a VNC server:
    • You will need to choose a password. It can be whatever you want, it doesn't have to be the same as your CERN nice password, but it should not be too weak.
    • By default, the VNC server will start a really basic window manager (twm). You want it to start a more useful window manager like KDE (you could also start gnome, but I use KDE), so do the following:
      • Stop the VNC sever you just started: vncserver -kill :2
      • Open the file ~/.vnc/xstartup and comment out the line with twm & and add the line startkde &, so it looks like:
        #twm &
        startkde &
      • Now start the VNC server again: vncserver -geometry 1880x970 :2
  • Now detach the screen session with: CTRL+a CTRL+d. This will keep the screen session running in the background so the VNC server will not die when you log out of lupus. If you did this right, you will go back to the terminal you were in before you started screen and it will say [detached].
  • Make sure you remember the node you are on and the VNC display number you are using and log out of lxplus.
  • You can now close this terminal.

Part 2: Connecting to a VNC server that is running on lipless

  • Make an ssh tunnel from the VNC port on your local computer to the VNC server you started on lxplus. The lxplus node is the one from Part 1 and the port number is 590X, where X is the display number from Part 1. If you started the VNC server on lxplus0045 with display number :2, then you make the tunnel with:
    ssh -Y -L 5902:localhost:5902  ${USER}
  • Now start a VNC client on your local computer and connect to localhost:5902. If you don't have a VNC client, you will need to install one. TightVNC and Vinagre are popular options.
  • You will need to enter your VNC password and then a window should come up with the VNC desktop that is running on lxplus. Enjoy! (Or see below for troubleshooting.)


  • If you are not able to connect, it could be that the afs permissions have expired in the screen session where the VNC server is running, so it cannot read and write to you directory. You should be able to fix this with the following:
    • Log in to the lxplus node that is running your VNC server. For example, if you started it on lxplus0045, then:
      ssh ${USER}
    • Connect to the screen session in which you are running the VNC server:
      screen -x
    • You should now be back in the screen session where you started the VNC server. If you do an ls you will see that your afs permissions are now gone. To get them back:
      k5reauth -x -f pagsh
    • Now everything should work again
    • Detach the screen session with: CTRL+a CTRL+d
    • You can now exit out of this window.
  • It could also be that the VNC server was killed and no longer exists. Although VNC servers should be able to run forever, it seems that sometimes they get killed on lxplus, maybe for maintenance purposes. If you go to the node that should be running your VNC server and it's not running, you will just need to start a new one.
  • It could be that the VNC server is still running, but the screen session it was started in is not. I'm not sure how this happens, but it does and I don't know how to fix it. The only thing I know to do is kill the VNC server and start a new one in a new screen session. (If anyone knows a better way, please let me know.)

Online Pixel Readout and Monitoring

VLQ analysis


Topic attachments
I Attachment History Action Size Date Who Comment
PDFpdf AtlasSiliconRodGroup.pdf r1 manage 322.9 K 2014-05-27 - 07:24 JosephHaley ROD Operations Manual with pixel BS format
JPEGjpg D0_mosaic.jpg r1 manage 4537.2 K 2013-02-09 - 15:15 JosephHaley D0 mosaic
PDFpdf iblRodBocManual_v0.4.pdf r1 manage 2208.1 K 2014-05-27 - 07:25 JosephHaley IBL ROD BOC Manual with IBL BS format
Edit | Attach | Watch | Print version | History: r28 < r27 < r26 < r25 < r24 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r26 - 2015-02-17 - JosephHaley
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback