Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

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

Closed
SolarAquarion opened this issue Dec 18, 2017 · 76 comments
Closed
Assignees
Labels

Comments

@SolarAquarion
Copy link

No description provided.

@wltjr
Copy link
Member

wltjr commented Dec 18, 2017

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

@SolarAquarion
Copy link
Author

the parsing of /usr/share/xsessions

@SolarAquarion
Copy link
Author

also /usr/share/wayland-sessions

@wltjr
Copy link
Member

wltjr commented Dec 18, 2017

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.

@wltjr wltjr self-assigned this Dec 18, 2017
@wltjr wltjr added the bug label Dec 18, 2017
@SolarAquarion
Copy link
Author

SolarAquarion commented Dec 18, 2017

@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
Copy link
Author

@wltjr
Copy link
Member

wltjr commented Dec 18, 2017

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
Copy link
Member

wltjr commented Dec 18, 2017

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
Copy link
Author

SolarAquarion commented Dec 18, 2017 via email

@wltjr
Copy link
Member

wltjr commented Dec 18, 2017

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
Copy link
Author

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

@wltjr
Copy link
Member

wltjr commented Dec 18, 2017

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
Copy link
Author

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

@wltjr
Copy link
Member

wltjr commented Dec 18, 2017

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
Copy link
Member

wltjr commented Dec 18, 2017

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
Copy link
Member

wltjr commented Dec 18, 2017

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
Copy link
Author

SolarAquarion commented Dec 18, 2017 via email

@wltjr
Copy link
Member

wltjr commented Dec 18, 2017

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
Copy link
Member

wltjr commented Dec 18, 2017

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

@SolarAquarion
Copy link
Author

SolarAquarion commented Dec 18, 2017 via email

@SolarAquarion
Copy link
Author

/etc/X11/xdm is not needed

@wltjr
Copy link
Member

wltjr commented Dec 18, 2017

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
Copy link
Author

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

@SolarAquarion
Copy link
Author

@wltjr
Copy link
Member

wltjr commented Dec 18, 2017

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
Copy link
Author

SolarAquarion commented Dec 18, 2017 via email

@wltjr
Copy link
Member

wltjr commented Dec 18, 2017

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
Copy link
Author

SolarAquarion commented Dec 18, 2017

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

@wltjr
Copy link
Member

wltjr commented Dec 20, 2017

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.

@wltjr
Copy link
Member

wltjr commented Dec 20, 2017

Yeah xdm on arch is completely different. On Gentoo its 2 fold, first a wrapper for all other dms. Or if you really want xdm, it will start that binary. It uses a variable in a /etc/conf.d/xdm file, and based on what you set that to, it switches through the various DMs. That way you have the same system scripts for session etc regardless of the DM. Any change is done there, vs to each DM's session file. Or the startDM.sh that is called from that init script.

The xdm init script is not even provided by xdm, but by xorg-server. xdm is the binary like entrance or other. Just uses the universal name and startup method :)

@SolarAquarion
Copy link
Author

SolarAquarion commented Dec 20, 2017 via email

@wltjr
Copy link
Member

wltjr commented Dec 20, 2017

Like Gentoo, you have some /etc/conf.d/xdm file you tell it which DM. Then you have a universal xdm.service for systemd. So that no matter what DM your using, you just edit the conf file and never touch the systemd service. You either enable it for graphical or not for non. But you do not have to switch services files to try out another DM.

Which I assume you can have more than one service enabled. Like if you enable lightdm, entrance, and sddm. Not sure if any service looks for the other and disables it. So systemd may allow you to start multiple login managers that may conflict with each other. Not sure I have no real experience with systemd. Had it on a few VMs, centos and debian, but did not play with systemd much.

@wltjr
Copy link
Member

wltjr commented Dec 20, 2017

If the services do not disable a similar service, one login manager disables the other. Then you have 2 steps to try out another DM. You have to disable the service for one DM and then start the other. Rather than editing 1 file and just restarting the service. Which you still have to stop the dm and start the other. So you have many more steps with the systemd route enabling/disabling/stopping/starting dms.

Like stop entrance, disable service, enable lightdm, start lightdm. Vs stop xdm, edit xdm.conf, start xdm :) An extra step, but if your trying out many could eat up time. A variable you can comment out and have set to many values and switch back and forth :)

@SolarAquarion
Copy link
Author

SolarAquarion commented Dec 20, 2017 via email

@wltjr
Copy link
Member

wltjr commented Dec 20, 2017

I have no clue how Gentoo handles xdm/DMs running under systemd. I have to research that :) I have never touched systemd stuff under gentoo. Other than what I did for entrance in meson, which I never tested under Gentoo. Gentoo entrance package does not support systemd, but I guess I can add that USE flag and install the service file. I added systemd support to Tomcat, but haven't means to test 📦

I will research how gentoo handles that. I assume it has some sort of wrappers like the xdm/startDM.sh stuff.

@wltjr
Copy link
Member

wltjr commented Dec 20, 2017

Anyway thanks for bringing this up! I was not sure about the Xsession file when I removed it. Seems that may have been a mistake. You can grab that file for now if you want to experiment. I will see about adding it back ASAP. By the weekend at lastest.

On a mission to fully replace all needed Java packages in Gentoo's repo with ones in mine. Hundreds of packages later, I am within like 20 or so, give or take some deps of things I do not have installed. Then back onto my Java 9 fixing, and Netbeans 9 packaging. Then I can play with Java 10...

That has been sucking up all my time. Thus no more progress on say logind/elogind support, etc. Though I added in some fake/static seat0 env vars. Not sure if the env vars needed to start wayland are provided or not. I think it may have some of that, or all that is needed to start wayland even without logind/elogind. That just allows it to be dynamic, and have say seat1, 2, etc. Based on hardware vs hard coded or config file. Also need to make a UI to manage the configuration file. Along with respecting all settings. Seems several are ingnored. background did not work and I removed code there, so need to add new working code back for custom background. There is a var to set the VT, and that for sure does not work. There is no code to load that and the VT is hard coded.

Entrance codebase was and some what still is a total mess. I am not exaggerating or being critical of the developer. There were so many issues, and so much code that did not make sense, over engineered, incomplete, typos, broken, etc. I can easily see why others walked and rather start over. Though I still thing the guts can be salvaged with some major renovation :) A fixer upper :P

Anyway thanks again for bringing up the Xsession stuff. Others may have ran into issues there and just not said anything and were unable to run or use Entrance. Not sure I would have revisited it otherwise.

@SolarAquarion
Copy link
Author

solaraquarion@apollo   ~/habs   (git)-[ master]  sudo systemctl enable entrance -f  ✔  1288  12:41:15
[sudo] password for solaraquarion:
Removed /etc/systemd/system/display-manager.service.
Created symlink /etc/systemd/system/display-manager.service → /usr/lib/systemd/system/entrance.service.

@wltjr
Copy link
Member

wltjr commented Jan 2, 2018

Per your comments Arch uses a common service name and symlinks to that. But they do not have a common Xsession startup. That seems to be left to each. I will see about addressing it this week.

@SolarAquarion
Copy link
Author

knock knock

@wltjr
Copy link
Member

wltjr commented Jan 30, 2018

@SolarAquarion I haven't forgot I have been busy with Java 9 stuff and Netbeans 9. I code in Netbeans so its effected my development for the past month or so. I have a binary snapshot I downloaded to do work when needed. I will see about making some time to do that. Oracle has not donated the sources for the C/C modules. So I will not be able to proceed much further there.

I also had the task of replacing all the rest of the Java packages I need and use on Gentoo. So now I am like 99% free of Gentoos old broken outdated Java packages. Its been a fair amount of work if you see my activity. But its getting better. I need to fix a bug in another C program jem, I used for Java Env Management. I will likely see about fixing this for entrance then.

Sorry for the delay, just juggling the world load...

wltjr added a commit that referenced this issue Jan 30, 2018
@wltjr
Copy link
Member

wltjr commented Jan 30, 2018

I restored the file and updated meson to install the file. It seems I never removed any code invoking that. Just need to test now. If its good to go as is I will do another release. If not I can see about making further changes to fix. Just need to test build/install from git head/snapshot.

@wltjr
Copy link
Member

wltjr commented Jan 30, 2018

Looks like I failed on the meson install portion.... I have to fix that and ensure its executable I believe.

@wltjr
Copy link
Member

wltjr commented Jan 30, 2018

I failed with my packaging and testing, seems the meson was correct.

@wltjr
Copy link
Member

wltjr commented Jan 30, 2018

File is in place, but seems to not be executed. Have to look into code and debug that aspect... Figures it does not work. I am pretty sure I did not remove any code there. I need to do a lot of work on entrance.

@wltjr
Copy link
Member

wltjr commented Jan 31, 2018

Looks like it should be called/fired when ever consolekit is not in use. I assume I need consolekit for X but maybe not. Consolekit provides the XDG_SESSION_COOKIE session variable which I believe is needed. I was trying to find how to get the same for elogind if possible. Not sure if Xsession can be used with consolekit or not. It is presently coded for one or the other not both. Along same lines not sure if Xsession can be used with elogind.

@SolarAquarion
Copy link
Author

SolarAquarion commented Jan 31, 2018 via email

@wltjr
Copy link
Member

wltjr commented Jan 31, 2018

Basically is the same as pam_elogind if you see the man page(xml source) It is the actual coding I am not sure about. I did not see any examples etc. I can likely figure it out. Not sure if I should keep consolekit2 support or not in favor of elogind/systemd.

Not planning on full systemd support just the sessions stuff via logind/elogind. I assume pam_systemd is part of logind, or both parts of systemd package. At least I know it provides that session variable. Confirms it is needed. Not sure if things will work otherwise without consolekit or elogind/logind/systemd. I have to build and try to log in without consolekit2.

The longind build option is not really used other than to install the systemd service file. It doesn't build any code to support that yet.

@wltjr
Copy link
Member

wltjr commented Feb 2, 2018

Did adding the Xsession file help you at all?

@SolarAquarion
Copy link
Author

SolarAquarion commented Feb 2, 2018 via email

@SolarAquarion
Copy link
Author

it doesn't launch for some reason

@wltjr
Copy link
Member

wltjr commented Feb 5, 2018

I think I broke it with a recent commit, but that should just be consolekit2. But maybe also broken with the Xsession I need to test that out.

@wltjr
Copy link
Member

wltjr commented Feb 5, 2018

Ok its better now. I still need to test out the Xsession but that should be fine. Providing that script is correct. I broke with a fix for a false double free for coverity due to odd code logic/flow. I just added another variable for coverity. Fixes the false double free, makes logic a bit better, and does not break usage.

@wltjr
Copy link
Member

wltjr commented Feb 24, 2018

I tested out the Xsession file and something is missing it does not seem to set things up properly for E to start. I have to test further to see what its missing.

@wltjr
Copy link
Member

wltjr commented Apr 5, 2018

Ok commits b1d24e1 9b5519c and 1131b82 should fix this issue. I am calling /etc/entrance/Xession before staring entrance_client and on login. That should resolve this issue. If you were wanting other Xesssion stuff setup as normal, xinitrc.d files processed etc.

If this is not, please let me know what you are unable to do or is not working. I may not be clear on the issue otherwise. Thank you!

@wltjr
Copy link
Member

wltjr commented Apr 23, 2018

Duplicate of #16, with images and log output. Working that, will close this in favor of that one.

@wltjr wltjr closed this as completed Apr 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants