Open regrettable opened 1 year ago
?
It seemed like the issue resolved itself at some point during the day, (i've updated wlroots to the newest version, among other things), but after restart it came back. Also, when i run Hyprland in a window, i can't type capital letters in english, it switches to russian when i press shift for some reason (my second layout)
in a window? why do you do that
I'm trying to understand the issue by trying different things
OK, in case anybody else has the same problem, here's a workaround for this issue: Get wayland display:
#!/bin/sh
grep -o "wayland-[0-9]" "$(find /tmp/hypr -print0 -name '*.log' | xargs -0 stat -c '%Y %n' - | sort -rn | head -n 1 | cut -d ' ' -f2)" | head -n 1
Get hyprland instance:
#!/bin/sh
find /tmp/hypr -print0 -name '*.log' | xargs -0 stat -c '%Y %n' - | sort -rn | head -n 1 | cut -d ' ' -f2 | awk -F '/' '{print $4}'
This is of course extremely rigid, but should work until the fix is done...
I have no clue wym. It seems to be done properly to me.
So i'm not terribly familiar with the nuances of how environment variables propagate, but getenv("WAYLAND_DISPLAY")
returns the proper thing in the program itself, but then fails in its children? I've tested a bunch of compositors, the ones that work are sway and weston (dwl and hikari have the same exact issue)
Maybe this is the reason why we need to run that wonky
:thinking:
Actually, found how sway does it and they do the same. Odd.
I am pretty sure the problem is with tmux not setting the environment variables. Does the problem also exist when not running tmux?
Edit: Actually this appears to only be a problem, when tmux is already started before hyprland is.
Had the same issue (running on Fedora - not tmux related). Fixed by adding to the start of my config the line that Vaxerski shared: exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE
. Fix persists after reboot as well. Hope that helps someone.
Maybe this is the reason why we need to run that wonky
🤔
I also encountered this problem today. I don't know much about it, but I suspect it's because I start the session via greetd. Fixed it the same way @Tibor5 did it for now.
Same on NixOS with tmux that starts before hyprland. Also kdeconnect's clipboard sync doesn't work because $WAYLAND_DISPLAY (probably) is not set in systemd for some reason. Launching from terminal helps.
I will try diagnose/fix and report if get something new
@ca5ua1 to fix that you have to set wayland.windowManager.hyprland.systemd.variables = ["-all"];
as shown here https://nix-community.github.io/home-manager/options.xhtml#opt-wayland.windowManager.hyprland.systemd.variables.
The environment variables needed for native wayland applications ($WAYLAND_DISPLAY, $HYPRLAND_INSTANCE_SIGNATURE) are not set after starting Hyprland. I.e.
hyprctl layers
outputsHYPRLAND_INSTANCE_SIGNATURE was not set! (Is Hyprland running?)
. A simple c program likealso fails, BUT when taking a display string ,i.e.
, which i looked up from hyprland's log (below), it succeeds. Setting HYPRLAND_INSTANCE_SIGNATURE works in a similar fashion (look up instance signature in the log, set in manually). This issue is present in aur's
hyprland
,hyprland-bin
as well ashyprland-git
packages. This problem does not happen in sway. Hyprland log:The startup script (located in ~/.local/bin):
hypr.conf: