Open kmephistoh opened 1 year ago
Hi,
Thank you for this report. I spend quite some time on trying to find the solution to this. GDM is doing some special stuff normally to make sure gnome-session
works fine.
I have been able to identify some points. These are more reminders for me when I continue working on this.
XDG_SESSION_TYPE=x11/wayland/tty
depending on the post_login type.MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland
for Wayland sessions.post_login/mod.rs
file is not really helping.libpam-dev
on Ubuntu to use this project.gnome-session
with the --debug
flag.DISPLAY=:1
does not resolve the issue. In fact the documentation stated that gnome-session
does this itself.gnome-session
from the tty is quite difficult.To be honest, I am having many problems with setting up a good testing environment.
I will follow up soon.
If you want start a gnome-sesion
from available tty, this arch wiki may helpfull arch gnome
XDG_SESSION_TYPE=wayland dbus-run-session gnome-session
or gnome-shell --wayland
➜ wayland pwd
/etc/lemurs/wayland
➜ wayland grep -v '^#' ubuntu
exec env GNOME_SHELL_SESSION_MODE=ubuntu XDG_SESSION_TYPE=wayland MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland dbus-run-session /usr/bin/gnome-session --session=ubuntu
➜ wayland ls
sway ubuntu
The above config still didn't work, but it works if you execute it from tty. when enable --debug
, the log screen disappear too fast, can't find a way to review the debug log
I think this is a problem with gnome-session
in general. I had someone message me about the same problem for the X11 gnome-session. I didn't test this yet, but according to the arch wiki somewhere. GDM puts the Xauthority file somewhere else than the home directory. This might well be the problem.
There is also a possibility that it has something to do with the rights given to the Xauthority file in the home directory.
The problem seems to be exclusively with Ubuntu. I tested it with a fresh arch setup and gnome and everything seems to work fine. I will investigate more later.
Okay. I have tracked the issue down. It turns out that the PAM services are very different between Ubuntu and other distributions. Now, I just need to find a fix that seems reasonable.
I have the same problem and logs as @kmephistoh, but instead Ubuntu I'm trying to launch labwc in Arch Linux. I have the wayland folder created and the labwc
file with the script, I didn't change anything else.
#! /bin/sh
exec labwc
If I change to another tty and run the command labwc
it starts correctly.
After looking at this problem some more. I am surprised logging in with lemurs works at all on Ubuntu. The current PAM configuration is totally unsuited for Ubuntu. I will see what I can do about this.
Is there any chance you can both try again? It works now on my side, but your issues may be different?
Unfortunately it still doesn't work for me, here is the logs, btw, is there the possibility that I'm missing some packages? Update: I'm using Nushell as my primary bash
Hi, I pull the latest main branch(no dev
branch exist),
at lemurs.log:
[INFO lemurs::auth] Authentication failed for 'mephisto'. Reason: Failed to open a PAM session
at auth.log:
Mar 7 13:50:26 workpc lemurs: pam_loginuid(lemurs:session): Error writing /proc/self/loginuid: Operation not permitted
Mar 7 13:50:26 workpc lemurs: pam_loginuid(lemurs:session): set_loginuid failed
By the way
lemurs.log
would add timestamp info at the beginning of each line, that may helpful for multi times test.libpam-dev
has updated to libpam0g-dev
at Ubuntu 22.10.
➜ ~ sudo apt install libpam-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libpam0g-dev' instead of 'libpam-dev'
libpam0g-dev is already the newest version (1.5.2-2ubuntu1.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
➜ ~ cat /etc/issue
Ubuntu 22.10 \n \l
Hey @Relwi, you were probably experiencing the same issue as #131. After resolving that issue, I can now run LabWC just fine. (Where it didn't before for me).
Thank you a lot for this debugging. I am talking to the maintainer of the pam
crate because there seem to be some problems on that side. I will come back to this.
Yep, I recently updated the package and is working now, thanks!
Speaking of pam, I think you should include libpam0g-dev
for building at Ubuntu 22.04
➜ lightdm cd /etc/lemurs ➜ lemurs ls config.toml wayland wms xsetup.sh ➜ lemurs tree . ├── config.toml ├── wayland │ ├── sway │ └── ubuntu ├── wms └── xsetup.sh
2 directories, 4 files ➜ lemurs cat wayland/ubuntu
! /bin/sh
exec gnome-session --session=gnome-wayland ➜ lemurs ls -al wayland/ubuntu -rwxr-xr-x 1 root root 54 Dec 1 15:50 wayland/ubuntu ➜ lemurs cat /var/log/lemurs.log [2022-12-01][15:19:41][lemurs][INFO] Lemurs logger is running [2022-12-01][15:19:41][lemurs][INFO] Switching to tty 2 [2022-12-01][15:19:41][lemurs][INFO] UI booted up [2022-12-01][15:19:41][lemurs::info_caching][INFO] Attempting to get a cached information from '/var/cache/lemurs' [2022-12-01][15:19:41][lemurs::info_caching][INFO] Read cache file and found environment 'mephisto' and username 'None' [2022-12-01][15:19:41][lemurs::ui][INFO] Loading environment 'mephisto' from cache [2022-12-01][15:19:41][lemurs::ui::switcher][WARN] Failed to find selection with title: 'mephisto' [2022-12-01][15:19:52][lemurs::auth][INFO] Login attempt for 'mephisto' [2022-12-01][15:19:52][lemurs::auth::pam][INFO] Started opening session [2022-12-01][15:19:52][lemurs::auth::pam][INFO] Gotten Authenticator [2022-12-01][15:19:52][lemurs::auth::pam][INFO] Got handler [2022-12-01][15:19:52][lemurs::auth::pam][INFO] Validated account [2022-12-01][15:19:52][lemurs::auth::pam][INFO] Opened session [2022-12-01][15:19:52][lemurs::ui][INFO] Setting cached information [2022-12-01][15:19:52][lemurs::info_caching][INFO] Attempting to set cache [2022-12-01][15:19:52][lemurs::info_caching][INFO] Successfully set username in cache file [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'HOME' to '/home/mephisto' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Successfully changed working directory to /home/mephisto! [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'SHELL' to '/usr/bin/zsh' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'USER' to 'mephisto' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'LOGNAME' to 'mephisto' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'PATH' to '/usr/local/sbin:/usr/local/bin:/usr/bin' [2022-12-01][15:19:52][lemurs::post_login][INFO] Set environment variables. [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CONFIG_DIR' to '/home/mephisto/.config' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CACHE_HOME' to '/home/mephisto/.cache' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_DATA_HOME' to '/home/mephisto/.local/share' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_STATE_HOME' to '/home/mephisto/.local/state' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_DATA_DIRS' to '/usr/local/share:/usr/share' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CONFIG_DIRS' to '/etc/xdg' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_RUNTIME_DIR' to '/run/user/1000' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SESSION_DIR' to 'user' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SESSION_ID' to '1' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SEAT' to 'seat0' [2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_VTNR' to '2' [2022-12-01][15:19:52][lemurs::post_login][INFO] Set XDG environment variables [2022-12-01][15:19:52][lemurs::post_login][INFO] Starting Wayland Session [2022-12-01][15:19:52][lemurs::post_login][INFO] Entered Wayland compositor [2022-12-01][15:19:52][lemurs::auth::utmpx][INFO] Adding UTMPX record [2022-12-01][15:19:52][lemurs::auth::utmpx][INFO] Added UTMPX record [2022-12-01][15:19:53][lemurs::auth::utmpx][INFO] Removing UTMPX record
When input username and password, it didn't enter gnome desktop, just stay on greeter page. By the way, this repo is impressive.