Skip to content
New issue

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

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

Already on GitHub? # to your account

DISPLAY environment variable set under Wayland #131

Closed
zajca opened this issue Mar 9, 2023 · 2 comments
Closed

DISPLAY environment variable set under Wayland #131

zajca opened this issue Mar 9, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@zajca
Copy link

zajca commented Mar 9, 2023

I'm trying to run lemurs with sway on Archlinux, but it looks like sway is trying to run on X11 backend.

I did not touch lemurs config just added sway file:

$ cat /etc/lemurs/wayland/sway

#! /bin/sh
export XDG_SESSION_TYPE=wayland
export SDL_VIDEODRIVER=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
export QT_QPA_PLATFORM=wayland
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_DESKTOP=sway
exec sway
[INFO  lemurs] Lemurs logger is running
[INFO  lemurs] Switching to tty 2
[INFO  lemurs] UI booted up
[WARN  lemurs::post_login] Failed to read from the X folder '/etc/lemurs/wms'
[INFO  lemurs::info_caching] Attempting to get a cached information from '/var/cache/lemurs'
[INFO  lemurs::info_caching] Read cache file and found environment 'sway' and username 'zajca'
[INFO  lemurs::ui] Loading username 'zajca' from cache
[INFO  lemurs::ui] Loading environment 'sway' from cache
[INFO  lemurs] Starting new session for 'zajca' in environment 'Wayland { script_path: "/etc/lemurs/wayland/sway" }'
[ERROR lemurs::env_container] Could not find the working directory when taking snapshot
[INFO  lemurs::post_login::env_variables] Setting Display
[INFO  lemurs::env_container] Set environment variable 'DISPLAY' to ':1'
[INFO  lemurs::post_login::env_variables] Setting XDG Session Parameters
[INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_CLASS' to 'user'
[INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_TYPE' to 'wayland'
[INFO  lemurs::auth] Login attempt for 'zajca'
[INFO  lemurs::auth::pam] Started opening session
[INFO  lemurs::auth::pam] Gotten Authenticator
[INFO  lemurs::auth::pam] Got handler
[INFO  lemurs::auth::pam] Validated account
[INFO  lemurs::auth::pam] Opened session
[INFO  lemurs::ui] Setting cached information
[INFO  lemurs::info_caching] Attempting to set cache
[INFO  lemurs::info_caching] Successfully set username in cache file
[INFO  lemurs::post_login::env_variables] Setting XDG Seat Variables
[INFO  lemurs::env_container] Skipped setting environment variable 'XDG_SEAT'. It was already set to 'seat0'
[INFO  lemurs::env_container] Skipped setting environment variable 'XDG_VTNR'. It was already set to '2'
[INFO  lemurs::post_login::env_variables] Setting XDG Session Variables
[INFO  lemurs::env_container] Skipped setting environment variable 'XDG_RUNTIME_DIR'. It was already set to '/run/user/1000'
[INFO  lemurs::env_container] Skipped setting environment variable 'XDG_SESSION_ID'. It was already set to 'c3'
[INFO  lemurs::post_login::env_variables] Setting Basic Environment Variables
[INFO  lemurs::env_container] Successfully changed working directory to /home/zajca!
[INFO  lemurs::env_container] Set environment variable 'HOME' to '/home/zajca'
[INFO  lemurs::env_container] Set environment variable 'SHELL' to '/usr/bin/zsh'
[INFO  lemurs::env_container] Set environment variable 'USER' to 'zajca'
[INFO  lemurs::env_container] Set environment variable 'LOGNAME' to 'zajca'
[INFO  lemurs::env_container] Set environment variable 'PATH' to '/usr/local/sbin:/usr/local/bin:/usr/bin'
[INFO  lemurs::post_login::env_variables] Setting XDG Common Paths
[INFO  lemurs::env_container] Set environment variable 'XDG_CONFIG_DIR' to '/home/zajca/.config'
[INFO  lemurs::env_container] Set environment variable 'XDG_CACHE_HOME' to '/home/zajca/.cache'
[INFO  lemurs::env_container] Set environment variable 'XDG_DATA_HOME' to '/home/zajca/.local/share'
[INFO  lemurs::env_container] Set environment variable 'XDG_STATE_HOME' to '/home/zajca/.local/state'
[INFO  lemurs::env_container] Set environment variable 'XDG_DATA_DIRS' to '/usr/local/share:/usr/share'
[INFO  lemurs::env_container] Set environment variable 'XDG_CONFIG_DIRS' to '/etc/xdg'
[INFO  lemurs::post_login] Starting Wayland session
[INFO  lemurs::auth::utmpx] Adding UTMPX record
[INFO  lemurs::auth::utmpx] Added UTMPX record
[INFO  lemurs::env_container] Removing session environment variables
[INFO  lemurs::env_container] Reverting to environment before session
[ERROR lemurs::env_container] Failed to change the working directory back to 
[INFO  lemurs] Waiting for environment to terminate
[WARN  lemurs::post_login] Environment came back with non-zero exit code.
[WARN  lemurs::post_login] Environment's stderr: """
    00:00:00.002 [ERROR] [wlr] [backend/x11/backend.c:408] Failed to open xcb connection
    00:00:00.002 [ERROR] [sway/server.c:73] Unable to create backend
    """
[INFO  lemurs] Environment terminated. Returning to Lemurs...
[INFO  lemurs::auth::utmpx] Removing UTMPX record
sway version 1.8.1
Lemurs 0.3.1
@coastalwhite
Copy link
Owner

coastalwhite commented Mar 9, 2023

I have reproduced the bug and there is a fix. Could you add unset DISPLAY to the /etc/lemurs/wayland/sway script? I don't think the DISPLAY environment variable should be set under Wayland. That is definitely a bug.

@coastalwhite coastalwhite self-assigned this Mar 9, 2023
@coastalwhite coastalwhite changed the title Sway trying to run on X backend DISPLAY environment variable set under Wayland Mar 9, 2023
@coastalwhite coastalwhite added the bug Something isn't working label Mar 9, 2023
@coastalwhite
Copy link
Owner

Is now be fixed on the main branch 😄

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants