Content-Security-Policy: default-src 'none'
Content-Type: text/plain; charset=UTF-8
Content-Length: 2923
Content-Disposition: inline; filename="lightdm-vncserver-check.patch"
Last-Modified: Sun, 29 Sep 2024 14:15:14 GMT
Expires: Wed, 27 Sep 2034 14:15:14 GMT
ETag: "0e31ff3d68ab966dd18d76a672b5b9cb6f6b6a39"

Honor the Xvnc command specified in the config instead of using a hard-coded
default.

Submitted upstream at: https://github.com/canonical/lightdm/pull/265

diff --git a/src/lightdm.c b/src/lightdm.c
index 74f9ff2d..0ccfcd78 100644
--- a/src/lightdm.c
+++ b/src/lightdm.c
@@ -349,27 +349,42 @@ start_display_manager (void)
     /* Start the VNC server */
     if (config_get_boolean (config_get_instance (), "VNCServer", "enabled"))
     {
-        g_autofree gchar *path = g_find_program_in_path ("Xvnc");
-        if (path)
+        /* Validate that a the VNC command is available. */
+        g_autofree gchar *command = config_get_string (config_get_instance (), "VNCServer", "command");
+        if (command)
         {
-            vnc_server = vnc_server_new ();
-            if (config_has_key (config_get_instance (), "VNCServer", "port"))
+            g_auto(GStrv) tokens = g_strsplit (command, " ", 2);
+            if (!g_find_program_in_path (tokens[0]))
             {
-                gint port = config_get_integer (config_get_instance (), "VNCServer", "port");
-              </td></tr></table>
<table class='tabs'><tr><td>
<a href='/guix/about/'>about</a><a href='/guix/'>summary</a><a href='/guix/refs/?id=52dbc3d0843b32f313fcb538788a3fff894f777d'>refs</a><a href='/guix/log/gnu/packages/patches/openssl-1.1-c-rehash-in.patch'>log</a><a class='active' href='/guix/tree/gnu/packages/patches/openssl-1.1-c-rehash-in.patch?id=52dbc3d0843b32f313fcb538788a3fff894f777d'>tree</a><a href='/guix/commit/gnu/packages/patches/openssl-1.1-c-rehash-in.patch?id=52dbc3d0843b32f313fcb538788a3fff894f777d'>commit</a><a href='/guix/diff/gnu/packages/patches/openssl-1.1-c-rehash-in.patch?id=52dbc3d0843b32f313fcb538788a3fff894f777d'>diff</a></td><td class='form'><form class='right' method='get' action='/guix/log/gnu/packages/patches/openssl-1.1-c-rehash-in.patch'>
<input type='hidden' name='id' value='52dbc3d0843b32f313fcb538788a3fff894f777d'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/guix/tree/?id=52dbc3d0843b32f313fcb538788a3fff894f777d'>root</a>/<a href='/guix/tree/gnu?id=52dbc3d0843b32f313fcb538788a3fff894f777d'>gnu</a>/<a href='/guix/tree/gnu/packages?id=52dbc3d0843b32f313fcb538788a3fff894f777d'>packages</a>/<a href='/guix/tree/gnu/packages/patches?id=52dbc3d0843b32f313fcb538788a3fff894f777d'>patches</a>/<a href='/guix/tree/gnu/packages/patches/openssl-1.1-c-rehash-in.patch?id=52dbc3d0843b32f313fcb538788a3fff894f777d'>openssl-1.1-c-rehash-in.patch</a></div><div class='content'>blob: c96493b584ab6f5f1d596f226e622208c740bf57 (<a href='/guix/about/gnu/packages/patches/openssl-1.1-c-rehash-in.patch?id=52dbc3d0843b32f313fcb538788a3fff894f777d'>about</a>) (<a href='/guix/plain/gnu/packages/patches/openssl-1.1-c-rehash-in.patch?id=52dbc3d0843b32f313fcb538788a3fff894f777d'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
<a id='n9' href='#n9'>9</a>
<a id='n10' href='#n10'>10</a>
<a id='n11' href='#n11'>11</a>
<a id='n12' href='#n12'>12</a>
<a id='n13' href='#n13'>13</a>
<a id='n14' href='#n14'>14</a>
<a id='n15' href='#n15'>15</a>
<a id='n16' href='#n16'>16</a>
<a id='n17' href='#n17'>17</a>
<a id='n18' href='#n18'>18</a>
<a id='n19' href='#n19'>19</a>
</pre></td>
<td class='lines'><pre><code>This patch removes the explicit reference to the 'perl' binary,
such that OpenSSL does not retain a reference to Perl.

The 'c_rehash' program is seldom used, but it is used nonetheless
to create symbolic links to certificates, for instance in the 'nss-certs'
package.

diff --git a/tools/c_rehash.in b/tools/c_rehash.in
index 421fd89208..93aca4e168 100644
--- a/tools/c_rehash.in
+++ b/tools/c_rehash.in
@@ -1,4 +1,6 @@
-#!{- $config{HASHBANGPERL} -}
+eval '(exit $?0)' &amp;&amp; eval 'exec perl -wS "$0" ${1+"$@"}'
+  &amp; eval 'exec perl -wS "$0" $argv:q'
+    if 0;
 
 # {- join("\n# ", @autowarntext) -}
 # Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved.
</code></pre></td></tr></table>
</div> <!-- class=content -->
                         <div class=footer>generated by
                             <a href="https://git.zx2c4.com/cgit/about/">
                                 cgit
                             </a>
                         </div>
                        </div> <!-- id=cgit -->
</body>
</html>
