Submitted upstream: https://github.com/canonical/lightdm/pull/312 diff --git a/src/vnc-server.c b/src/vnc-server.c index d3500764..00a2fc02 100644 --- a/src/vnc-server.c +++ b/src/vnc-server.c @@ -126,18 +126,10 @@ vnc_server_start (VNCServer *server) g_return_val_if_fail (server != NULL, FALSE); - g_autoptr(GError) ipv4_error = NULL; - priv->socket = open_tcp_socket (G_SOCKET_FAMILY_IPV4, priv->port, priv->listen_address, &ipv4_error); - if (ipv4_error) - g_warning ("Failed to create IPv4 VNC socket: %s", ipv4_error->message); - - if (priv->socket) - { - GSource *source = g_socket_create_source (priv->socket, G_IO_IN, NULL); - g_source_set_callback (source, (GSourceFunc) read_cb, server, NULL); - g_source_attach (source, NULL); - } - + // Bind to IPv6 first, as this implies binding to 0.0.0.0 in the + // Linux kernel default configuration, which would otherwise cause + // IPv6 clients to fail with "Error binding to address [::]:5900: + // Address already in use" (#266). g_autoptr(GError) ipv6_error = NULL; priv->socket6 = open_tcp_socket (G_SOCKET_FAMILY_IPV6, priv->port, priv->listen_address, &ipv6_error); if (ipv6_error) @@ -150,6 +142,18 @@ vnc_server_start (VNCServer *server) g_source_attach (source, NULL); } + g_autoptr(GError) ipv4_error = NULL; + priv->socket = open_tcp_socket (G_SOCKET_FAMILY_IPV4, priv->port, priv->listen_address, &ipv4_error); + if (ipv4_error) + g_warning ("Failed to create IPv4 VNC socket: %s", ipv4_error->message); + + if (priv->socket) + { + GSource *source = g_socket_create_source (priv->socket, G_IO_IN, NULL); + g_source_set_callback (source, (GSourceFunc) read_cb, server, NULL); + g_source_attach (source, NULL); + } + if (!priv->socket && !priv->socket6) return FALSE; tion>
path: root/gnu/build/bootloader.scm
AgeCommit message (Expand)Author
2022-06-24image: Add support for 32bit UEFI....* gnu/bootloader/grub.scm (grub-efi32-bootloader): New variable. (install-grub-efi32): New variable. * gnu/build/bootloader.scm (install-efi): Add a 'targets' keyword argument. (install-efi-loader): Likewise. * gnu/build/image.scm (initialize-efi32-partition): New procedure. * gnu/packages/bootloaders.scm (grub-efi32): New variable. * gnu/system/image.scm (esp32-partition): New variable (efi32-disk-image): New variable. (efi32-raw-image-type): New variable. (system-disk-image)[partition-image]: Set '#:grub-efi32' when calling the partition initializer. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Denis 'GNUtoo' Carikli
2021-11-12build: bootloader: Add GPT support....* gnu/build/bootloader.scm (install-efi-loader): Add GPT support. Mathieu Othacehe
2020-11-03system: reconfigure: Use the disk-installer if provided....Fixes: <https://issues.guix.gnu.org/44101>. * gnu/build/bootloader.scm (write-file-on-device): Pass 'no-fail flag instead of 'no-create. Use a latin-1 transcoder. * guix/scripts/system/reconfigure.scm (install-bootloader-program): Add a "disk-installer" argument and use it as a fallback. (install-bootloader): Adapt accordingly. * gnu/tests/reconfigure.scm (run-install-bootloader-test): Ditto. Mathieu Othacehe
2020-10-05bootloader: Fix u-boot installation....This is a follow-up of f19cf27c2b9ff92e2c0fd931ef7fde39c376adaa. The bootloader installation must be done on the final disk-image, hence using "disk-image-installer" instead of "installer" callback. * gnu/bootloader/u-boot.scm: Turn all installer callbacks into disk-image-installer callbacks. * gnu/build/bootloader.scm (write-file-on-device): Open the output file with 'no-truncate and 'no-create options. * gnu/system/image.scm (with-imported-modules*): Add (gnu build bootloader) module. Mathieu Othacehe
2020-05-05build: bootloader: Add install-efi procedure....* gnu/build/bootloader.scm (install-efi): New procedure copied from (gnu build vm). (install-efi-loader): New exported procedure, wrapping install-efi. * gnu/build/vm.scm (initialize-hard-disk): Adapt to use install-efi-loader. Mathieu Othacehe