You are not logged in.
I've since lost the Github issue, but when I run
`Telegram` from the CLI with `QT_QPA_PLATFORM=xcb` before `Telegram` (as in both Kitty and
Krunner on KDE Plasma), Telegram's Instant Webview works.
But tweaking the .desktop file through the Applications Launcher menu to include the same
env-var, instant view never works. Modifying the envvar through the GUI creates a .desktop file
in ~/.local/share/applications, so I can only conclude that the inherited PATH differs?
Any help on getting the .desktop file to work would be appreciated so that the GUI etc picks
up the appropriate PATH.
Additional information:
[ ~ ] ➜ pacman -Qii telegram-desktop
Name : telegram-desktop
Version : 6.3.9-1
Description : Official Telegram Desktop client
Architecture : x86_64
URL : https://desktop.telegram.org/
Licenses : GPL-3.0-or-later WITH OpenSSL-exception
Groups : None
Provides : None
Depends On : abseil-cpp ada ffmpeg glib2 hicolor-icon-theme hunspell kcoreaddons libavif libdispatch libheif libjxl libxcomposite
libxdamage libxrandr libxtst lz4 minizip openal openh264 openssl pipewire protobuf qt6-imageformats qt6-svg qt6-wayland
rnnoise xxhash
Optional Deps : geoclue: geoinformation support [installed]
geocode-glib-2: geocoding support
webkit2gtk-4.1: embedded browser features provided by webkit2gtk-4.1 [installed]
webkitgtk-6.0: embedded browser features provided by webkitgtk-6.0 (Wayland only) [installed]
xdg-desktop-portal: desktop integration [installed]
Required By : None
Optional For : purpose
Conflicts With : None
Replaces : None
Installed Size : 120.56 MiB
Packager : Sven-Hendrik Haase <svenstaro@archlinux.org>
Build Date : Tue 16 Dec 2025 08:10:56 PM
Install Date : Mon 22 Dec 2025 06:31:36 AM
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
Backup Files : None
Extended Data : pkgtype=pkgLast edited by tsukimomo (2026-01-07 13:02:14)
Offline
Those desktop files often cannot use shell syntax.
Exec=env QT_QPA_PLATFORM=xcb TelegramOffline
Hi Seth!
Thanks for taking your time for looking into the matter.
The desktop file created by KDE plasma pretty much amounts to
[Desktop Entry]
Actions=quit;
Categories=Chat;Network;InstantMessaging;Qt;
Comment=New era of messaging
DBusActivatable=true
Exec=env QT_QPA_PLATFORM=xcb Telegram -- %U
Icon=org.telegram.desktop
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
MimeType=x-scheme-handler/tg;x-scheme-handler/tonsite;
Name=Telegram
NoDisplay=false
OnlyShowIn=KDE;
Path=
PrefersNonDefaultGPU=false
SingleMainWindow=true
StartupNotify=true
StartupWMClass=TelegramDesktop
Terminal=false
TerminalOptions=
Type=Application
X-GNOME-SingleWindow=true
X-GNOME-UsesNotifications=true
X-KDE-SubstituteUID=false
X-KDE-Username=
[Desktop Action quit]
Exec=Telegram -quit
Icon=application-exit
Name=Quit Telegramwhich contains the line identical to your suggestion.
I took some time to make my own .desktop file to `printenv` to a file as you had suggested from https://bbs.archlinux.org/viewtopic.php?id=311452 with explicit path to a bash shell script that only does `printenv > /dev/shm/out.txt`.
I then diff the output between `printenv` through a bash script as runned from KDE's Application launcher, in contrast to printenv from my terminal (I run fish).
➜ diff (cat /dev/shm/out.txt | grep -E "^PATH=" | psub) (printenv | grep -E "^PATH=" | psub)
1c1
< PATH=/home/tsuki/.local/share/pyenv/versions:/home/tsuki/.local/share/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
---
> PATH=/usr/share/pyenv/plugins/pyenv-virtualenv/shims:/home/tsuki/.local/share/pyenv/shims:/home/tsuki/.local/share/pyenv/versions:/home/tsuki/.local/share/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/binThis would mean that Krunner and terminal emulators have an additional `/home/tsuki/.local/share/pyenv/shims` and `/usr/share/pyenv/plugins/pyenv-virtualenv/shims` but it's not quite apparent to me how... (These paths are in my `fish_user_paths` https://fishshell.com/docs/current/cmds … _path.html )
Journalctl logs haven't eluded to much as to the discrepancy in launch behaviour; Not sure what else I could try.
Last edited by tsukimomo (2026-01-06 17:53:28)
Offline
For your TE (or rather the shell) the PATH typically gets expanded via the shell's rc that is not going to be used to start the desktop
Does
Exec=env QT_QPA_PLATFORM=xcb PATH=/usr/share/pyenv/plugins/pyenv-virtualenv/shims:/home/tsuki/.local/share/pyenv/shims:$PATH Telegram -- %UThen work?
If you generally need the additional PATH entries in your environment, see https://wiki.archlinux.org/title/Environment_variables
Offline
Hi Seth,
It appears the PATH might be a red herring! I included the additional folders in the .desktop file so that it'd align with the PATH from the CLI,
but Instant Webview as launched via KDE's application launcher still is broken!
`printenv` through the Appliation Launcher
SHELL=/usr/bin/fish
SESSION_MANAGER=local/framework:@/tmp/.ICE-unix/103685,unix/framework:/tmp/.ICE-unix/103685
LESSHISTFILE=/home/tsuki/.cache/less/history
JUPYTER_CONFIG_DIR=/home/tsuki/.config/jupyter
XDG_CONFIG_DIRS=/home/tsuki/.config/kdedefaults:/etc/xdg
XDG_MENU_PREFIX=plasma-
SCCACHE_DIR=/home/tsuki/.cache/sccache
ICEAUTHORITY=/run/user/1001/iceauth_zafPTM
LANGUAGE=en_GB.UTF-8
TEXMFVAR=/home/tsuki/.cache/texlive/texmf-var
LC_ADDRESS=en_GB.UTF-8
LC_NAME=en_GB.UTF-8
XDG_DATA_HOME=/home/tsuki/.local/share
CUDA_CACHE_PATH=/home/tsuki/.cache/nv
MACHINE_STORAGE_PATH=/home/tsuki/.local/share/docker-machine
XDG_CONFIG_HOME=/home/tsuki/.config
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
GNUPGHOME=/home/tsuki/.local/share/gnupg
LC_MONETARY=en_GB.UTF-8
GTK_RC_FILES=/etc/gtk/gtkrc:/home/tsuki/.gtkrc:/home/tsuki/.config/gtkrc
EDITOR=nvim
PYTHON_CFLAGS=-march=native -mtune=native
XDG_SEAT=seat0
PWD=/home/tsuki
PARALLEL_HOME=/home/tsuki/.config/parallel
LOGNAME=tsuki
XDG_SESSION_TYPE=wayland
SYSTEMD_EXEC_PID=104830
XAUTHORITY=/run/user/1001/xauth_wEmylG
IPYTHONDIR=/home/tsuki/.config/ipython
MOTD_SHOWN=pam
XKB_DEFAULT_MODEL=pc104
GTK2_RC_FILES=/home/tsuki/.config/gtk-2.0/gtkrc
HOME=/home/tsuki
SSH_ASKPASS=ksshaskpass
LC_PAPER=en_GB.UTF-8
LANG=en_GB.UTF-8
HISTFILE=/home/tsuki/.local/state/bash/history
_JAVA_AWT_WM_NONREPARENTING=1
XDG_CURRENT_DESKTOP=KDE
CARGO_HOME=/home/tsuki/.local/share/cargo
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1001.slice/user@1001.service/background.slice/plasma-baloorunner.service/memory.pressure
WAYLAND_DISPLAY=wayland-0
RUSTFLAGS=-C target-cpu=native
MATHEMATICA_USERBASE=/home/tsuki/.config/mathematica
TMPDIR=/dev/shm
GIT_ASKPASS=ksshaskpass
INVOCATION_ID=5c1b7035663448deb2cd0851e322dfac
WGETRC=/home/tsuki/.config/wgetrc
MANAGERPID=103467
KDE_SESSION_UID=1001
XDG_CACHE_HOME=/home/tsuki/.cache
XKB_DEFAULT_LAYOUT=us
XDG_ACTIVATION_TOKEN=kwin-28
XDG_SESSION_CLASS=user
ANDROID_HOME=/home/tsuki/.local/share/android
TERMINFO=/home/tsuki/.local/share/terminfo
TERM=linux
RUSTUP_HOME=/home/tsuki/.local/share/rustup
USER=tsuki
SSH_ASKPASS_REQUIRE=prefer
QT_WAYLAND_RECONNECT=1
KDE_SESSION_VERSION=6
NPM_CONFIG_USERCONFIG=/home/tsuki/.config/npm/npmrc
DISPLAY=:0
RUSTC_WRAPPER=sccache
PYTHON_CONFIGURE_OPTS=--enable-shared --enable-optimizations --with-lto
SHLVL=1
GIT_EDITOR=nvim
PAGER=less
LC_TELEPHONE=en_GB.UTF-8
LC_MESSAGES=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8
XDG_VTNR=1
XDG_SESSION_ID=7
MANAGERPIDFDID=103468
TERMINFO_DIRS=/home/tsuki/.local/share/terminfo /usr/share/terminfo
XDG_STATE_HOME=/home/tsuki/.local/state
XDG_RUNTIME_DIR=/run/user/1001
PYENV_ROOT=/home/tsuki/.local/share/pyenv
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
LC_TIME=en_GB.UTF-8
DOCKER_HOST=unix:///run/user/1001/docker.sock
JOURNAL_STREAM=9:179883
BASH_COMPLETION_USER_FILE=/home/tsuki/.config/bash-completion/bash_completion
KDE_FULL_SESSION=true
PATH=/home/tsuki/.local/share/pyenv/versions:/home/tsuki/.local/share/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
GTK_USE_PORTAL=1
DOCKER_CONFIG=/home/tsuki/.config/docker
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus
PASSWORD_STORE_DIR=/home/tsuki/.local/share/pass
KDE_APPLICATIONS_AS_SCOPE=1
MAIL=/var/spool/mail/tsuki
_=/usr/bin/printenvprintenv in kitty just as i would with executing `QT_QPA_PLATFORM=xcb telegram` in kitty:
XDG_STATE_HOME=/home/tsuki/.local/state
KDE_APPLICATIONS_AS_SCOPE=1
WAYLAND_DISPLAY=wayland-0
TERMINFO_DIRS=/home/tsuki/.local/share/terminfo /usr/share/terminfo
XDG_MENU_PREFIX=plasma-
STARSHIP_SESSION_KEY=1118931757254371
MANAGERPIDFDID=103468
TEXMFVAR=/home/tsuki/.cache/texlive/texmf-var
SSH_ASKPASS=ksshaskpass
COLORTERM=truecolor
LC_TIME=en_GB.UTF-8
SSH_AUTH_SOCK=/run/user/1001/ssh-agent.socket
KITTY_PUBLIC_KEY=1:gL`ar&Bj-SqegE)=p-b=!zI_3%|1H8Y&+k~b6UC}
XDG_CURRENT_DESKTOP=KDE
LOGNAME=tsuki
KDE_SESSION_VERSION=6
MOTD_SHOWN=pam
KITTY_WINDOW_ID=1
DOCKER_CONFIG=/home/tsuki/.config/docker
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
TMPDIR=/dev/shm
RUSTC_WRAPPER=sccache
XKB_DEFAULT_LAYOUT=us
GIT_ASKPASS=ksshaskpass
_JAVA_AWT_WM_NONREPARENTING=1
KDE_SESSION_UID=1001
RUSTFLAGS=-C target-cpu=native
TERMINFO=/home/tsuki/.local/share/terminfo
LESSHISTFILE=/home/tsuki/.cache/less/history
JOURNAL_STREAM=9:172584
SHLVL=1
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1001.slice/user@1001.service/session.slice/plasma-kwin_wayland.service/memory.pressure
GTK2_RC_FILES=/home/tsuki/.config/gtk-2.0/gtkrc
MACHINE_STORAGE_PATH=/home/tsuki/.local/share/docker-machine
GNUPGHOME=/home/tsuki/.local/share/gnupg
PYTHON_CONFIGURE_OPTS=--enable-shared --enable-optimizations --with-lto
XAUTHORITY=/run/user/1001/xauth_wEmylG
XDG_VTNR=1
QT_WAYLAND_RECONNECT=1
XDG_DATA_HOME=/home/tsuki/.local/share
PNPM_HOME=/home/tsuki/.local/share/pnpm
XDG_SEAT=seat0
MANAGERPID=103467
PASSWORD_STORE_DIR=/home/tsuki/.local/share/pass
LC_MONETARY=en_GB.UTF-8
GIT_EDITOR=nvim
KGLOBALACCELD_PLATFORM=org.kde.kwin
USER=tsuki
GTK_USE_PORTAL=1
LC_MESSAGES=en_GB.UTF-8
DOCKER_HOST=unix:///run/user/1001/docker.sock
SESSION_MANAGER=local/framework:@/tmp/.ICE-unix/103685,unix/framework:/tmp/.ICE-unix/103685
ANDROID_HOME=/home/tsuki/.local/share/android
GTK_RC_FILES=/etc/gtk/gtkrc:/home/tsuki/.gtkrc:/home/tsuki/.config/gtkrc
PYTHON_CFLAGS=-march=native -mtune=native
LC_PAPER=en_GB.UTF-8
JUPYTER_CONFIG_DIR=/home/tsuki/.config/jupyter
SYSTEMD_EXEC_PID=103526
XDG_SESSION_TYPE=wayland
ICEAUTHORITY=/run/user/1001/iceauth_zafPTM
SHELL=/usr/bin/fish
PARALLEL_HOME=/home/tsuki/.config/parallel
KITTY_PID=106690
HISTFILE=/home/tsuki/.local/state/bash/history
LC_TELEPHONE=en_GB.UTF-8
EDITOR=nvim
KDE_FULL_SESSION=true
DISPLAY=:0
PYENV_SHELL=fish
PWD=/home/tsuki
STARSHIP_SHELL=fish
LANG=en_GB.UTF-8
XDG_CONFIG_DIRS=/home/tsuki/.config/kdedefaults:/etc/xdg
XDG_SESSION_ID=7
LC_ADDRESS=en_GB.UTF-8
CARGO_HOME=/home/tsuki/.local/share/cargo
PATH=/usr/share/pyenv/plugins/pyenv-virtualenv/shims:/home/tsuki/.local/share/pyenv/shims:/home/tsuki/.local/share/pyenv/versions:/home/tsuki/.local/share/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
XDG_RUNTIME_DIR=/run/user/1001
WGETRC=/home/tsuki/.config/wgetrc
XDG_CONFIG_HOME=/home/tsuki/.config
XKB_DEFAULT_MODEL=pc104
BASH_COMPLETION_USER_FILE=/home/tsuki/.config/bash-completion/bash_completion
LC_MEASUREMENT=en_GB.UTF-8
XDG_CACHE_HOME=/home/tsuki/.cache
PYENV_ROOT=/home/tsuki/.local/share/pyenv
CUDA_CACHE_PATH=/home/tsuki/.cache/nv
RUSTUP_HOME=/home/tsuki/.local/share/rustup
HOME=/home/tsuki
KITTY_INSTALLATION_DIR=/usr/lib/kitty
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus
PAGER=less
XDG_SESSION_CLASS=user
NPM_CONFIG_USERCONFIG=/home/tsuki/.config/npm/npmrc
MAIL=/var/spool/mail/tsuki
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
TERM=xterm-kitty
SSH_ASKPASS_REQUIRE=prefer
LANGUAGE=en_GB.UTF-8
INVOCATION_ID=00dbb9b441a843b6bb7dcfad6fcf8ebf
PYENV_VIRTUALENV_INIT=1
SCCACHE_DIR=/home/tsuki/.cache/sccache
IPYTHONDIR=/home/tsuki/.config/ipython
MATHEMATICA_USERBASE=/home/tsuki/.config/mathematica
LC_NAME=en_GB.UTF-8Sorting and diffing:
> COLORTERM=truecolor
20c21
< INVOCATION_ID=5c1b7035663448deb2cd0851e322dfac
---
> INVOCATION_ID=00dbb9b441a843b6bb7dcfad6fcf8ebf
23c24
< JOURNAL_STREAM=9:179883
---
> JOURNAL_STREAM=9:172584
28a30,34
> KGLOBALACCELD_PLATFORM=org.kde.kwin
> KITTY_INSTALLATION_DIR=/usr/lib/kitty
> KITTY_PID=106690
> KITTY_PUBLIC_KEY=1:gL`ar&Bj-SqegE)=p-b=!zI_3%|1H8Y&+k~b6UC}
> KITTY_WINDOW_ID=1
46c52
< MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1001.slice/user@1001.service/background.slice/plasma-baloorunner.service/memory.pressure
---
> MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1001.slice/user@1001.service/session.slice/plasma-kwin_wayland.service/memory.pressure
53c59,60
< PATH=/home/tsuki/.local/share/pyenv/versions:/home/tsuki/.local/share/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
---
> PATH=/usr/share/pyenv/plugins/pyenv-virtualenv/shims:/home/tsuki/.local/share/pyenv/shims:/home/tsuki/.local/share/pyenv/versions:/home/tsuki/.local/share/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
> PNPM_HOME=/home/tsuki/.local/share/pnpm
55a63,64
> PYENV_SHELL=fish
> PYENV_VIRTUALENV_INIT=1
68c77,80
< SYSTEMD_EXEC_PID=104830
---
> SSH_AUTH_SOCK=/run/user/1001/ssh-agent.socket
> STARSHIP_SESSION_KEY=1118931757254371
> STARSHIP_SHELL=fish
> SYSTEMD_EXEC_PID=103526
71c83
< TERM=linux
---
> TERM=xterm-kitty
75d86
< _=/usr/bin/printenv
79d89
< XDG_ACTIVATION_TOKEN=kwin-28It's not apparent to me if some dynamic linking behaviour is differing, but the fact that launching from Kitty gives the correct webview behaviour means I do have the correct system packages, but somehow executing through KDE's Application launcher has an issue.
Incorrect webview behaviour is as described in the picture in the top post of https://forum.manjaro.org/t/webview-on- … ing/163769
(I do not use Manjaro! Only Arch!, I just went with this link as it was a top-enough search result.)
It's a small enough issue I guess I can just get used to it...
Offline
The manjaro link has WEBKIT_DISABLE_DMABUF_RENDERER=1 ?
Then there're
> PNPM_HOME=/home/tsuki/.local/share/pnpm
> PYENV_SHELL=fish
and especially
> PYENV_VIRTUALENV_INIT=1and then there's kitty (any interactive shell) providing IO where krunner likely just closes stdin/out
Try to run this in some script Telegram.sh
#!/bin/bash
export WEBKIT_DISABLE_DMABUF_RENDERER=1
export PATH=/usr/share/pyenv/plugins/pyenv-virtualenv/shims:/home/tsuki/.local/share/pyenv/shims:$PATH
export QT_QPA_PLATFORM=xcb
export PNPM_HOME=/home/tsuki/.local/share/pnpm
PYENV_VIRTUALENV_INIT=1
exec Telegram -- "$1" </dev/zero >/dev/null 2>&1Offline
On a different machine, launching with `QT_QPA_PLATFORM=xcb Telegram` on Kitty does not fix Instant WebviewI think I'll just mark this as not fixeable. I spoke too soon, I'm guessing the `WEBKIT_DISABLE_DMABUF_RENDERER=1`
was relevant as it is an Nvidia Machine.
Last edited by tsukimomo (2026-01-07 12:47:39)
Offline
The shell script indirection from the .desktop file works... This is a hair unfortunate but I'll take it
The added PNPM, PATH, and PYENV_VIRTUALENV_INIT weren't relevant.
Offline
After moving the `Exec=/home/..../launch-telegram.sh` line to the original Telegram.desktop file, it wasn't working again
Turns out the .desktop file having the `DBusActivatable=true` line broke it. Just comment that line out would be the actual solution.
Offline