File: qt-embedded-vnc.html

package info (click to toggle)
qt4-x11 4%3A4.8.2%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 701,696 kB
  • sloc: cpp: 2,686,179; ansic: 375,485; python: 25,859; sh: 19,349; xml: 17,091; perl: 14,765; yacc: 5,383; asm: 5,038; makefile: 1,259; lex: 555; ruby: 526; objc: 347; cs: 112; pascal: 112; php: 54; sed: 34
file content (101 lines) | stat: -rw-r--r-- 6,610 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- emb-vnc.qdoc -->
  <title>Qt 4.8: The VNC Protocol and Qt for Embedded Linux</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li>The VNC Protocol and Qt for Embedded Linux</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#configuring-qt-with-vnc-capabilities">Configuring Qt with VNC Capabilities</a></li>
<li class="level1"><a href="#running-a-server-application">Running a Server Application</a></li>
<li class="level1"><a href="#running-client-applications">Running Client Applications</a></li>
<li class="level1"><a href="#related-resources">Related Resources</a></li>
</ul>
</div>
<h1 class="title">The VNC Protocol and Qt for Embedded Linux</h1>
<span class="subtitle"></span>
<!-- $$$qt-embedded-vnc.html-description -->
<div class="descr"> <a name="details"></a>
<p>VNC (Virtual Network Computing) software makes it possible to view and interact with one computer (the &quot;server&quot;) from any other computer or mobile device (the &quot;viewer&quot;) anywhere on a network.</p>
<p class="centerAlign"><img src="images/qt-embedded-vnc-screen.png" alt="" /></p><p>VNC clients are available for a vast array of display systems, including X11, Mac OS X and Windows.</p>
<a name="configuring-qt-with-vnc-capabilities"></a>
<h2>Configuring Qt with VNC Capabilities</h2>
<p>To run a <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> application using the VNC protocol, the <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> library must be configured and compiled with the <tt>-qt-gfx-vnc</tt> option:</p>
<pre class="cpp"> cd path/to/QtEmbedded
 ./configure -qt-gfx-vnc
 make</pre>
<a name="running-a-server-application"></a>
<h2>Running a Server Application</h2>
<p>Start a server application by specifying the <tt>-qws</tt> command line option when running the application. (This can also be specified in the application's source code.) Use the <tt>-display</tt> command line option to specify the VNC server's driver and the virtual screen to use. For example:</p>
<pre class="cpp"> cd path/to/QtEmbedded/examples/widgets/analogclock
 ./analogclock -qws -display VNC:0</pre>
<p>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.</p>
<p>For example, using the X11 VNC client to view the application from the same machine:</p>
<pre class="cpp"> vncviewer localhost:0</pre>
<p>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.</p>
<p><a href="qt-embedded-linux.html">Qt for Embedded Linux</a> will create a 640 by 480 pixel display by default. Alternatively, the <tt>QWS_SIZE</tt> environment variable can be used to set another size; e.g&#x2e;, <tt>QWS_SIZE=240x320</tt>.</p>
<a name="running-client-applications"></a>
<h2>Running Client Applications</h2>
<p>If 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 <tt>-qws</tt> command line option to indicate that it will manage other windows.</p>
<pre class="cpp"> analogclock -qws -display VNC:0</pre>
<p>Subsequent client applications can be started <i>without</i> the <tt>-qws</tt> option, but will each require the same <tt>-display</tt> option and argument as those used for the server.</p>
<pre class="cpp"> calculator -display VNC:0
 scribble -display VNC:0
 imageviewer -display VNC:0</pre>
<p>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.</p>
<a name="related-resources"></a>
<h2>Related Resources</h2>
<p>It is not always necessary to specify the <tt>-qws</tt> command line option when running a server application as long as the <a href="qapplication.html">QApplication</a> object used by the application has been constructed with the <a href="qapplication.html#Type-enum">QApplication::GuiServer</a> flag.</p>
<p>See the <a href="qt-embedded-running.html">running applications</a> documentation for more details about server and client applications.</p>
<table class="generic">
<tr valign="top" class="odd"><td ><b>The Virtual Framebuffer</b><p>The <a href="qvfb.html">virtual framebuffer</a> is an alternative technique recommended for development and debugging purposes.</p>
<p>The virtual framebuffer emulates a framebuffer using a shared memory region and the <tt>qvfb</tt> tool to display the framebuffer in a window.</p>
<p>Its use of shared memory makes the virtual framebuffer much faster and smoother than using the VNC protocol, but it does not operate over a network.</p>
</td><td ><img src="images/qt-embedded-virtualframebuffer.png" alt="" /></td></tr>
</table>
</div>
<!-- @@@qt-embedded-vnc.html -->
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2012 Nokia Corporation and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      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. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>