Open zeyadtamimi opened 11 months ago
sounds more like nautilus having issues with passing env. Is it just nautilus? What about dolphin? Thunar?
> echo $XDG_CURRENT_DESKTOP
Hyperland
printing actual env results instead of writing them out would be preferred.
I think you may be right!
I tried with nemo
which I understand to be a nautilus
fork and that actually seemed to work with no issues.
Revisiting nautilus
I also made and error and my ~/.config/environment.d/envvars.conf
was not configured correctly. I have since rectified this and some more env vars are being printed through there is still a difference in variables and the issue with xwayland remains.
I have attached the printenv
output for both the:
nautilus
which fails to open any xwayland applicationFor the sake of brevity I have inlined the diff between the two:
> diff --from-file bad.txt good.txt
1,3c1,3
< ALACRITTY_LOG=/tmp/Alacritty-3787.log
< ALACRITTY_SOCKET=/run/user/1000/Alacritty-wayland-1-3787.sock
< ALACRITTY_WINDOW_ID=94199170111184
---
> ALACRITTY_LOG=/tmp/Alacritty-4408.log
> ALACRITTY_SOCKET=/run/user/1000/Alacritty-wayland-1-4408.sock
> ALACRITTY_WINDOW_ID=94207996926432
6,8c6,9
< DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus,guid=8988d9ca3cb76fc86ba543ee64d9421b
< DBUS_STARTER_ADDRESS=unix:path=/run/user/1000/bus,guid=8988d9ca3cb76fc86ba543ee64d9421b
< DBUS_STARTER_BUS_TYPE=session
---
> CREDENTIALS_DIRECTORY=/run/credentials/getty@tty1.service
> DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
> DEBUGINFOD_URLS=https://debuginfod.archlinux.org
> DISPLAY=:0
14d14
< GIO_LAUNCHED_DESKTOP_FILE_PID=3787
15a16
> HYPRLAND_CMD=Hyprland
16a18
> INVOCATION_ID=156a213e50354abead8163f3d4b7ef0f
17a20
> LC_CTYPE=
22a26
> LULW=test
24,25c28
< MANAGERPID=805
< MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/session.slice/dbus.service/memory.pressure
---
> MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/system.slice/system-getty.slice/getty@tty1.service/memory.pressure
26a30
> MOTD_SHOWN=pam
27a32
> MOZ_USE_XINPUT2=1
30c35
< PATH=/usr/local/bin:/usr/bin:/home/zeyadtamimi/bin:/home/zeyadtamimi/scripts:/home/zeyadtamimi/.antigen/bundles/robbyrussell/oh-my-zsh/lib:/home/zeyadtamimi/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git:/home/zeyadtamimi/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/vi-mode:/home/zeyadtamimi/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/mosh:/home/zeyadtamimi/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/cp:/home/zeyadtamimi/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/colorize:/home/zeyadtamimi/.antigen/bundles/zsh-users/zsh-syntax-highlighting
---
> PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/zeyadtamimi/bin:/home/zeyadtamimi/scripts:/home/zeyadtamimi/.antigen/bundles/robbyrussell/oh-my-zsh/lib:/home/zeyadtamimi/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git:/home/zeyadtamimi/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/vi-mode:/home/zeyadtamimi/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/mosh:/home/zeyadtamimi/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/cp:/home/zeyadtamimi/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/colorize:/home/zeyadtamimi/.antigen/bundles/zsh-users/zsh-syntax-highlighting
38c43
< SHLVL=1
---
> SHLVL=2
41c46
< SYSTEMD_EXEC_PID=814
---
> SYSTEMD_EXEC_PID=775
46,47c51,55
< WINDOWID=94199170111184
< XDG_CURRENT_DESKTOP=Hyperland
---
> WINDOWID=94207996926432
> WLR_NO_HARDWARE_CURSORS=1
> XCURSOR_SIZE=24
> XDG_BACKEND=wayland
> XDG_CURRENT_DESKTOP=Hyprland
48a57,58
> XDG_SEAT=seat0
> XDG_SESSION_CLASS=user
49a60
> XDG_SESSION_ID=1
50a62,63
> XDG_VTNR=1
> XWAYLAND_NO_GLAMOR=1
51a65
> _JAVA_AWT_WM_NONREPARENTING=1
Several DBUS_
and XDG_
env variables are either missing in the bad
case or are flat out different.
Hmmmm.
I was reading the Arch Linux Wiki regarding environment variables and one sections stood out to me:
GDM and KDE Plasma source systemd user environment variables instead.
Looking at my systemd environment variables I also see that they are "difficient", so I tried running dbus-update-activation-environment --systemd --all
to update the systemd environment variables vased on the wayland env variables and viola! Nautilus now works properly.
Once again for the sake of posterity I am attaching the "Good" and "Bad" case for the systemd environment variables generated by running systemctl --user show-environment
:
dbus-update-activation-environment --systemd --all
Vaxerski, is environment variable syncing between the wayland session and systemd something Hyprland should take care of? Or is this on us to ensure by injecting into our configs?
Hyprland Version
Hyprland, built from branch main at commit d20837bef8a41d6bf1732b0e8968b7f2feb9a93f
Bug or Regression?
Bug
Description
Hey,
I just started noting that on my fresh
Hyprland
setup that I cannot run any xwayland applications from anautilus
( Gnome Files ) window. Unfortunately, I honestly can't remember if this is a regression or not since most of the time I just launch my applications usingwofi
or the terminal directly.I am using Arch Linux and running the
hyprland-nvidia-git
AUR package. My startup script is as follows:These same environment variables are also stored in
~/.config/environment.d/envvars.conf
The actual issue can be observed in one of two ways:
1. Attempting to launch any
Xwayland
application Fromnautilus
Attempting to open an image with
feh
,mupdf
,gimp
from anautilus
which was opened viawofi
or a terminal yields errors along the lines of:All these applications work when launched from terminal or from
wofi
.2. Examining environment variables for a terminal launched from
nautilus
Launching an
alacrity
session from nautilus ( by navigating to/bin/alacritty
) I see that some of the expected environment variables are not set:In fact
printenv
reveals that a terminal launched fromnautilus
has pretty much none of the expected environment variables set. This is in contrast to launchingalacritty
fromHyprland
/wofi
where all the expected parameters are set.I am not sure if this is a red-herring.
3. Starting Nautilus From Hyprland "just works"
When starting
nautilus
via Hyprland through the use of keybindbind = $mainMod, H, exec, nautilus
Xwayland applications launch flawlessly from it...Which makes me very very confused.
I don't know if this constitutes a BUG in Hyprland, Nautilus, or if this is just bad environment setup on my part. But any help here would be greatly appreciated.
How to reproduce
nautilus
Crash reports, logs, images, videos
No response