Using the VNC server

From World History Wiki
Jump to: navigation, search
World History Wiki is Brought to you by:
S.J.'s Adventures


The VNC server is used to run an Xwindows server that you can display to your PC using a VNC client.

  1. ssh into VNC server.
    If you don't have an account, get with the UNIX administrators.
  2. Make sure files ~/.vnc/xstartup and ~/.vnc/passwd are created.
    Instructions pending
  3. Start the VNC server using this command
    vncserver -geometry 1260x760 :21
    1. Were -geometry set the display size in number of pixels.
    2. Followed by port # 21.
      NOTE: 21 is an example, you must use a unique port number that no one else is using.
    3. When successfully started it will produce the following output.
      New 'HOSTNAME:20 (usern)' desktop is HOSTNAME:20
      Starting applications specified in /home/usern/.vnc/xstartup
      Log file is /home/usern/.vnc/HOSTNAME:21.log
  4. Install VNC client on your PC.
    1. Google search vnc client then download and install.
  5. Run it and configure to point to VNC server system using nostname:20
    1. 21 is the port number specified in the VNC server command in step 3.



You can also use it as a place to run the screen program to open multiple shells that you can then use to ssh into different servers, and leave them open even if close your ssh program on your desktop.

  1. Using an SSH client on your desktop (I.E. PuTTy) login to into the VNC server.
  2. Create a .screenrc file to configure it's behavior.
    1. An example file might include one or more of the following lines:
      startup_message off
      hardstatus alwayslastline "%{=b}%{G}[*%n %t] %{b}%w %=%{kG}%C%A %D, %M/%d/%Y ^0c"
      term xterm
      setenv DISPLAY YOUR-PCs-NAME.mkcorp.com
  3. If starting screen for the simply type screen and return on the command line.
    If you want to resume a detached session of screen type screen -r and return on the command line.
  4. once started you'll have a list of which shells you have open associated with the current screen program at the bottom of our window.
    1. To send commands to the screen program you use ^A (control + a) followed by the desired command.
    2. For help type ^A then ?
    3. To switch between screens type ^A then the one digest number for the screen.
      If the screen number is more then a single digest then type a "'" after the ^A followed by the number.
    4. To exit a screen simply exit the shell
  5. Once done, simply close your SSH program and leave screen running on the VNC server, so that next time you connect to the VNC sever you can resume your screen session.