Can't connect to socket after logging out #3098
-
I run Hyprland on Archlinux, and I launch the compositor using sddm, which is reported to work pretty well according to the wiki. Once in Hyprland, everything works fine, until I exit Hyprland. If I exit Hyprland using
I think I'm probably doing something wrong since I haven't seen anyone complain about this, anybody has any idea of what I could be doing wrong ? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
What shell are you using? It appears that it is still using the old value of env var HYPRLAND_INSTANCE_SIGNATURE from the previous hypland process. So it's more likely that it's a configuration issue with your shell or hypland. |
Beta Was this translation helpful? Give feedback.
-
I am running zsh as my default shell. I tried changing my default shell to bash (for which I have 0 configuration) and trying again but I got the same problem, so I'm guessing either there is something wrong in my config, or I could be missing something like an environment variable in my shell configuration. I've also looked at the environment variable you mentionned, and it appears to stay the same value after logging out and back in, which i'm guessing is not normal behavior. I'm not really sure where to go from here, I've tried a bunch of stuff that didn't work Here my hyprland config file if you wanna take a look
Thank you for your help :) |
Beta Was this translation helpful? Give feedback.
-
This explains why you get the old variables, because the tmux uses the first instance as a server, which keeps all the environment variables you had when it was created. To work around this, you can create a script that hyprland runs on login to update its Wayland-related variables. for example, save the following as ~/.config/tmux/import_env #!/usr/bin/env bash
set -e
[[ -n $HYPRLAND_DEBUG_CONF ]] && exit 0
_envs=(
WAYLAND_DISPLAY
DISPLAY
XCURSOR_SIZE
USERNAME
XDG_BACKEND
XDG_CURRENT_DESKTOP
XDG_SESSION_TYPE
XDG_SESSION_ID
XDG_SESSION_CLASS
XDG_SESSION_DESKTOP
XDG_SEAT
XDG_VTNR
# sway
SWAYSOCK
# hyprland
HYPRLAND_CMD
HYPRLAND_INSTANCE_SIGNATURE
# toolkit
_JAVA_AWT_WM_NONREPARENTING
QT_QPA_PLATFORM
QT_WAYLAND_DISABLE_WINDOWDECORATION
GRIM_DEFAULT_DIR
# ssh
SSH_AUTH_SOCK
)
for v in "${_envs[@]}"; do
if [[ -n ${!v} ]]; then
tmux setenv -g "$v" "${!v}"
fi
done Then, in hyprland.conf. exec it once
|
Beta Was this translation helpful? Give feedback.
-
This works flawlessly. Thank you very much sir I really appreciate the time you took to help me. |
Beta Was this translation helpful? Give feedback.
I am running zsh as my default shell. I tried changing my default shell to bash (for which I have 0 configuration) and trying again but I got the same problem, so I'm guessing either there is something wrong in my config, or I could be missing something like an environment variable in my shell configuration.
I've also looked at the environment variable you mentionned, and it appears to stay the same value after logging out and back in, which i'm guessing is not normal behavior. I'm not really sure where to go from here, I've tried a bunch of stuff that didn't work
Here my hyprland config file if you wanna take a look