mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-18 05:38:34 -04:00
run: Treat DISPLAY=unix:42 the same as :42
xauth and xcb both treat this as a request to use AF_UNIX. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
committed by
Alexander Larsson
parent
18db8e8713
commit
c3395a0e83
@@ -232,7 +232,7 @@ flatpak_run_parse_x11_display (const char *display,
|
||||
while (g_ascii_isdigit (*display_nr_end))
|
||||
display_nr_end++;
|
||||
|
||||
if (display == colon)
|
||||
if (display == colon || g_str_has_prefix (display, "unix:"))
|
||||
{
|
||||
*display_nr_out = g_strndup (display_nr, display_nr_end - display_nr);
|
||||
*x11_socket = g_strdup_printf ("/tmp/.X11-unix/X%s", *display_nr_out);
|
||||
|
||||
@@ -1779,6 +1779,7 @@ static const DisplayTest x11_display_tests[] =
|
||||
{ ":0", FamilyLocal, "/tmp/.X11-unix/X0", NULL, "0" },
|
||||
{ ":0.0", FamilyLocal, "/tmp/.X11-unix/X0", NULL, "0" },
|
||||
{ ":42.0", FamilyLocal, "/tmp/.X11-unix/X42", NULL, "42" },
|
||||
{ "unix:42", FamilyLocal, "/tmp/.X11-unix/X42", NULL, "42" },
|
||||
{ "othermachine:23", FamilyWild, NULL, "othermachine", "23" },
|
||||
{ "bees.example.com:23", FamilyWild, NULL, "bees.example.com", "23" },
|
||||
{ "[::1]:0", FamilyInternet6, NULL, "::1", "0" },
|
||||
|
||||
Reference in New Issue
Block a user