Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1271125 > unrolled thread

Bug#1028370: Some experiments...

Started byMarcin Owsiany <porridge@debian.org>
First post2025-11-22 07:50 +0100
Last post2025-11-22 07:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.debian.bugs.dist

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Bug#1028370: Some experiments... Marcin Owsiany <porridge@debian.org> - 2025-11-22 07:50 +0100

#1271125 — Bug#1028370: Some experiments...

FromMarcin Owsiany <porridge@debian.org>
Date2025-11-22 07:50 +0100
SubjectBug#1028370: Some experiments...
Message-ID<LTPBv-ePSw-13@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

I hit this (again) today and had a few minutes to dig a little. I'm no X
expert, just sharing here (since I could not find an existing
libx11-protocol-perl bug) what I learned hoping to move this forward...

I came up with this super hacky change to the example that makes it work:

--- /usr/share/doc/libx11-protocol-perl/examples/render-test.pl 2004-03-23
05:19:25.000000000 +0100
+++ render-test.pl 2025-11-22 07:27:26.657364957 +0100
@@ -1,11 +1,13 @@
 #!/usr/bin/perl

+use X11::Auth;
 use X11::Protocol;
 use strict;

 use IO::Select;

-my $X = new X11::Protocol;
+my ($family, $host_addr, $display_num, $auth_name, $auth_data) =
X11::Auth->new->get_one;
+my $X = new X11::Protocol($ENV{'DISPLAY'}, ['MIT-MAGIC-COOKIE-1',
$auth_data]);

 $X->init_extension("RENDER") or die;

And also this slightly less hacky one:

--- /usr/share/doc/libx11-protocol-perl/examples/render-test.pl 2004-03-23
05:19:25.000000000 +0100
+++ render-test2.pl 2025-11-22 07:37:42.426902814 +0100
@@ -1,11 +1,15 @@
 #!/usr/bin/perl

+use Net::Domain qw(hostname);
+use X11::Auth;
 use X11::Protocol;
 use strict;

 use IO::Select;

-my $X = new X11::Protocol;
+my $hostname = hostname();
+my $auth_data = X11::Auth->new->get_by_host($hostname, 'Local');
+my $X = new X11::Protocol($ENV{'DISPLAY'}, ['MIT-MAGIC-COOKIE-1',
$auth_data]);

 $X->init_extension("RENDER") or die;


FTR the output from xauth list on my system is:
butla/unix:  MIT-MAGIC-COOKIE-1  A-HEX-STRING
#ffff#6275746c61#:  MIT-MAGIC-COOKIE-1  A-HEX-STRING

while the output from:

perl -MX11::Auth -e 'foreach my $a (X11::Auth->new->get_all){foreach my $e
(@$a){print "[".$e."]";}; print "\n"}'|less

is

[Local][butla][][MIT-MAGIC-COOKIE-1][RX3-NON-ASCII-CHARS]
[Wild][butla][][MIT-MAGIC-COOKIE-1][RX3-NON-ASCII-CHARS]

Marcin

[toc] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web