Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: XDG_RUNTIME_DIR is invalid or not set in the environment #27

Open
Zapa3a opened this issue Jun 13, 2024 · 3 comments
Open

error: XDG_RUNTIME_DIR is invalid or not set in the environment #27

Zapa3a opened this issue Jun 13, 2024 · 3 comments

Comments

@Zapa3a
Copy link

Zapa3a commented Jun 13, 2024

I am running with command

sudo docker run --rm -it --name telegram \
       --hostname=$(hostname) \
       -e DISPLAY=unix$DISPLAY \
       -e PULSE_SERVER=unix:$XDG_RUNTIME_DIR/pulse/native \
       -e XAUTHORITY=$XAUTHORITY \
       -v $XAUTHORITY:$XAUTHORITY \
       -v /dev/snd:/dev/snd --privileged \
       -v /tmp/.X11-unix:/tmp/.X11-unix \
       -v "/home/$(whoami)/.Xauthority:/home/user/.Xauthority" \
       -v $XDG_RUNTIME_DIR/pulse:$XDG_RUNTIME_DIR/pulse \
       -v /etc/localtime:/etc/localtime:ro \
       -v /.local/share/TelegramDesktop/ \
       xorilog/telegram

and everything works well, except new telegram bots like '@wallet' and other, which are trying to open a new window for their work
then my container crushes with terminal output:

qt.gui.imageio.jpeg: ./lib/jpegli/decode_scan.cc:535: Incomplete scan detected.
qt.gui.imageio.jpeg: ./lib/jpegli/decode_scan.cc:535: Incomplete scan detected.
qt.gui.imageio.jpeg: ./lib/jpegli/decode_scan.cc:535: Incomplete scan detected.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
error: XDG_RUNTIME_DIR is invalid or not set in the environment
Fatal: Failed to open server socket: "6ce7de587ddacca886605fc2d7c74451-TelegramDesktop-webview-291-wayland". XDG_RUNTIME_DIR is: ""

or

qt.gui.imageio.jpeg: ./lib/jpegli/decode_scan.cc:535: Incomplete scan detected.
qt.gui.imageio.jpeg: ./lib/jpegli/decode_scan.cc:535: Incomplete scan detected.
qt.gui.imageio.jpeg: ./lib/jpegli/decode_scan.cc:535: Incomplete scan detected.
[libvpx-vp9 @ 0x7f1100ce9400] v1.13.0
[libvpx-vp9 @ 0x7f1100ce9400] v1.13.0
[libvpx-vp9 @ 0x7f1100ce9800] v1.13.0
[libvpx-vp9 @ 0x7f1100ce9800] v1.13.0
qt.gui.imageio.jpeg: ./lib/jpegli/decode_scan.cc:535: Incomplete scan detected.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
error: XDG_RUNTIME_DIR is invalid or not set in the environment
Fatal: Failed to open server socket: "6ce7de587ddacca886605fc2d7c74451-TelegramDesktop-webview-308-wayland". XDG_RUNTIME_DIR is: ""

depending on which bot im launching

Ubuntu 23.04, xorilog/telegram:latest

@xorilog
Copy link
Owner

xorilog commented Jun 13, 2024

Hello @Zapa3a , this seems to be related to webview & wayland, unfortunately i am not familiar with webview and this docker container uses X11 instead of wayland.
You can try following this: https://github.com/mviereck/x11docker/wiki/How-to-provide-Wayland-socket-to-docker-container and if it works for you i would be happy to add it as a running example.
Let me know how it goes :)

@Zapa3a
Copy link
Author

Zapa3a commented Jun 13, 2024

So, with wayland it opens webview windows like wallet bot, but there is another issue with WebKitGTK

5

and installation of provided packages does not helps.
now there is a telegram warning message:
(Telegram:229): GLib-GIO-WARNING **: 22:09:57.515: Your application does not implement g_application_activate() and has no handlers connected to the 'activate' signal. It should do one of these.

@Zapa3a
Copy link
Author

Zapa3a commented Jun 13, 2024

I`ve checked it on fedora with native XWayland and its also works like wayland composer on ubuntu, and installing WebKitGTK does not helps. But official Telegram app works with webview apps well, so i can think there is a trouble in your docker telegram version or appimage. Because all window management now works on both OS

UPD:
info from log
docker telegram version 5.0.1, official working app version 5.1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants