Obsidian-StudiosInc / entrance

General purpose Display Manager built on the Enlightenment Foundation Libraries (EFL)
GNU General Public License v3.0
23 stars 10 forks source link

So when do you think you'll be able to enable session choosing? #12

Closed SolarAquarion closed 6 years ago

wltjr commented 6 years ago

What do you mean by session choosing? Wayland vs X? Or something else?

SolarAquarion commented 6 years ago

the parsing of /usr/share/xsessions

SolarAquarion commented 6 years ago

also /usr/share/wayland-sessions

wltjr commented 6 years ago

I think I need to add that back or something. I removed it in commit b9210fc not sure if it was needed or not. It may not be needed as its own file but likely need to use system provided or something.

SolarAquarion commented 6 years ago

@wltjr so the session choosing is supposed to from a drop down or similar, where you can choose your wayland session or xsession as existing in your system. It's a series of desktop files.

Sourcing the /etc/profile, /etc/profile.d, ~/.prfofile, and ~/.xprofile and other other such files are a good idea

The xinit dir is also good

SolarAquarion commented 6 years ago

https://github.com/GNOME/gdm/blob/master/data/Xsession.in

gdm has something

wltjr commented 6 years ago

I haven't anything for Wayland yet, so its bound to X sessions for now. There is a select box on the right next to login button that allows you to choose the session. I have only tested E and EPYMC, but you should be able to log into other desktop sessions, like XFCE. Not sure about Gnome or KDE, may need to support logind/elogind.

I have been stuck in Java world packaging stuff to free myself of Gentoo's Java packages and tree. Its a crufty mess. I already did the same for all EFL/E stuff a bit ago. Much less of that, so easier to wrangle into better condition than the tons of Java stuff... Once done will get back to logind/elogind support in entrance and other stuff.

wltjr commented 6 years ago

I could see about adding Wayland sessions to the X sessions. But I do not believe it will launch a Wayland session without logind/elogind, need seat support etc to pass to Wayland. Just the same need to figure out X cookie or what ever from logind/elogind. To replace consolekit. Though read something that they can be used together. Not sure how I will handle that stuff just yet. Not sure how other DM are handling the X or Wayland session. Are they in the same drop down just marked differently? I played around with launching KDE under wayland via SDDM but never had any luck. Same with E but I guess I wasn't running logind/elogind or something.

SolarAquarion commented 6 years ago

gdm and lightdm are the ones that are most likely to work

On Dec 18, 2017 1:05 PM, "William L Thomson Jr" notifications@github.com wrote:

I could see about adding Wayland sessions to the X sessions. But I do not believe it will launch a Wayland session without logind/elogind, need seat support etc to pass to Wayland. Just the same need to figure out X cookie or what ever from logind/elogind. To replace consolekit. Though read something that they can be used together. Not sure how I will handle that stuff just yet. Not sure how other DM are handling the X or Wayland session. Are they in the same drop down just marked differently? I played around with launching KDE under wayland via SDDM but never had any luck. Same with E but I guess I wasn't running logind/elogind or something.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/12#issuecomment-352508938, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iOL0mwGyhRd6Eksfv0fRXvOgpkQEks5tBqlMgaJpZM4RFzbb .

wltjr commented 6 years ago

Do they have a single list and just mark x and wayland? I used to use lightdm for a bit but never saw it having any options.E does not provide a wayland session file. I know it has a X session file. I guess they use the same for both X and Wayland. But like you mentioned from what I have read they go in different locations in /usr/share. Not like EFL/E devs care how people log into E. Given they abandoned entrance and pretty much everyone logs in differently. Some use lightdm, some spawny, some spawny + anna, some run startx, etc. Not to surprised no wayland desktop file. Or if the same one gets installed in 2 locations.

SolarAquarion commented 6 years ago

It's usually written as $session ($sessiontype) as in Gnome (Wayland Session)

wltjr commented 6 years ago

Yeah those I think come from different session files. The text is in the actual .desktop files not anything the DM is adding. Its reading those from /usr/share/xsessions and wayland-sessions I bet. I can see about adding in support for wayland-sessions, but I doubt that stuff will launch till logind/elogind support is added.

SolarAquarion commented 6 years ago

For now just do /usr/share/xsessons/ Later once you do all the logind stuff and related do wayland-sessions

wltjr commented 6 years ago

It should already do /usr/share/xessions. Is the drop down on the left of the login button not working? It is a hoverselect/dropdown or popup. I can use that to log into E or EPYMC, though not a regular X session.

wltjr commented 6 years ago

Maybe a bug, I think its based on install location or something. It is not to looking in /usr/share/xessions explicitly. It is based on the install path I think. Maybe a bug as it likely should have /usr/share/xessions like /etc, etc. Even if a user puts it some where else. I may need to add another option in there.

wltjr commented 6 years ago

I think those etc locations are legacy and its been /usr/share/xesssions for some time. Not sure I need to keep those others anymore. Maybe just /usr/share/xesssion and the current for if a user installs it some where else and there is a xession folder, etc.

SolarAquarion commented 6 years ago

The sourcing of /etc/profile.d and such are still good ideas

On Dec 18, 2017 1:33 PM, "William L Thomson Jr" notifications@github.com wrote:

I think those etc locations are legacy and its been /usr/share/xesssions for some time. Not sure I need to keep those others anymore. Maybe just /usr/share/xesssion and the current for if a user installs it some where else and there is a xession folder, etc.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/12#issuecomment-352517885, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iMvBcijcylZnxkyX7h9KCqX6BRv4ks5tBq_7gaJpZM4RFzbb .

wltjr commented 6 years ago

Not sure about for sessions, that maybe a new location. I was talking about these. I think these are legacy and not used. Instead should have /usr/share/xessions.

   /* Maybee need to scan other directories ? */
   _entrance_session_desktops_scan("/etc/share/xsessions");
   _entrance_session_desktops_scan("/etc/X11/dm/Sessions");
snprintf(buf, sizeof(buf), "%s/xsessions", efreet_data_home_get());

Nice typo in comment, shows how much attention the author was paying when first coding. The whole codebase is a horrible mess. How other EFL devs spoke of the original author was not encouraging and explains many issues in EFL/E.... They started a new module for network manager, oconnection, using the old api for gadgets. Which is still more stable, but anything new should support new API and old if not just new. Like all the bryce stuff uses new API. Shelf stuff uses old.

wltjr commented 6 years ago

I bet in your case efreet_data_home_get is not returning /usr/share.

SolarAquarion commented 6 years ago

Yeah /etc/share is trash

On Dec 18, 2017 1:59 PM, "William L Thomson Jr" notifications@github.com wrote:

I bet in your case efreet_data_home_get is not returning /usr/share.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/12#issuecomment-352524902, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iP8TTeKM_4Q4l2fO705GhJNBYMITks5tBrYggaJpZM4RFzbb .

SolarAquarion commented 6 years ago

/etc/X11/xdm is not needed

wltjr commented 6 years ago

I think so is /etc/x11/dm, legacy cruft if it was ever used... I think I will drop both those for /usr/share/xsession or something. Slowly having to recode the entire think. Still a bit better than starting from scratch, but I can see why others including the author walked away from the codebase... None the less I will get it into shape in 2018 :)

SolarAquarion commented 6 years ago

there's /etc/X11/Sessions, but only fvwm-crystal uses that. I removed that

SolarAquarion commented 6 years ago

https://www.archlinux.org/packages/extra/any/fvwm-crystal/ look at the file list

wltjr commented 6 years ago

Its odd upstream has no official documents on such, like mentioned in the following links. Seems lightdm is a freedesktop.org project or something. It mentions /usr/share/xession. https://www.freedesktop.org/wiki/Software/LightDM/CommonConfiguration/ https://www.freedesktop.org/wiki/Software/LightDM/Design/

A bug makes the /etc/X11/sessions. Its odd https://bugs.freedesktop.org/show_bug.cgi?id=89285

Anyway I will look into this time permitting. Likely see about a hard coded /usr/share or something. In case efreet is else where.

SolarAquarion commented 6 years ago

that's how most of them do it I think

On Dec 18, 2017 2:16 PM, "William L Thomson Jr" notifications@github.com wrote:

Its odd upstream has no official documents on such, like mentioned in the following links. Seems lightdm is a freedesktop.org project or something. It mentions /usr/share/xession. https://www.freedesktop.org/wiki/Software/LightDM/CommonConfiguration/ https://www.freedesktop.org/wiki/Software/LightDM/Design/

A bug makes the /etc/X11/sessions. Its odd https://bugs.freedesktop.org/show_bug.cgi?id=89285

Anyway I will look into this time permitting. Likely see about a hard coded /usr/share or something. In case efreet is else where.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/12#issuecomment-352529569, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iD8xNUP0y4gVjrhF37Kyu_h1fQHyks5tBroKgaJpZM4RFzbb .

wltjr commented 6 years ago

Freedesktop.org should have some spec on it to be standard. Otherwise each has to look to the other and it becomes a mess which we have :)

SolarAquarion commented 6 years ago

There's no spec for it

data/man/sddm.conf.rst.in: Default value is "/usr/share/xsessions". docs/THEMING.md:sessionModel: This is a list model which contains information about the desktop sessions i src/common/Configuration.h: Entry(SessionDir, QString, _S("/usr/share/xsessions"),

data/man/sddm.conf.rst.in: Default value is "/usr/share/wayland-sessions". src/common/Configuration.h: Entry(SessionDir, QString, _S("/usr/share/wayland-sessions

data/lightdm.conf:#sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sess

SolarAquarion commented 6 years ago

Each display manager re-implements it

wltjr commented 6 years ago

Yeah I could not find any common spec. I have seen the /usr/share/wayland-sessions in some docs somewhere before. I thought that was standard location for at least wayland...

SolarAquarion commented 6 years ago

Basically you'll just need to do it yourself

On Dec 18, 2017 3:23 PM, "William L Thomson Jr" notifications@github.com wrote:

Yeah I could not find any common spec. I have seen the /usr/share/wayland-sessions in some docs somewhere before. I thought that was standard location for at least wayland...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/12#issuecomment-352547257, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iDqP_GBOP_s6bHD2yqM1XirwM3B_ks5tBsnegaJpZM4RFzbb .

wltjr commented 6 years ago

Yeah I get that, just ridiculous no standardization here... I guess explains some what the various paths in entrance now. Not sure why its so hard to come up with some standard there... Oh well I will just add in /usr/share/xsession and /usr/share/wayland-session. Just need to see if it duplicates stuff from the path using efreet path. May have to drop that. I am not sure anyone will ever use that, have some xesssion directory in some other layout with efreet also using that, a location other than /usr/share. I do not see that being the case. Though maybe what you have now if the session files are not showing up.

wltjr commented 6 years ago

That should address the issue for now. Wayland sessions will show up but likely not work till entrance has logind/elogind support. Probably should have left it out for now, but its there :P I will see about doing a new release in the next week or so. Need to tweak the date alignment last month and this was off to the right a bit. Also change up the effects a bit.

SolarAquarion commented 6 years ago

oh /etc/profile.d and other such file should be sourced on logon

wltjr commented 6 years ago

What are you running? What distro or *nix flavor? On Gentoo that is provided in a universal way via xdm and startDM.sh. Which handles starting the DM and sourcing things like /etc/profile. Which in /etc/profile it has a bit to source profile.d.

for sh in /etc/profile.d/*.sh ; do
        [ -r "$sh" ] && . "$sh"
done

The old file I removed did not source that but did use other profile paths. I may need to restore for other operating systems. The only bit of that I found of interest was the xinit stuff. I have to double check to see if that stuff is being fired or not.

SolarAquarion commented 6 years ago

Arch

On Dec 20, 2017 2:47 PM, "William L Thomson Jr" notifications@github.com wrote:

What are you running? What distro or *nix flavor? On Gentoo that is provided in a universal way via xdm and startDM.sh https://github.com/gentoo/gentoo/blob/master/x11-apps/xinit/files/startDM.sh. Which handles starting the DM and sourcing things like /etc/profile https://github.com/gentoo/gentoo/blob/master/x11-apps/xinit/files/startDM.sh#L7. Which in /etc/profile it has a bit to source profile.d.

for sh in /etc/profile.d/*.sh ; do [ -r "$sh" ] && . "$sh"done

The old file I removed https://github.com/Obsidian-StudiosInc/entrance/commit/b9210fce9b5277e5241e15a72aea0796c21005fa did not source that but did use other profile paths. I may need to restore for other operating systems. The only bit of that I found of interest was the xinit stuff. I have to double check to see if that stuff is being fired or not.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/12#issuecomment-353162558, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iNjREz7zIxW14g4XpGLG2FBEyycBks5tCWLWgaJpZM4RFzbb .

wltjr commented 6 years ago

Have to see what they are doing there. Do they not have a xdm? That is not the old actual XDM, though it may also come with that. Usually its just a wrapper. Think arch tends to be pretty close to Gentoo in that regard. They must be doing something different.

How are you starting entrance? init.d script or systemd?

SolarAquarion commented 6 years ago

systemd

On Dec 20, 2017 2:55 PM, "William L Thomson Jr" notifications@github.com wrote:

Have to see what they are doing there. Do they not have a xdm? That is not the old actual XDM, though it may also come with that. Usually its just a wrapper. Think arch tends to be pretty close to Gentoo in that regard. They must be doing something different.

How are you starting entrance? init.d script or systemd?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/12#issuecomment-353165037, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iMplv9I0sBpluSLm0uBun30aCfmJks5tCWTygaJpZM4RFzbb .

wltjr commented 6 years ago

Looks like arch does things pretty differently. I will have to come up with something for that. Maybe more something for systemd. Seems systemd is preferred on arch. I guess it does not provide means for such. Seems to use one for each DM

"Most display managers source /etc/xprofile, ~/.xprofile and /etc/X11/xinit/xinitrc.d/. For more details, see xprofile." https://wiki.archlinux.org/index.php/Display_manager#Autostarting

Its a pretty strange distro. They leave way to much up to the user to do and each DM has its own Xsession file vs a more universal one. Plus the choice on starx, xinit, xdm, and slim.

Anyway I will look into it and see what I can come up with. May have to restore that old file and install it when logind option is enabled along with the systemd file. Have to see how the other DMs are loading the Xsessions file. If they are doing it via code or some wrapper script. I could likely put a wrapper script in place of the ExecStart=/path/entrance --nodaemon So the Xsession wrapper script is called then it invokes entrance.

wltjr commented 6 years ago

I guess each Xsession file for each DM sources /etc/profile.d, or some profile file that does that. Does your /etc/profile have a line on sourcing /etc/profile.d? Or is that left up to the DM? I am assuming its left up to the DM.

SolarAquarion commented 6 years ago

Yes just look at lightdm.conf

On Dec 20, 2017 3:04 PM, "William L Thomson Jr" notifications@github.com wrote:

I guess each Xsession file for each DM sources /etc/profile.d, or some profile file that does that. Does your /etc/profile have a line on sourcing /etc/profile.d? Or is that left up to the DM? I am assuming its left up to the DM.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/12#issuecomment-353168235, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iHDq59zb5LjjqJBOeSUHDERxfX1lks5tCWgIgaJpZM4RFzbb .

SolarAquarion commented 6 years ago

Or similar

On Dec 20, 2017 3:08 PM, "Solomon Choina" shlomochoina@gmail.com wrote:

Yes just look at lightdm.conf

On Dec 20, 2017 3:04 PM, "William L Thomson Jr" notifications@github.com wrote:

I guess each Xsession file for each DM sources /etc/profile.d, or some profile file that does that. Does your /etc/profile have a line on sourcing /etc/profile.d? Or is that left up to the DM? I am assuming its left up to the DM.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/12#issuecomment-353168235, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iHDq59zb5LjjqJBOeSUHDERxfX1lks5tCWgIgaJpZM4RFzbb .

SolarAquarion commented 6 years ago

https://git.archlinux.org/svntogit/packages.git/tree/trunk/Xsession?h=packages/lightdm

gdm has one https://github.com/GNOME/gdm/blob/master/data/Xsession.in

On Dec 20, 2017 3:04 PM, "William L Thomson Jr" notifications@github.com wrote:

I guess each Xsession file for each DM sources /etc/profile.d, or some profile file that does that. Does your /etc/profile have a line on sourcing /etc/profile.d? Or is that left up to the DM? I am assuming its left up to the DM.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/12#issuecomment-353168235, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iHDq59zb5LjjqJBOeSUHDERxfX1lks5tCWgIgaJpZM4RFzbb .

wltjr commented 6 years ago

Its pretty universal. Why Gentoo has a wrapper. Arch seems to go with the one provided from each. Likely due to a lack of man power or something. I much prefer general universal things vs application specific and duplicating the same basic function. Like a general arch Xsession or startDM.sh vs one for each DM.

The GDM one also does not source /etc/profile.d, so that must be done by /etc/profile or other. The lightdm one looks damn near identical to the one I removed from entrance. Look at these two, they are pretty close https://git.archlinux.org/svntogit/packages.git/tree/trunk/Xsession?h=packages/lightdm https://github.com/Obsidian-StudiosInc/entrance/blob/87cbb9c32a91e519e5466882cb48e69fa144b457/data/Xsession

The gnome one is more modified but has some similar bits. That is something Arch really should be provided for ALL DMs like on Gentoo. Vs having each DM ship their own. Just how they do things on Arch. It is not as friendly to users or developers, both has to do more work it seems.

I can restore that file and have it installed for systemd, or distros that lack its own wrapper. I removed it as it was not used/needed on Gentoo. Seems it may still be on other distros or OS.

wltjr commented 6 years ago

I would bet the original entrance/elsa author copied a Xsession file from lightdm or something for entrance, given how close the code in each.

SolarAquarion commented 6 years ago

Yeah /etc/profile sources /etc/profile.d

https://git.archlinux.org/svntogit/packages.git/tree/

On Dec 20, 2017 3:32 PM, "William L Thomson Jr" notifications@github.com wrote:

I would bet the original entrance/elsa author copied a Xsession file from lightdm or something for entrance, given how close the code in each.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/12#issuecomment-353174869, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iKWukoWYFuYfdysEFLMGcB6UPSMNks5tCW7tgaJpZM4RFzbb .

wltjr commented 6 years ago

To take a parting jab at systemd, seems with all that standardization. Nothing was done to standardize X sessions or oven profile aspect :P If anything seems the init script wrappers like Gentoo has is much better. There is 1 xdm init, so no init for sddm, lightdm, entrance, etc. Nor any Xsession files needed. It is done in a universal way for all. Such that the base system developers and xinit package manainters manage 1 file vs Xsession files x number of DMs... Nothing to do with Arch here. but systemd should have something like a xdm.service. Rather than a sddm.service, lightdm.service, entrance.service, etc. Which I bet those are all basically the same short of the executable.

Just good stuff :) More systemd, not standardizing something that badly needs it :)

wltjr commented 6 years ago

Ok I will restore the Xsession file and have it available for install. I guess I can install by default. I will have to experiment. I do not want to be used on Gentoo. But I could see someone maybe needing that who is not using systemd. Seems you need that on Arch regardless of using systemd or not.

I have to see what Gentoo has for xdm and systemd. If it has a wrapper like the xdm/xinit with startDM.sh or goes with the per DM service file and I guess their own Xsession. I would assume Gentoo to have a universal route for system like its openrc/xdm/xinit route.

SolarAquarion commented 6 years ago

there is a xdm.service but it's provided by xdm

On Dec 20, 2017 3:42 PM, "William L Thomson Jr" notifications@github.com wrote:

To take a parting jab at systemd, seems with all that standardization. Nothing was done to standardize X sessions or oven profile aspect :P If anything seems the init script wrappers like Gentoo has is much better. There is 1 xdm init, so no init for sddm, lightdm, entrance, etc. Nor any Xsession files needed. It is done in a universal way for all. Such that the base system developers and xinit package manainters manage 1 file vs Xsession files x number of DMs... Nothing to do with Arch here. but systemd should have something like a xdm.service. Rather than a sddm.service, lightdm.service, entrance.service, etc. Which I bet those are all basically the same short of the executable.

Just good stuff :) More systemd, not standardizing something that badly needs it :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/12#issuecomment-353177070, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iEaIB3VTeuQtFz9pPl3GFfFgqpXgks5tCXE7gaJpZM4RFzbb .

wltjr commented 6 years ago

Need to shell check that file and stuff. Not to keen to having to maintain that, but seems I have no choice as some distros are leaving that up to packages themselves. You may consider filing a feature request bug with Arch. They should have a universal distro specific wrapper for any DM like Gentoo has. That seems a better approach. 1 file to maintain vs 1 for each DM.