apognu / tuigreet

Graphical console greeter for greetd
GNU General Public License v3.0
995 stars 45 forks source link

X sessions broken #15

Closed nabijaczleweli closed 3 years ago

nabijaczleweli commented 3 years ago

/usr/share/wayland-sessions/*.desktops specify Exec= to the display server, and work stand-alone.

/usr/share/xsessions/*.desktops specify Exec= to the WM, and therefore need some form of X server configuration to be performed before they're started.

xukai92 commented 3 years ago

Any idea how to fix this?

nabijaczleweli commented 3 years ago

Perform actual X session initialisation – executing an X server is a good start.

xukai92 commented 3 years ago

Yeah I did do startx to solve the issue. But how to make tuigreet deal with X and Waylan differently?

GamerPanda99 commented 3 years ago

Well tuigreet just takes an arbitrary command right? sou you can simply build a script to do your init and run that script?

xukai92 commented 3 years ago

Well tuigreet just takes an arbitrary command right? sou you can simply build a script to do your init and run that script?

Yes I'm doing this ATM.

The annoying thing is that those X sessions that doesn't work would still be listed by tuigreet. I really want to make everything listed work fine.

Could I make tuigreet somehow handle X sessions and wayland sessions differently?

apognu commented 3 years ago

I'll get on this as soon as I am able to install some X WM to reproduce this.

greetd can only run one command after authentication succeeds, so this behavior cannot be changed. However, maybe I could allow customizing the directory where desktop files are looked up at, so you may provide your own, curated and customized.

Would this solve your issue or did I misunderstand?

xukai92 commented 3 years ago

Destop files seem to be located in the same directly, no? I don't know the solution but it seems that maybe provide a way to manually configure each sesseion is fine?

apognu commented 3 years ago

Two directories are used to look for desktop files: /usr/share/xsessions and /usr/share/wayland-sessions. Those are the default directories where the various window managers drop their session configs.

I'll look at adding an option to change those directories so you can customize which sessions are displayed and what is executed.

apognu commented 3 years ago

You can now pass a new --sessions argument to tuigreet, as a colon-separated list of directories where it will try and load desktop files for your sessions, so you can fine-tune the list.

It is now available on master and will be included in the next version.

paulolieuthier commented 2 years ago

@apognu it would still be nice if tuigreet could correctly instruct greetd to initialize X11 for default sessions in /usr/share/xsessions. QtGreet does that and that's what greet expects.

Are you willing to merge a PR for that?

apognu commented 2 years ago

In principle, the more plug-and-play everything is, the better.

We need to make sure we do not make any wrong assumptions about what this means (for example, I don't have xinit on my own system). I've made this mistake in the past and it came to bite me in the ass later.

But yes, a PR for this would be appreciated. Testing it is going to be tough, but I think it could be a nice addition.

apognu commented 2 years ago

If you would like to discuss it more, I'd prefer you opening a new issue separate from this one, though. 👍