Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
lightdm
lightdm-xauthlocalhostname-support.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lightdm-xauthlocalhostname-support.patch of Package lightdm
set XAUTHLOCALHOSTNAME to localhost for local logins to avoid issues in the session in case the hostname changes diff --git a/src/seat-xlocal.c b/src/seat-xlocal.c --- a/src/seat-xlocal.c +++ b/src/seat-xlocal.c @@ -141,6 +141,7 @@ seat_xlocal_run_script (Seat *seat, Disp path = xserver_local_get_authority_file_path (xserver); process_set_env (script, "DISPLAY", xserver_get_address (XSERVER (xserver))); process_set_env (script, "XAUTHORITY", path); + process_set_env (script, "XAUTHLOCALHOSTNAME", "localhost"); g_free (path); SEAT_CLASS (seat_xlocal_parent_class)->run_script (seat, display, script); diff --git a/src/xserver-local.c b/src/xserver-local.c --- a/src/xserver-local.c +++ b/src/xserver-local.c @@ -397,7 +397,8 @@ xserver_local_start (DisplayServer *disp XServerLocal *server = XSERVER_LOCAL (display_server); gboolean result; gchar *filename, *dir, *absolute_command; - gchar hostname[1024], *number; + gchar hostname[] = "localhost"; + gchar *number; GString *command; g_return_val_if_fail (server->priv->xserver_process == NULL, FALSE); @@ -438,7 +439,6 @@ xserver_local_start (DisplayServer *disp if (server->priv->layout) g_string_append_printf (command, " -layout %s", server->priv->layout); - gethostname (hostname, 1024); number = g_strdup_printf ("%d", xserver_get_display_number (XSERVER (server))); if (!server->priv->xdmcp_key) xserver_set_authority (XSERVER (server), xauth_new_cookie (XAUTH_FAMILY_LOCAL, (guint8*) hostname, strlen (hostname), number)); diff --git a/src/xsession.c b/src/xsession.c --- a/src/xsession.c +++ b/src/xsession.c @@ -15,6 +15,7 @@ #include <sys/stat.h> #include "xsession.h" +#include "xserver-local.h" #include "configuration.h" #include "privileges.h" @@ -35,6 +36,8 @@ xsession_new (XServer *xserver) session = g_object_new (XSESSION_TYPE, NULL); session->priv->xserver = g_object_ref (xserver); + if (IS_XSERVER_LOCAL (XSESSION (session)->priv->xserver)) + session_set_env (SESSION (session), "XAUTHLOCALHOSTNAME", "localhost"); session_set_env (SESSION (session), "DISPLAY", xserver_get_address (xserver)); session_set_tty (SESSION (session), xserver_get_address (xserver)); session_set_xdisplay (SESSION (session), xserver_get_address (xserver));
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor