The VNC Protocol and Qt for Embedded LinuxVNC (Virtual Network Computing) software makes it possible to view and interact with one computer (the "server") from any other computer or mobile device (the "viewer") anywhere on a network. VNC clients are available for a vast array of display systems, including X11, Mac OS X and Windows. Configuring Qt with VNC CapabilitiesTo run a Qt for Embedded Linux application using the VNC protocol, the Qt for Embedded Linux library must be configured and compiled with the -qt-gfx-vnc option: cd path/to/QtEmbedded ./configure -qt-gfx-vnc make Running a Server ApplicationStart a server application by specifying the -qws command line option when running the application. (This can also be specified in the application's source code.) Use the -display command line option to specify the VNC server's driver and the virtual screen to use. For example: cd path/to/QtEmbedded/examples/widgets/analogclock ./analogclock -qws -display VNC:0 The application will act as a VNC server which can be accessed using an ordinary VNC client, either on the development machine or from a different machine on a network. For example, using the X11 VNC client to view the application from the same machine: vncviewer localhost:0 To interact with the application from another machine on the network, run a VNC client pointing to the machine that is running the server application. Qt for Embedded Linux will create a 640 by 480 pixel display by default. Alternatively, the QWS_SIZE environment variable can be used to set another size; e.g., QWS_SIZE=240x320. Running Client ApplicationsIf you want to run more than one application on the same display, you only need to start the first one as a server application, using the -qws command line option to indicate that it will manage other windows. analogclock -qws -display VNC:0 Subsequent client applications can be started without the -qws option, but will each require the same -display option and argument as those used for the server. calculator -display VNC:0 scribble -display VNC:0 imageviewer -display VNC:0 However, for the clients, this option will not cause a new VNC server to be started, but only indicates that their windows will appear on the virtual screen managed by the server application. Related ResourcesIt is not always necessary to specify the -qws command line option when running a server application as long as the QApplication object used by the application has been constructed with the QApplication::GuiServer flag. See the running applications documentation for more details about server and client applications.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. |