* bug#46532: plantuml in pure environment does not find X11
@ 2021-02-15 12:52 Dr. Arne Babenhauserheide
2021-02-15 15:11 ` Maxime Devos
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dr. Arne Babenhauserheide @ 2021-02-15 12:52 UTC (permalink / raw)
To: 46532
[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]
Dear Guix hackers,
when installing plantuml in a pure environment, it throws an java.awt.AWTError: Can't connect to X11 window server using ':1' as the value of the DISPLAY variable.
To reproduce:
$ guix environment --ad-hoc --pure plantuml -- plantumlNo protocol specified
Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using ':1' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1181)
at net.sourceforge.plantuml.FileFormat.<clinit>(FileFormat.java:93)
at net.sourceforge.plantuml.Option.<init>(Option.java:97)
at net.sourceforge.plantuml.Run.main(Run.java:93)
When I leave out --pure, it works, so I assume that a dependency on X11
might be missing.
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#46532: plantuml in pure environment does not find X11
2021-02-15 12:52 bug#46532: plantuml in pure environment does not find X11 Dr. Arne Babenhauserheide
@ 2021-02-15 15:11 ` Maxime Devos
2021-02-15 15:18 ` Maxime Devos via web
2021-02-16 9:32 ` Efraim Flashner
2 siblings, 0 replies; 4+ messages in thread
From: Maxime Devos @ 2021-02-15 15:11 UTC (permalink / raw)
To: Dr. Arne Babenhauserheide, 46532
[-- Attachment #1.1: Type: text/plain, Size: 551 bytes --]
On Mon, 2021-02-15 at 13:52 +0100, Dr. Arne Babenhauserheide wrote:
> Dear Guix hackers,
>
> when installing plantuml in a pure environment, it throws an java.awt.AWTError: Can't connect to X11 window server using ':1' as the value of the DISPLAY variable.
Is the environment variable XAUTHORITY set?
Compare the value inside the environment and outside the environment.
Perhaps "XAUTHORITY" should be added to %precious-variables in
guix/scripts/environment.scm. An untested patch is attached,
I'll test it now.
Greetings,
Maxime.
[-- Attachment #1.2: 0001-scripts-preserve-XAUTHORITY-in-pure-environments.patch --]
[-- Type: text/x-patch, Size: 951 bytes --]
From 7eac4f5a427fb094865ece58c3509606264884b0 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Mon, 15 Feb 2021 16:07:37 +0100
Subject: [PATCH] scripts: preserve XAUTHORITY in pure environments
(XXX untested)
Fixes: <https://issues.guix.gnu.org/46532>
* guix/scripts/environment.scm
(%precious-variables): add 'XAUTHORITY'
---
guix/scripts/environment.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index f4d12f89bf..656294d29d 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -53,7 +53,7 @@
;; Protect some env vars from purification. Borrowed from nix-shell.
(define %precious-variables
- '("HOME" "USER" "LOGNAME" "DISPLAY" "TERM" "TZ" "PAGER"))
+ '("HOME" "USER" "LOGNAME" "XAUTHORITY" "DISPLAY" "TERM" "TZ" "PAGER"))
(define %default-shell
(or (getenv "SHELL") "/bin/sh"))
--
2.30.0
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#46532: plantuml in pure environment does not find X11
2021-02-15 12:52 bug#46532: plantuml in pure environment does not find X11 Dr. Arne Babenhauserheide
2021-02-15 15:11 ` Maxime Devos
@ 2021-02-15 15:18 ` Maxime Devos via web
2021-02-16 9:32 ` Efraim Flashner
2 siblings, 0 replies; 4+ messages in thread
From: Maxime Devos via web @ 2021-02-15 15:18 UTC (permalink / raw)
To: 46532
self-proposed patch works for me
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#46532: plantuml in pure environment does not find X11
2021-02-15 12:52 bug#46532: plantuml in pure environment does not find X11 Dr. Arne Babenhauserheide
2021-02-15 15:11 ` Maxime Devos
2021-02-15 15:18 ` Maxime Devos via web
@ 2021-02-16 9:32 ` Efraim Flashner
2 siblings, 0 replies; 4+ messages in thread
From: Efraim Flashner @ 2021-02-16 9:32 UTC (permalink / raw)
To: Dr. Arne Babenhauserheide; +Cc: 46532
[-- Attachment #1.1: Type: text/plain, Size: 1869 bytes --]
On Mon, Feb 15, 2021 at 01:52:42PM +0100, Dr. Arne Babenhauserheide wrote:
> Dear Guix hackers,
>
> when installing plantuml in a pure environment, it throws an java.awt.AWTError: Can't connect to X11 window server using ':1' as the value of the DISPLAY variable.
>
> To reproduce:
>
> $ guix environment --ad-hoc --pure plantuml -- plantumlNo protocol specified
> Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using ':1' as the value of the DISPLAY variable.
> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
> at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
> at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
> at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
> at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1181)
> at net.sourceforge.plantuml.FileFormat.<clinit>(FileFormat.java:93)
> at net.sourceforge.plantuml.Option.<init>(Option.java:97)
> at net.sourceforge.plantuml.Run.main(Run.java:93)
>
> When I leave out --pure, it works, so I assume that a dependency on X11
> might be missing.
>
I have the following scriptlet that someone shared for running eolie in
a container. I'm guessing it could be modified to run platuml if needed.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #1.2: guix-container --]
[-- Type: text/plain, Size: 310 bytes --]
guix environment \
--preserve='^DISPLAY$' --container --network \
--expose=/etc/machine-id \
--expose=/etc/ssl/certs/ \
--share=$HOME/.local/share/eolie/=$HOME/.local/share/eolie/ \
--share=/tmp/.X11-unix/=/tmp/.X11-unix/ \
--share=$HOME/.Xauthority=$HOME/.Xauthority \
--ad-hoc eolie nss-certs dbus -- eolie
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-02-16 9:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-15 12:52 bug#46532: plantuml in pure environment does not find X11 Dr. Arne Babenhauserheide
2021-02-15 15:11 ` Maxime Devos
2021-02-15 15:18 ` Maxime Devos via web
2021-02-16 9:32 ` Efraim Flashner
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).