# Export a window to the Projector

Please note, the instructor's workstation in room 105 has a resolution of 1280×1024, the student workstations have screen resolutions of 14450×900. Please resize any window you want to export to fit on the display where you are exporting it.

If students cannot see the screen you can try exporting a window from the Instructor's Workstation. This will allow students to view that window on their local machine. Students will not be able to modify the exported window, only view it. Also bear in mind that the more students who connect to the display, the slower it will get. There are some ways to speed things up. If doing this is actually useful, then I will work on making it faster.

#### The ewc command

I have created a command called ewc which stands for @@export window classlab@@. This script will run x11vnc for you and tries to pick appropriate defaults. As time goes on if people use this script I we will refine what this command does. Currently, if run from the classlinux machine it simply runs:

 x11vnc -id pick -viewonly -shared -forever -allow /usr/local/etc/classlab

To use it, all you have to do is issue the command ewc from a terminal on the workstation where you want to export a window for viewing. It will prompt you to click in the window you want to export. When ewc launches x11vnc you will see warnings about it running without a password, once those have been displayed it will start the x11vnc server and your students can connect to that server with the command:

vncviewer classlinux:0

When you close the exported window, the session will end. If you want to end it before closing that window, you can give a control-c in the terminal where you gave the ewc command.

The ewc command can also be used to allow the display of a window from one of the student workstations on the instructor's workstation and the projector.

If run from a machine in room 105 other than the instructor's linux workstation ewc will run the command:

  x11vnc -id pick -viewonly -allow classlinux.cs.vassar.edu

Ask the student to open a terminal and issue the command ewc in that terminal. This will launch x11vnc on their workstation. They will have to pick the window they want to export and once they do they will see the x11vnc warnings about no password being set and the server will launch. It will display a line in their terminal that will give the machine name and connection number you will need in order to connect. It will most likely be the second to the last line. It will look something like this:

The VNC desktop is:      tl123:0

Where “123” is the workstation number.

In a terminal at the instructor's workstation, issue the command:

vncviewer tl123:0

where tl123 is the name of the student's workstation. That should open a copy of their window on your display.

Closing the window on the instructors workstation will close the server on the student's machine.

The ewc command can also set up collaborative windows where the connecting remote machines can make changes in the exported window as if they were the local user.

For a student to export a window so that you can see and make changes from the instructor's machine ask the student to issue the ewccommand but add a -c for collaborate :

ewc -c

In this case the command that ewc will issue is:

 x11vnc -id pick -allow classlinux

The student will then need to pick the window they want to export. Once they have done that x11vnc will complain about there not being any password and then start the server. The second to the last line in the terminal will look something like this:

The VNC desktop is:      tl123:0

Where “123” is the workstation number.

In a terminal at the instructor's workstation, issue the command:

vncviewer tl123:0

where tl123 is the name of the student's workstation. That should open a copy of their window on your display.

Closing the window on the instructors workstation will close the server on the student's machine.