diff --git a/fix-computer-info.patch b/fix-computer-info.patch index bb11229..e497980 100644 --- a/fix-computer-info.patch +++ b/fix-computer-info.patch @@ -1,7 +1,38 @@ +From 18bf08d14ed77db00a17e74c5ce04c812ef251af Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Mon, 26 Oct 2009 10:45:49 -0400 +Subject: [PATCH 1/2] Use gethostname instead of g_get_host_name in greeter + +The latter is unreliable when the hostname changes at runtime. +--- + gui/simple-greeter/gdm-greeter-login-window.c | 6 +++++- + 1 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c +index 9a29a2e..9d75b8c 100644 +--- a/gui/simple-greeter/gdm-greeter-login-window.c ++++ b/gui/simple-greeter/gdm-greeter-login-window.c +@@ -996,7 +996,11 @@ create_computer_info (GdmGreeterLoginWindow *login_window) + + label = glade_xml_get_widget (login_window->priv->xml, "computer-info-name-label"); + if (label != NULL) { +- gtk_label_set_text (GTK_LABEL (label), g_get_host_name ()); ++ char localhost[HOST_NAME_MAX + 1] = "";• ++ ++ if (gethostname (localhost, HOST_NAME_MAX) == 0) {• ++ gtk_label_set_text (GTK_LABEL (label), localhost); ++ } + } + + label = glade_xml_get_widget (login_window->priv->xml, "computer-info-version-label"); +-- +1.6.5.1 + + From 03e01936f5c11580a1485c492355eb0a468ea0f6 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 26 Oct 2009 10:53:25 -0400 -Subject: [PATCH] Don't bother showing hostname if it's not unique +Subject: [PATCH 2/2] Don't bother showing hostname if it's not unique The advantage of showing hostname by default is it is a unique identifier for people who have multiple machines.