Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unable to select a session among multiple sessions #155

Open
LittFlower opened this issue Sep 22, 2024 · 9 comments
Open

Unable to select a session among multiple sessions #155

LittFlower opened this issue Sep 22, 2024 · 9 comments

Comments

@LittFlower
Copy link

LittFlower commented Sep 22, 2024

Describe the bug
When I use tuigreet, I have both plasma(X11) and plasma(wayland) graphical protocols installed on my computer, and when I press F3, I do get to choose what I want between plasma(wayland) and plasma(x11), but when I enter my password to log in, I'm logged in to plasma(wayland) regardless of whether I choose plasma(x11) or plasma(wayland). I've tested that using startx /usr/bin/env /usr/bin/startplasma-x11 in tty will log me in to plasma(x11), so this may be a configuration issue with my tuigreet.

To Reproduce
Steps to reproduce the behavior:

  1. start the computer and go to tuigreet
  2. Press on F3 and select Plasma(X11)
  3. Input Username and Password, then press Enter
  4. Login plasma on wayland, not x11.... however.

Expected behavior
When I press F3, I have three options to choose from, Plasma(Wayland), Plasma(X11), and Hyprland, and I want to be able to choose an option that logs me into its corresponding desktop environment instead of always logging me into wayland.

System information:

  • Distribution: Linux ArchLinux 6.10.8-arch1-2.1-g14 Menu for selecting from systems xsessions / wayland-sessions. #1 SMP PREEMPT_DYNAMIC Sat, 07 Sep 2024 06:01:43 +0000 x86_64 GNU/Linux
  • greetd version: 0.10.3-1
  • tuigreet version: 0.9.1-1
  • Installation method (from source, package, binary, etc.): pacman
  • tuigreet command line: command = "tuigreet --asterisks --issue -t --remember --width 90 --greet-align left --theme 'border=magenta;text=cyan;prompt=green;time=red;button=lavender;container=black;input=red'"

Additional context
I'm guessing I should create some new sessions instead of always using the default session, it's just my guess and I think there's something wrong with the way my config file is written. but i don't know how to write it rightly.

Debug log

2024-09-22T06:53:27.397879Z  INFO tuigreet: 49: tuigreet started
2024-09-22T06:53:27.401512Z  INFO tuigreet: 66: creating remembered session for user flower
2024-09-22T06:53:27.401529Z  INFO tuigreet::ipc: 36: sending request to greetd: CreateSession { username: "flower" }
2024-09-22T06:53:27.430963Z  INFO tuigreet::ipc: 75: received greetd message: AuthMessage { auth_message_type: Secret, auth_message: "Password: " }
2024-09-22T06:53:41.482213Z  INFO tuigreet::ipc: 36: sending request to greetd: PostAuthMessageResponse
2024-09-22T06:53:41.490243Z  INFO tuigreet::ipc: 75: received greetd message: Success
2024-09-22T06:53:41.490249Z  INFO tuigreet::ipc: 153: authentication successful, starting session
2024-09-22T06:53:41.490253Z  INFO tuigreet::ipc: 36: sending request to greetd: StartSession { cmd: ["Hyprland"], env: ["XDG_SESSION_DESKTOP=hyprland", "DESKTOP_SESSION=hyprland", "XDG_SESSION_TYPE=wayland"] }
2024-09-22T06:53:41.490509Z  INFO tuigreet::ipc: 75: received greetd message: Success
2024-09-22T06:53:41.490515Z  INFO tuigreet::ipc: 119: greetd acknowledged session start, exiting
2024-09-22T06:53:41.490516Z  INFO tuigreet::ipc: 122: caching last successful username
2024-09-22T06:53:41.490715Z  INFO tuigreet: 122: preparing exit with status Success
2024-09-22T06:53:41.492770Z  INFO tuigreet: 90: exiting main loop
@apognu
Copy link
Owner

apognu commented Sep 22, 2024

Can you paste the content of the two session files that give you trouble for Plasma? They should be located under /sur/share/xsessions and /sur/share/wayland-sessions respectively.

@LittFlower
Copy link
Author

just like this:

╭─flower at ArchLinux in ~ 24-09-22 - 19:11:20
╰─○ ls /usr/share/xsessions
dusk.desktop  plasmax11.desktop
╭─flower at ArchLinux in ~ 24-09-22 - 19:11:23
╰─○ ls /usr/share/wayland-sessions
hyprland.desktop  plasma.desktop

@apognu
Copy link
Owner

apognu commented Sep 22, 2024

Can you show the content of the two Plasma desktop files?

@LittFlower
Copy link
Author

LittFlower commented Sep 22, 2024

Of course.

x11.txt
wayland.txt

Due to github's limitations on suffixes for uploaded files, I renamed these two files to wayland.txt and x11.txt, which correspond to Plasma(Wayland).desktop and Plasma(X11).desktop

@LittFlower
Copy link
Author

emmm... I mean that I can login the Plasma(wayland) through the tuigreet, however, I cannot login the Plasma(X11) or Hyprland through the tuigreet 's F3.... Because whether I choose the Plasma(x11) or Hyprland or not, I cannot login what I chose, I always login the Plasma(Wayland).

Another truth is that I can log in Plasma(X11) by startx /usr/bin/env /usr/bin/startplasma-x11 and Hyprland by Hyprland in tty. So... I guess that the content of the two Plasma desktop files are right......

@apognu
Copy link
Owner

apognu commented Sep 23, 2024

When you say that you "cannot login", what do you mean? Do you have an error? Does tuigreet exit and starts again?

From the logs, it looks like tuigreets does what it is supposed to do, signals greetd to start hyprland and exits. What does greetd tell you?

@LittFlower
Copy link
Author

When I say that I "cannot login", I mean I cannot login the Hyprland or Plasma(X11), but I can login them from tty by Hyprland or startx /usr/bin/env /usr/bin/startplasma-x11. I think I donot have any error because I will login Plasma(Wayland) however.

you can also see that:

╭─flower at ArchLinux in ~ 24-09-23 - 20:52:52
╰─○ env | grep hyprland
5:DESKTOP_SESSION=hyprland
52:XDG_SESSION_DESKTOP=hyprland
╭─flower at ArchLinux in ~ 24-09-23 - 20:53:08
╰─○ fastfetch
-`                     flower@ArchLinux
.o+`                    ----------------
`ooo/                    OS: Arch Linux x86_64
`+oooo:                   Host: ASUS TUF Gaming F15 FX507VV_FX507VV (1.0)
`+oooooo:                  Kernel: Linux 6.10.8-arch1-2.1-g14
-+oooooo+:                 Uptime: 5 mins
`/:-:++oooo+:                Packages: 2019 (pacman)
`/++++/+++++++:               Shell: zsh 5.9
`/++++++++++++++:              Display (NE156FHM-NX6): 1920x1080 @ 60 Hz in 16″ [Bui]
`/+++ooooooooooooo/`            DE: KDE Plasma 6.1.5
./ooosssso++osssssso+`           WM: KWin (Wayland)
.oossssso-````/ossssss+`          WM Theme: Klassy
-osssssso.      :ssssssso.         Theme: Breeze (FluentLight) [Qt], Default [GTK2/3/4]
:osssssss/        osssso+++.        Icons: Win10Sur [Qt], Win10Sur [GTK2/3/4]
/ossssssss/        +ssssooo/-        Font: 终端更纱黑体-简 Nerd (14pt) [Qt], 终端更纱黑体简
`/ossssso+/:-        -:/+osssso+-      Cursor: material_light (32px)
`+sso+:-`                 `.-/+oso:     Terminal: konsole 24.8.1
`++:.                           `-/+/    Terminal Font: 终端更纱黑体-简 Nerd (15pt, Semibold)
.`                                 `/    CPU: 13th Gen Intel(R) Core(TM) i7-13700H (20) @ 5.00z
GPU 1: NVIDIA GeForce RTX 4060 Max-Q / Mobile [Discre]
GPU 2: Intel Iris Xe Graphics @ 1.50 GHz [Integrated]
Memory: 3.19 GiB / 15.25 GiB (21%)
Swap: 45.75 MiB / 8.00 GiB (1%)
Disk (/): 732.54 GiB / 1006.85 GiB (73%) - ext4
Disk (/home): 511.74 GiB / 859.92 GiB (60%) - ext4
Local IP (wlo1): 10.134.129.100/21
Battery (GA50358): 81% [AC Connected]
Locale: zh_CN.UTF-8

I mean that when I choose Hyprland or Plasma(X11), I always login Plasma(Wayland). I don't know why....

@LittFlower
Copy link
Author

9月 23 20:47:33 ArchLinux systemd[1]: Started Greeter daemon.
9月 23 20:47:33 ArchLinux greetd[913]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: Current, switch: true }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run", service: "greetd" }, default_session: ConfigSession { command: "tuigreet --asterisks --issue -t --remember --width 100 --greet-align left --theme 'border=magenta;text=cyan;prompt=green;time=red;button=yellow;container=black;input=red' -d", user: "greeter", service: "greetd-greeter" }, initial_session: None }, internal: ConfigInternal { session_worker: 0 } }
9月 23 20:47:33 ArchLinux greetd[915]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run", service: "greetd" }, default_session: ConfigSession { command: "", user: "", service: "" }, initial_session: None }, internal: ConfigInternal { session_worker: 11 } }
9月 23 20:47:33 ArchLinux greetd[915]: pam_systemd_home(greetd:account): New sd-bus connection (system-bus-pam-systemd-home-915) opened.
9月 23 20:47:33 ArchLinux greetd[915]: pam_kwallet5(greetd:setcred): pam_kwallet5: pam_sm_setcred
9月 23 20:47:33 ArchLinux greetd[915]: pam_unix(greetd:session): session opened for user greeter(uid=952) by greeter(uid=0)
9月 23 20:47:33 ArchLinux greetd[915]: pam_systemd(greetd:session): New sd-bus connection (system-bus-pam-systemd-915) opened.
9月 23 20:47:33 ArchLinux greetd[915]: pam_kwallet5(greetd:session): pam_kwallet5: pam_sm_open_session
9月 23 20:47:33 ArchLinux greetd[915]: pam_kwallet5(greetd:session): pam_kwallet5: open_session called without kwallet5_key
9月 23 20:47:33 ArchLinux greetd[1162]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run", service: "greetd" }, default_session: ConfigSession { command: "", user: "", service: "" }, initial_session: None }, internal: ConfigInternal { session_worker: 12 } }
9月 23 20:47:33 ArchLinux greetd[1162]: pam_systemd_home(greetd:auth): New sd-bus connection (system-bus-pam-systemd-home-1162) opened.
9月 23 20:47:47 ArchLinux greetd[1162]: pam_kwallet5(greetd:auth): pam_kwallet5: pam_sm_authenticate
9月 23 20:47:47 ArchLinux greetd[1162]: pam_kwallet5(greetd:setcred): pam_kwallet5: pam_sm_setcred
9月 23 20:47:47 ArchLinux greetd[1162]: pam_unix(greetd:session): session opened for user flower(uid=1000) by flower(uid=0)
9月 23 20:47:47 ArchLinux greetd[1162]: pam_systemd(greetd:session): New sd-bus connection (system-bus-pam-systemd-1162) opened.
9月 23 20:47:47 ArchLinux greetd[1162]: pam_kwallet5(greetd:session): pam_kwallet5: pam_sm_open_session

This is my greetd log.

@LittFlower
Copy link
Author

From the logs, it looks like tuigreets does what it is supposed to do, signals greetd to start hyprland and exits.

But the greetd didn't start the hyprland but started the Plasma(Wayland) and exited....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants