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

Add support for starting Wayland sesssions #15

Open wltjr opened 6 years ago

wltjr commented 6 years ago

Need to modify code to allow for starting Wayland sessions. Need to integrate entrance with logind/elogind. Along with modifying EFL/E build systems to work with elogind, rather than all of systemd. Which should also work with consolkit2 which also provides seat information, though not presently set via ck-launch-session. Which entrance_ck_launch was removed f732506 in favor of ck-launch-session as it was basically the same code duplicated for no benefit. Though if needed for seat and other information, it may need to be restored for customization. Or submit PR to further ck-launch-session.

kanyck commented 6 years ago

Hi! I'm about to try to build xorg-free system with enlightenment and wayland on Gentoo. So far I couldn't find a DM that I may use, so I'm looking forward to test this feature as soon as it's available. (Unfortunately I'm not a programmer thus unable to help with coding... Sorry.) BTW, I see the gentoo on your screenshot. Is some kind of ebuild available? Thanks for resurrection of entrance!

wltjr commented 6 years ago

@kanyck yes there are ebuilds available in my overlay along with enlightenment and other EFL apps.

For Wayland, you will need systemd. I have not got EFL and Enlightenment going with elogind, or otherwise. I do not run systemd myself, so I am stuck on X. I am not sure if entrance can start Wayland sessions even under systemd. Since I cannot even run Wayland yet, I cannot test that stuff. I plan to look into the EFL/Enlightenment elogind vs systemd. That way I can at least start Enlightenment under Wayland and experiment from there.

When Entrance will run under Wayland is likely a long ways off for a variety of reasons. I just hope to be able to start Wayland sessions via Entrance at least. I think you can start Wayland session from a DM running under X. Not sure, its all unknown till I can run Wayland and experiment from there.

No worries on coding help. Let me know if you have any issues with ebuilds in overlay. Feel free to open issues there and I will address ASAP. Or PRs if you feel you have solutions. Thanks!

kanyck commented 6 years ago

Thanks for the ebuilds. However, what I'm trying to achieve is getting rid of X on my notebook (and no way pull in systemd in exchange)). You seem to be right -- systemd is mandatory so far. I bumped on the short and stale discussion about this matter here https://phab.enlightenment.org/T5417 and invite you to join:) Hopefully it may be not a big deal to make ecore use elogind. At the moment I'm not sure which way to go. I definitely won't use systemd, and surprisingly, I couldn't find any alternative for E this far that runs on wayland. Archwiki lists next to 10 compositors for wayland but they are ether abandoned couple of years ago or merged into some other projects (like liri), or unavailable with some other reason. Sway pulls in X (surprise!). Weston seem to work but offers just one screen (at least I don't know how to get some more) which obviously ain't enough on a notebook...

kanyck commented 6 years ago

Small update: looked into ebuilds, that was wlc who pulls X, not sway. Disabled both X and xwayland USE, now 3 packages to be installed, will look. Never used tiled WMs before -- kinda loss of virginity... Will entrance work with sway on wayland?

wltjr commented 6 years ago

I think Wayland only is a few years off still, but I could be wrong. I believe all Wayland implementations thus far, E, GTK, and Kwin/QT all require systemd.

I filed that issue upstream. I cannot use my phab account as they disabled it a while ago. I have asked to have it enabled several times on list, which falls on deaf ears/blind eyes. Also banned my main wlt-ml@o-sinc.com from mailing list, and having to use another domain/email to post...

I played with a build yesterday against elogind. I have a patch, but it hacks the autotools configure.ac pretty heavily, and is crude. Need to modify it for more conditional support and systemd or elogind. I had to rip out systemd in places. Also modify a file in eina sources that wants to use journald, which is not part of elogind. I got it building, but it does not run. I have to look into the code to see what is not working under elogind. It builds so all it needs should be there. Not sure if code needs to be modified or something missing in the env when elogind is running.

There is no interest upstream to run without Systemd. It is used on Tizen, and all devs are focused on Wayland and running systemd. X gets little to no love, and they want to get rid of it ASAP. Despite Wayland lacking many things. Yet make no effort to help those not running under systemd to get Wayland going. Just want to continue to force people to use systemd for Wayland.

Far as I know no Wayland implementation has good support for multiple monitors if any. Much less hot plugging, difference sizes etc. I need that for dual display desktops and laptops where I use external monitors at times. Wayland is lacking so much no clue when I can run it for experimentation/development. Much less a daily driver. I kept asking about E dual monitor support under Wayland. No clue where that is at, but last I checked it still lacked that. I think some past version had it, but they pulled it and its not been available since.

I will look into the code aspect of the patches I made to see about Wayland running under elogind. But I have little motivation as I am pretty sure I cannot really do much with Wayland after. I have no clue about the other stuff, Weston, Sway etc. I do not really understand all that, its confusing. Seems odd to run E on that stuff. I fail to see how any of this is better than X. Seems like re-inventing the wheel, and took a very long time for X to mature, etc. I have made such statements about Wayland being a ways off and seems to still be the case. It seems its mostly around mobile and embedded driving the Wayland band wagon. At the expense of desktop and real usage.

A world without X I think is likely a decade off. In all the focus to Wayland, communities split. All the Bohdi and Elivecd stuff is based on older E that uses compiz, and has NO support for Wayland. Its all X, and has lots of features that will be years off being in Wayland. That stuff under X is also likely more reliable than under Wayland...

kanyck commented 6 years ago

Oh! Thanks for such detailed reply! I may be wrong but I think it may be easier with systemd. Yes they push it in the hard way, but few disros (Gento and derivatives to name some) are still off, and probably will be. So GTK, Qt etc work just fine without systemd. (Sorry you're banned)

its confusing.

Sure it is. Total mess, no docs, no howtos, nothing. Env vars that are undocumented but need to be set the right way go get stuff up and running, and so on... You don't need to run E on sway|weston|etc. for they do basically the same thing as E does but with different level of success. So you use weston OR sway OR E. I've mentioned them because systemd requirement may be a showstopper to me in using E at all so I'm looking at the alternatives. I actually tried E few times some years ago but wasn't satisfied and went back to Compiz standalone for my installations.

As for X, I feel it's a little bit overmatured, so to say. X was developed four decades ago for completely different tasks in completely different environments (thin clients, slow networks, small HDDs...). Now nobody uses the majoriry of its functionality (centralized font servers, drawing primitives, etc. etc.) It's native rendering looks awful today, so everybody uses X only for outputting bitmaps the app rendered by itself via libs like gtk/qt/tk. However it fits very badly into most modern use cases by design (made for different tasks), direct rendering is a problem due to client-server architecture, thus we have inevitable tearing, issues with input devices, double buffer sending and so on. And a lot of extra code running. For notebooks it means not only slow teared rendening but also unnecessary sucking the battery out. Therefore for local use on desktops and notebooks where remote access is not needed, wayland fits way better, because it's designed to. Yeah, today it lacks a lot but I think it already worth a shot. And I realise that at the point there may be showstoppers for many people, like lacking multiscreen. I'd put it this way: we have to use X until a reasonable alternative arrives. Meanwhile some people are using wayland already for months https://www.reddit.com/r/unixporn/comments/7fe9xt/sway_once_you_go_wayland_you_never_go_back/ and I believe it may be the future as soon as the X inertion is overcome. And if nobody uses it it'll die.

Thanks for your time! And if it appears difficult to implement, don't worry. If I won't be able to go with E this time again, I'll go with sway or something. I'll try sway anyway, just to evaluate the possibilities and obtain new experience. If everything fails, X is still there)).

kanyck commented 6 years ago

JFYI: https://github.com/dantrell/gentoo-project-gnome-without-systemd

wltjr commented 6 years ago

It is easier for developers I think with Systemd not sure. I am aware of Gnome and KDE running on Wayland without systemd on Gentoo. I never had any luck with Wayland on KDE/Plasma. Gnome required an overlay I never tried. I think Funtoo had some of that worked out with Gnome, or at least no systemd.

I just do not see things getting better with Wayland. Seeing the performance comparisons at Phoronix between Wayland and Xorg I haven't seen anything impressive thus far. I have not seen any showing power consumption differences between X and Wayland.

I am aware of the back story with X, all its legacy cruft, etc. Though I feel we are reinventing the wheel. Where before all used X, now each are implementing their own implementation of the Wayland protocol. You can have other differences and issues as a result that would be commonly fixed in X. Your tossing several decades of development, starting that process all over again entirely. Wayland has been around for almost a decade now. It hasn't the corporate backing that X had back in the day. Not to mention most all Unix's have X, and Wayland is fracturing the Unix world worse than the Unix Wars...

I think we should be putting all this time into making X better vs replacing it. A decade later X would probably be further along than both X and Wayland are at this time. One of the biggest gripes about X is lack of developers familiar with the code, being old etc. However with Wayland being new and the documentation and confusion situation. I do not see that being any better. If anything may make that worse. Someone familiar with EFL, GTK, or KDE wayland implementation will not carry over to the others. They should be documenting all that very well for future generations so the X situation does not happen again.

Then on top of all that, you have sway, weston other stuff. That if Wayland was so great, why does that stuff need exist in addition to the normal window mangers/compositors. Not to mention tossing compiz out the window and all those effects have to be brought back to Wayland under the various toolkits etc.

I really feel to many are mislead with Wayland being the future, and that whole thing is sold wrong. Its like a few people can really lead the entire world. One guy beyond systemd Lennart Poettering ( well two including Kay Sievers) both RedHat, one guy behind Wayland Kristian Høgsberg also at RedHat.

I guess RedHat is leading the entire Linux and Unix world these days... I would think FOSS and Linux to bring about more choices not less. I also think those sticking with X are getting stuff done and being productive vs all the time wasted with Wayland. Like with E, the Bohdi and Elive communities seem better than E. Those are X, and E is now focused on Wayland, and discarding anyone who cannot run Wayland or Systemd, etc. I think those running Bohdi and Elive are just using their systems vs messing with them.... I bet most running Wayland are still messing with issues, some issues X also had but was fixed long ago...

I have been around X a long time and I recall when it had a lot of issues. Its frustrating to see it come so far, be tossed aside and relive all those same issues again, time loss, etc. For what? Theoretical better performance and battery life? Maybe in another 10 or so years of Wayland development... While Windows and Apple blow way past Linux... I think Wayland is a mistake, but so many are going down that path no turning back now... But we are very far from Wayland being what X is today, much less Wayland exceeding X. When ever it does, still have to bring back effects. I think only Kwin is set there as its effects are native. Anything using Compiz like say E in the past. Now that E is a compositor, all those effects have to be recoded for E... Also for GTK, etc...

Its a huge mess, and this is the future? This is better than what we have now? I think not. I think the documentation should be much better and clear paths for users. There is to much that needs improvement still on Wayland...

kanyck commented 6 years ago

Oh! What you've written is hard to argue against... I can only agree... almost. As usual, there are some important nuances. JFYI, KDE is proven to run on Wayland under Gentoo (not sure about systemd though), however I couldn't run qtwebengine under Wayland so far, so I've to fiddle with it some more to find out if it's usable at all.

I saw this Phoronix article but thid sentence

Plasma on Wayland led to some improvements with GpuTest, which is also routed through XWayland.

(emphasise is mine) made me think that it's not X vs. Wayland but rather X vs. Xwayland test. And even if I succeed with building something usable on Wl I still have no idea how to measure the performance. gtkperf, for instance, needs X to run, and so on....

Also, I totally agree than Linux world is being torn apart, and that it's done on purpose, and the RH's key role in the process. But if they succeed, we'll still have few nice BSD distros to move to. As soon as money is involved, it inevitably start to rule. And RH's main customer is DoD, eventually that's who have been trying to rule the Linux world.

I got a reply on phab today, though, that making elogind an option for E is on the list. I thing the biggest E devs' mistake is that they trying to sit on two chairs at once -- aiming at both desktop and mobile market. Probably they weren't sure which one plays and thus were attempting to secure themselves.

As for X, there were attempts to make something with X to better fit into dri|dri2 infrastructure (tiny X, some others), but because the reason you gave they all were abandoned.... And today we don't really use 2/3 of X when running it on dri* and if we need network transparency we've to go back to native X proto.

I also understand your concerns about making a huge mess when everybody adds their own (undocumented!) extensions to the proto. We may eventually get the situation even worse than we've with 802.11... unless somebody sits down and writes standard/RFC that would sort things out. But some time ought to pass for the ecosystem to organize itself... or to die... however projects like Tizen may lead the mass into the future))) Hopefully....

And finally, we've been comparing Xorg against Wayland which is actually incorrect. Wayland is only a protocol (and a lib to work with it). So we ought to probably compare packages like wlroot against X. That's probably the right place to put stuff to so it's not rewritten over and over again.

Anyways, I'd like to play with it and compose my own opinion.

Thanks for the discussion!

wltjr commented 6 years ago

Yeah sure I am not anti Wayland. Just weigh the pros and cons. It being a protocol I think is part of the problem. Your replacing a common piece of software, with a spec that all others have to implement in their own way. I do not think that is good. Its good for doing things different, but bad for all having to address the same issues, code duplication, duplicating development, etc. Though does allow each to do things their own way. Not sure if that is a good or bad thing yet.

KDE is the only one of interest to most Gentoo devs, being in Europe etc. Gnome is 2nd class, and all others are even worse. Maybe XFCE, but not sure about others. Some PRs for E, but without willing devs, those actually running it, Hard to move that forward. But KDE running without Systemd, may have to come from upstream more than Gentoo. Though some Gentoo devs are KDE devs, at least 1 or two, like working on Trojita, email alternative to Kmail2.

Its hard to say on the performance stuff, just saying that Wayland should be blowing X away from the start. If all the cruft and stuff in X is really sluggish and a problem. Not to mention the development time. If that same effort going into Wayland went into improving X. Maybe further along now.

E/EFL problem is not just mobile vs desktop, its also X vs Wayland. They want to do more for Wayland, but as its coming along X suffers. Also Samsung is funding mobile development, and many EFL/E devs have some affiliation with Samsung. Which Tizen seems to have its own interest and path. I hoped like my work on Ecrire could carry over to mobile and desktop, like Tizen, but seems Tizen is so different. Still I see mobile and desktop works combining, so that I do not see as much of an issue as the split between Wayland and X. Even once Wayland is 100%, not sure how soon they can get rid of all X code.

The elogind interest maybe due to my post on the dev list regarding such. They likely are moving to meson. In that process hopefully they will made optional support for elogind vs systemd. I will see if I can get them more interested in such. Other than build system modifications, not sure if the code needs modification or the env. Like some setup with elogind, dbus, etc.

I do hope to be able to play with Wayland someday.... When that day will come I have no clue. That its been around for years and I still cannot easily run it, if at all. Does not give me to much hope and makes me question what all this is for and about. Even then, not sure where say EFL is at with dual display, copy/paste, etc under Wayland. Once I can run it, there maybe still much left to be desired... I will keep my fingers crossed, do a Wayland dance/chant, etc...

wltjr commented 6 years ago

P.S. RedHat has interests beyond DoD. I would say Microsoft does more with DoD than RedHat, though RedHat is in that government area. Many deal with RedHat, like say Lowes. I am not sure if Lowes is running Wayland or X on their desktops that I can clearly tell are for sure running Gnome. Could be Suse, but more than likely RedHat. There are lots of commercial uses of graphical Linux, and Unix. I wonder the impact of Wayland there. I do not think Unix's beyond say FreeBSD or the BSDs are doing anything with Wayland, Solaris, AIX, HP-UX, etc. X came from many of them, and they still run it. Maybe even still thin clients, etc. Linux is not the only Unix. That is one of the gripes with Systemd and Wayland. It is Linux specific vs Unix. Like running Unix apps on Apple... That is X dependent and requires XQuart, now EOL, but not sure about Wayland on Apple, So will GTK, QT, etc run on Apple going forward?

wltjr commented 6 years ago

Here is a copy of the output when I attempted to run Wayland under elogind.wayland.log

kanyck commented 6 years ago

Yeah, I got the same. I think it's because they don't still have proper elogind integration. No wayland display set... Meanwhile I spent some time fiddling with sway on wayland. It starts significantly faster than Compiz/X. Some EFL apps work fine without E. (Terminology, maybe Ephoto). Rage starts but can't play anything. Balsa (Gtk3 email agent) isn't quite usable (can't write stuff in gconf database without X. How X is related with gconf -- no idea). Trojita seem to work, more or less. Qupzilla cannot start. Looks like qtwebengine is mixing up backends and trying to use Xwayland instead of pure wayland. No USE flag to disable X. Maybe qt 5.10 fixes this, no idea so far. Will try epiphany out -- now I'm curious if there are apps that just work as expected without much fiddling. Meanwhile some features aren't implemented, like popups don't get mouse focus and are keyboard-driven only. Looks like that sway will be easily usable when wlroots is out. There's hackatlon underway with 37 devs actively participating, so hopefully I can expect some progress in the nearest future.

wltjr commented 6 years ago

I am not sure, my gut says maybe something with elogind env is not setup. Since it builds against elogind, it should be correct code wise. elogind API to my knowledge does not deviate from systemd's logind. Which is why it builds fine. I do not think there are any runtime differences. I assume something with elogind is not initialized or setup for Wayland. Like on my system nothing uses elogind, so it being there or not is moot. I bet you could stop elogind, and see the same log output. Which would mean its not connecting to the elogind service/daemon.

I think ecrire works on Wayland. That is interesting about what apps work and do not. I think that is another aspect. Under X you pretty much know a GTK or QT app will run fine under EFL, or any combo there of. Give or take looks/theme differences, and other. That does not seem to be the case with Wayland. I wonder if that will make it such that some apps do not work under the various toolkits under wayland due to their own differences in implementing the protocol. That will be interesting to see how all that pans out.

The popups, mouse, keyboard, focus thing is moving into window managers. They will have to make their own grab mouse/keyboard/focus. Like when coding, you chose the type of pop-up dialog etc. It will not be something you can enable within an application directly. I brought up the grab differences in Wayland a couple times for pinentry. I left out X specific grab support of a pinentry EFL interface I coded. That is more a change in applications, and some what good. If you look at the grab code in pinentry, its not really ideal. Rather than have to code such, you just use a dialog that is designed by the WM to grab mouse/keyboard. I think users can enable/disable that globally or otherwise, vs application specific.

Did you test out any copy and paste under Wayland? That is one of my big question marks. Copy and paste is very important to me. Even E is not ideal there as the clipboard module is third party. Which I some what took over and need to update for the bryce/gadget api from gadgecon or vice verse.

Either way still seems like a very long way to go for Wayland to be equal to what all X is today. I hope that effort is worth while....

kanyck commented 6 years ago

I think your guts are right. WAYLAND_DISPLAY env var is not set, the big question is where it should be set (by whom, actulally). And I'm afraid that it's not about a var, the display was not created. Both weston and sway sessions do set it somewhere while E does not. Again, wayland is just a library, some program ought to call it. We've all erroneously been comparing X vs Wayland while X vs something like wlroots is probably more correct. Have a look , maybe you'll be able to use it, too.

Ecrire seem to work fine. Just tried it out briefly.

Copy/past works, however I ran onto some mouse focus issues. Sometimes extra click onto empty space is needed to make it work. It's more common issue, not only with copy/paste. For instance, browser's Back button is not always responsive without this extra click. Maybe I did something wrong with setup, though. (Now I have a clue why most of compositors available for wayland are tiled ones). AFAIK the problem was between wayland and xwayland copy/paste because wayland and X have their own implementation of clipboards and aren't aware of each other's ones. But it seems to be fixed lately.

wltjr commented 6 years ago

Thanks for mentioning that env var. I may have needed to set that for my experiments, and maybe something I have to code into setting in entrance. I think it needs that var for seat information. If you look at the API, and some Fedora docs. The wayland-0 sure looks like seat-0 though normally its just seat0. If we really do need to create the display. I think that is something another service provides beyond elogind. I maybe able to replicate such in entrance not sure.

I know the comparisons with X and Wayland are not really comparing apples to apples. In one sense kind of good as Wayland has components along the Unix philosophy. At the same time, replacing a central X with a chain of stuff that you must get right. Also not clear what does what, like creating the display. Just seems like replacing central function with all sorts of implementations. Which is good for variance, but not sure about progress. Look how few know X, and have difficult furthering that is, and there is just the one.

I have heard reports of ecrire working on Wayland, and it has no X specific code really. So should work as well as most E stuff. Thanks for checking that out!

I keep hearing about general focus issues in E/EFL. Not sure if that is in general, for both Wayland and X, or specific to one etc. The issues you describe sounds like there are more focus related issues under Wayland. That is funny most Wayland compositors are tiling. I need to play with tiling, not sure if I would like that or not. I suspect its because on mobile, you have more need for tiling than moving windows around.

The other aspect of copy paste is also like synergy. Which I can copy and paste between systems. For the paid versions can do even more. Not sure how all that will work under Wayland or when they will have support for such.

Seems Wayland under E just got multiple display support. Which is another thing I have been waiting on as I use dual displays with my desktop, and I hot plug external monitor with laptop. Multiple displays is very core for me, so that is good news. Now just need to figure out how to start when not under Systemd....

kanyck commented 6 years ago

I think you may just look into weston code -- it's quite small -- and see how the startup is made there. Provided it's kinda reference design it probably should be made the right way there... if no docs is available...

wltjr commented 6 years ago

I will take a look, but it maybe something in systemd that is creating the display device. Assuming Weston also relies on Systemd. It seems to be doing something with systemd per this code They maybe pushing the display device to systemd and be outside of Weston. There is also spawny, but I was not able to see how its creating Wayland sessions.

kanyck commented 6 years ago

I don't have systemd on my system (yet elogind installed) and both weston and sway run wayland just fine with all the env set up.

wltjr commented 6 years ago

Just to be clear, your running Weston and Sway under elogind, WITHOUT systemd?

If that is the case, then that is good news. Maybe there is something off in EFL if its not working with elogind. Thanks for providing the information, greatly appreciated!

kanyck commented 6 years ago

Sure. elogind is actually a part of systemd that was pulled out, like eudev. So it's poinless to run systemd and elogind on the same system, for it'll be just a duplicate. Look into the ebuild, they're mutually exclusive.

wltjr commented 6 years ago

I am aware elogind is a drop in replacement and ebuild blocker of each other. I was asking more for the sake of feedback to EFL community/developers. Since in my case with elogind running and EFL built against elogind. Then it seems either I started enlightenment incorrectly via enlightenment_start, maybe as root vs user. Otherwise it seems like maybe code issues in EFL or something, causing it to not start under elogind. Though that it works for others with logind/systemd. Not sure if I will get much help debugging EFL issues under elogind.

Unless I am missing something else, that the DM is supposed to do. I thought you were supposed to just be able to type enlightenment_start in a terminal and it would start a Wayland session.

wltjr commented 6 years ago

How are you starting Weston? Are you using a DM or via commands?

kanyck commented 6 years ago

No DM installed yet. (Actually, I haven't even chosen one yet). I log in from the tty and start all three with commands. Weston and sway do start, E does not. Obviously enlightenment_start misses something vital (display creation?).

wltjr commented 6 years ago

Sure, because we both know the DM you will use is Entrance.... shameless plug plug.... self promotion...

I think most in E are starting it under Wayland as you describe. There is little to no upstream interest in a DM. Plus all have their own ideas there. Like making E a DM, and having it start the desktop right away for widgets like battery, backlight, etc. Rather than re-code in DM. But then not sure how you log into other desktops, etc.

There is also Spawny with its UI Anna, but upstream has no interest despite coming from an E dev. It uses some odd ini library that gets included in the project. Not clear how to package it all yet.

Also Enter a python EFL UI for lightdm. I never got that working but seems it may for others. I did package it in my overlay. But pretty sure that package needs modification to work properly. That I assume would let someone start X or Wayland as it uses lightdm core. Someday that will support both X and Wayland if not today, I would assume.

I noticed that sway readme says without logind requires SUID. I did some more experimentation, and got the following log outputs. I believe this one as userwayland.1.log, and this one as rootwayland.2.log. Or vice versa, I did not do a good job track which was which.

I may need to try the setcaps route of sway, given I am running elogind, a logind replacement. The other way is likely not supported with EFL, no logind. Thus those attempts in those logs failed. But it is different output, which is interesting.

Maybe some dbus issue or something not EFL or elogind related. I can provide an ebuild in my overlay with my hack patch for experimentation if you want to play around with starting E under elogind.

wltjr commented 6 years ago

I got E started under Wayland via elogind. Seems it is not setup properly on Gentoo. They install a /etc/pam.d/elogind-user but not file references that. I added bits of that to /etc/pam.d/system-login and I was able to start E under Wayland. I got session info. At first I tried.

$ /bin/loginctl
   SESSION        UID USER             SEAT             TTY

0 sessions listed.

Which made me think that elogind was not being started via pam. I took a look a the files, and per this modification I was able to start E under Wayland. But it does cause some issue as in terminals under X session, I have to hit enter to get a prompt. This may not be correct, or something else is off. Either way this will allow you to start E under wayland via enlightenment_start after you log in as a user. Like startx, just invoke that binary directly.

--- a/etc/pam.d/system-login
+++ b/etc/pam.d/system-login
@@ -12,5 +12,7 @@
 session                optional        pam_lastlog.so silent
 session                include         system-auth
 session                optional        pam_ck_connector.so nox11
+session                optional        pam_keyinit.so force revoke
+session                optional        pam_elogind.so
 session                optional        pam_motd.so motd=/etc/motd
 session                optional        pam_mail.so

After that, now

$ loginctl
   SESSION        UID USER             SEAT             TTY
        c2          0 root             seat0            tty1
        c3      10001 wlt              seat0            tty2
        c4          0 root

3 sessions listed.
kanyck commented 6 years ago

we both know the DM you will use is Entrance....

I hope so. Actually I've tried E few times (e17 and further) but had to back off. Yet still find its look quite artictic and pleasant. Also being a photographer, I'm visually sensitive, and most DEs look ugly to me. Have been sitting at the mac-alike desktop with 3D cairo-dock and feel happy)))

I got E started under Wayland via elogind.

Oh that's cool! Will be able to test (and reply you more thoroughly) later next week. Busy with two small projects now so short of time and thinking the other direction))) Meanwhile you'll hopefully prepare the ebuild. Will keep you posted on the progress. Thanx!

wltjr commented 6 years ago

I will see about cleaning up my patch, and update an ebuild with the patch. I was applying via /etc/portage/patches/ as a temporary test vs adding to ebuild I have to re-digest etc. I also filed a bug upstream with Gentoo about elogind and pam.

They are working on a new theme for E, a flat design that will have a dark and light variation. Some dislike the dark of E, and fee it may hold it back. I also have a modified theme based on anothers work Eminence. Not sure if I will update that for flat or not. It uses part of the default one now, along with anothers work as the base. I have ebuilds for that in my overlay. Need to add gtkrc file as well, goes well with the Adwaita-dark theme, with some tweaks, thus a modified gtkrc for GTK Adwaita-dark.

Being a photographer, have you checked out ephoto, also on github? Just curious, it seems pretty nice. I have used it for minimal stuff. Of course there is an ebuild for it in my overlay.

kanyck commented 6 years ago

Okay, while I don't have enough time to test stuff, I'm still able to reply.

Spawny looks a little bit odd to my taste. I may recall I tried something similar some 6 years ago but couldn't make it running. Neither did I succeed with Enter, BTW. sddm is reported to work, AFAIK.

Using /etc/portage/patches is okay with me, at least for now -- I use it from time to time.

As for themes, being compared with standard Qt themes for example, they all look superb))) Flat is awesome at a first glance. BTW, is it possible now to set different backgrounds on different workplaces in E? Last time I tried E17 that was kind a showstopper for me, that was possible but wallpapers refreshed terribly slow without acceleration when changing the workspace, and I used to distinguish screens by wallpaper set.

Also, I tried ephoto briefly. Didn't like it doesn't allow to get up from the root dir it was initially run for. I keep stuff on a server that is normally accessed by automount, so with ephoto I couldn't reach it at all. And I couldn't even test if RAW files can be opened due to that. I normally use two types of viewers -- one acdsee-like -- simple, fast, quit by ESC hit, just for images from the internet and stuff like that (now it's qiv). And I use geeqie as well -- as a more "photographic" solution, capable e.g. RAW files viewing. Also I need the viewer to support color profiles, for I use AdobeRGB monitor. My main tool is darktable, GIMP's the second, but it's not so important on notebook -- trying to color correct on notebook is weird, but some viewer is definitely needed. I doubt GIMP will even run on pure wayland, but it's not so importand right now for me I think.

wltjr commented 6 years ago

Time to test, is one of the problems with Wayland.

I agree on Spawny being odd. Seems most feel that way even other E devs. The E community has little to no interest in Spawny/Anna. I have no clue what Anna looks like, screenshots would help there. I tried to package in a ebuild, but it uses and odd ini project/library you have to include in sources. I tried to give the author @marcelhollerbach some feedback, but was not receptive sadly. I was using SDDM before Entrance after a short bit with lightdm. I was trying to get rid of QT. I assume you mean SDDM allows you start E under Wayland. Which would make sense as it is new, replacement for KDM.

Not sure about different backgrounds on displays or workspaces. I think it is the same for all. Likely need to file a feature request there. You can surely do that in like Terminology, if you have man tabs/terminals in a single window. I think its part of the video showing off Terminology features.

Funny you mention directory navigation issues with ephoto. I had brought that up several times to @okratitan. It does not surprise me you had similar issues. Though he is receptive to feedback so hearing enough of the same. May be enough to change things. I think you like I were expecting a regular file navigator that allows you to access /, and any other. That was for sure something I brought up to @okratitan. I believe he did make some changes there. It is just not that obvious. Like if you right click on that file navigator area of Ephoto, You can select root or other. It is just a bit different from what most expect. Lots of function in E apps seems hidden via keys, right click various combos. For the most part I like ephoto. If you have any needs or issues there, I would file bugs/feature requests either on phab, or github.

kanyck commented 6 years ago

Hi William, found time to do some tests. First of all, I decided to postpone sway stuff for a month or two, because it's under heavy development now. Alpha2 is about to be out soon for v 1.0 that is fully wlroots-based so it's somewhat a new generation stuff with a lot of early development caveats addressed properly. Meanwhile I may fiddle with E. Gave it a try with enlightenment_start which gave me 5 fatal errors at once. (BTW /etc/pam.d/system-auth on my system already has -session optional pam_elogind.so string, so it's just about removing a minus sign, all sessions/seats are listed correctly). But I still have two "couldn't connect to a wayland display", one "couldn't connect to input manager", one "failed to create device" and one "couldn't request bus name" errors (provided that dbus is running). I belive that some of them are secondary and disappear as soon as main is fixed. Obviously I shall somehow create a wayland display (and probably input device) first. Any progress with Entrance with this?

kanyck commented 6 years ago

... but I could start E from within weston terminal via enlightenment_start. Looks weird for it starts in a separate window with tiny fonts but it starts. So its an initialization/env issue.

wltjr commented 6 years ago

Hi @kanyck,

Your running gentoo right? I wonder if they modified the default system-auth per bug 652340. Which per some comments on other bugs, they extended my ban. So I am also banned from Gentoo's Bugzilla for 1yr... a joke... I cannot comment on that bug anymore, short of creating another account... Same issues with E, banned so cannot report issues... I find them say some on mailing list, they say file an ticket in phab, which I cannot do with a disabled phab account...

Some what discouraging to proceed when others do nothing helpful and just create barriers for what ever reasons. Disliking someone personally, disliking their style, conduct, etc. US politics are a great example, world seems split and no middle ground. None of that helps advance things...

I do no think you can proceed far unless you have EFL built against systemd. Which needs modification to build against elogind. I still need to add my crude patch to the ebuild so you and others can play. Those "could not connect" issues are more than likely due to EFL being built without systemd support. You are correct that they are mostly related, dominos falling. Once the first can connect the rest changes. I could not get hardware wayland going but I had Xwayland running.

I also saw the font issue you mention. In fact under Xwayland, it messed up my theme, and the whole desktop was pretty funky. Seems it has its own settings for Wayland vs X. I did not try to correct any issues as I did not want it to mess up X. Though I reveille I had some issues when first switching back to X. The default E fonts are pretty tiny. You can see that in Entrance, the font size in buttons and avatar. Also when you type. No easy means to increase that short of scaling up everything. E's font handling is a bit funky IMHO. Most do not use Scaling like available in Enlightement. Changing the font size in the font settings does not seem to effect all things.

EFL stuff is EXTREMELY fragile when it comes to config type stuff. I have see it crash other apps like Ecrire, not so much Entrance. Because Entrance generates it on the fly vs relying on existing binary config. Very likely need to copy like your ~/.ecore, ~/.elementary, and if present ~/.e, to a subdir, and then delete those directories. When ever you go between Wayland and X. I do that when I am going back and forth between versions of E, like E21 <-> E22.

I am trying to figure out what sets the seat and session information. I am not sure if that is done by like logind or consolekit2, or if its something the DM handles. I opened ConsoleKit2/ConsoleKit2/issues/109 but that is likely to go no where. Not sure its something that Consolekit2 is responsible for in the first place. It seems that stuff is provided to consolekit2 and maybe logind by something. They both seem to rely on env XDG variables. I am not clear what sets those variables, and where the values come from. If its something i specify from Entrance, or handled else where. I need to revisit the FDO docs on seat, session, and their related XDG variables. Also given EFL dependency on elogind, not sure I can do anything with Consolekit2, unless support for that is added to EFL as an option to systemd/elogind.

I hard coded seat in Entrance, and I assume I could hard code some other paths in Entrance to see if that has any effect. But the seat and session number, plus path variables should be dynamically set. For proper multi-seat, multi-session support. Which even that I am not clear on...

P.S. The minus sign in pam config files just makes it such that if the module is not found, it does not effect startup. Really should make no difference with it there or not if elogind is present.

wltjr commented 6 years ago

@kanyck I just committed the elogind patch for EFL https://github.com/Obsidian-StudiosInc/os-xtoo/commit/5e480c5d2e4339cf2a7bb989f2015129b22567e7

Just emerge with USE="elogind" and you can play with enlightenment_start. Just make sure elogind is setup correctly via the pam stuff. If that is missing it will fail. But otherwise at minimum I believe you should get Xwayland. I did not play that much, so not sure about hardware or regular wayland. I think Xwayland is a backup or something. Not sure, not clear on the Wayland terminology yet.

wltjr commented 6 years ago

Forgot to actually enable systemd via elogind... https://github.com/Obsidian-StudiosInc/os-xtoo/commit/76b6410ed4e0871030cf4e4c3c084b1b1a0e4888 Then on top made a typo in commit... ommission -> omission.

kanyck commented 6 years ago

Uhh, it didn't compile for me complaining about missing include file. I looked into the available files and there's no such file around, indeed. I suspect mistyping, like unneeded .h at the end, but I quit programming some 20 yrs ago, so I can't tell for sure... Probably I ought to file a bug upstream... JFYI: build.log

kanyck commented 6 years ago

Filed a bugreport BTW here's an interesting discussion X vs wayland. Decided you may be curious about this. https://www.reddit.com/r/unixporn/comments/79r850/wayland_and_the_future_for_wms/

wltjr commented 6 years ago

That is an odd failure, I have not run into that. I wonder if its due to the options you have enabled. Like maybe rawphoto since you ran into that and I am not using that option.

I am using

[binary     U  ] dev-libs/efl-1.20.7-r1::os-xtoo [1.20.7::os-xtoo] USE="X bmp drm eet egl elogind fontconfig gif gles2 glib gnutls harfbuzz ico jpeg2k nls pdf physics png postscript ppm psd pulseaudio sound ssl svg tiff v4l2 wayland webp xine -avahi -cxx-bindings -debug -doc -fbcon -fribidi -gstreamer -ibus -libressl (-neon) -oldlua -opengl -pixman -rawphoto -scim -sdl -static-libs (-systemd) {-test} -tga -tslib -vlc -xim -xpm"

Thanks for that link, I may comment on reddit discussion. I think the biggest issue with Wayland is the replacement of the server and all things having to handle input devices, display, etc. They may do that in different ways. Like EFL supports systemd, but not consolekit2. If that was say some wayland server core. That would be the same for all... That aspect of X I think they have completely failed with and caused people to duplicate implementations of the same stuff, devices, etc...

kanyck commented 6 years ago

There are some more earlier discussions on that matter at reddit... I picked this one as quite informative and pretty well balanced. One obvious difference that is probably relevant is -pulseaudio, for I never use this stuff. (Also -glib +gstreamer -jpeg2k (never needed that) -physics -psd -v4l2 -webp -xine). And I see another bug in your ebuild -- if you look at ./configure section you'll see --enable-systemd then --disable-systemd down the line.

kanyck commented 6 years ago

Here's the previous post of the same author. In comments you may find ones from Z7VFYjuq -- a maintainer of sway. I think he is the right guy to ask about sessions and variables stuff. BTW, I looked into $XDG_RUNTIME_DIR when sway is running. display-0 is a socket there, not just a env var or something, so it must be initialized properly ant somebody should listen to it. Who is set it up -- no idea this far.

wltjr commented 6 years ago

@kanyck thanks for catching the duplicate systemd. That maybe left over from some work in progress in my overlay. I had it modifed for elogind, but had to redo that the other day when I pushed out the commits. Not sure if I added the systemd USE flag or it was in package. I will correct that now. Thanks again for catching that!

wltjr commented 6 years ago

@kanyck thanks for mention of sway author. I will likely need to join some FDO and/or Wayland mailing lists and IRC channels. I planned to at some point as a point of contact for Entrance and as part of its role in the FOSS eco system. Usually good to have some relations and interactions with dependent upstreams.

wltjr commented 6 years ago

@kanyck per your comments and given that the missing header is audio related, I think it is related to pulseaudio. I do not have gstreamer enabled. Maybe pulseaudo is needed when gstreamer is enabled. I prefer xine to gstreamer. Monolithic package vs codecs in their own packages. To many things get pulled in for gstreamer. xine takes less time to build. Just have to pass options to stuff like rage. rage -e xine. I think you can use vlc as well, I have never tried that. The default preferred by E developers is gstreamer. Gstreamer is also used in Tizen.

kanyck commented 6 years ago

I think that, too. However it's an obvious bug: the reference in the code to nonexistent file. Of course it may be masked with #ifdefs but it's still a bug. I'll try to bypass it maybe to temporarily disable sound, for example. Provided that the efl devs may not react immediately. Will keep you posted here if you don't mind.

wltjr commented 6 years ago

I posted it to the dev mailing list with my thoughts on the cause. Though I am not liked much, thus I cannot do it on phab via my account. I have seen stuff like that before after a release. I have reported issues like that before. I cannot recall if such is generated or not. I do not think it is, thus its likely some ifdef borkage or something. For sure a bug, just triggered likely using abnormal build options.

Hopefully you can find a work around with USE flag combos. I do not experience such or I would have reported it myself as I have in the past.

kanyck commented 6 years ago

@wltjr Thanks for posting on mailing list. Hopefully this will push things some further... I still wander why you were banned, you aren't seem to be rude or something. Your last hack didn't work out, though. Rejected at the checking phase with "systemd support wanted but systemd was not found". Obviously some fine grained control is needed. https://phab.enlightenment.org/T5417 seems to be exactly about this but with no obvious progress seen insofar.

wltjr commented 6 years ago

@kanyck no problem your welcome. I was banned because I am disliked and my style and conduct others find rude or offensive. Its a culture and society thing. Much like how Trump is disliked for his style and conduct. I think in E they find me offensive, and I have been offended considerably by them. I take it more as cultural differences. But they are not having it. The best example is the other day when French PM said the Australian PM's wife was delicious... Which i am sure he meant like attractive, nice, etc. But at least in US there was wide reaction to delicious. That is pretty offensive and references other things to call someones wife such things. Its just an odd way to express such in other cultures, but maybe not French.

I have frequent clashes with Europeans and others. I have a 1yr ban from lists, bugzilla etc in Gentoo for alleged CoC violations. But that again comes down to I am disliked and my style varies. Just recently circumventing the ban to explain Gentoos history. One mentioned maybe laws should be changed, or foundation moved to a state that allows trespassers to be shot. Given recent shootings in a Florida school, plus the times in general. that was uncalled for. For E it started over use of words, like how English type colour or favourite, while in US its color or favorite. Even the same word can have bit different meaning, the same English word. It started over this, where I typed SOL, but I did not mean, short on luck, what they assumed... One of my final comments on Frenchman may seem rude. But that was less than a month after Florida was hit with our 2nd hurricane in 2 yrs, my area, which is very rare to get impacted at all. Charlie Hebdo had an article suggesting Hurricane Harvey victims are neo-Nazis. While that was not the one that hit my area, another came after. It as not well received. Also in Gentoo one developer who is French constantly bad mouths everything. In my life i have had lots of poor contact with them, culture differ. Lots of French Canadians vacation Florida. I learned French as my first language. I find them pretty offensive most times, even in that E phab task, but its a culture thing not them intended to offend, well maybe sometimes. But that again is in their culture. It is also much of my problem with Gentoo. Europeans find me offensive, and I find them offensive. Liberals in US side with them, and mostly run by Europeans, so I am excluded. Free speed is dead....

We seem to no longer tolerate those who are not like us and who's style and conduct differs. Who say things we may not like, or we may find offensive, but is not really bad or wrong. When others perceive such they take action warranted or not. Its really not a good trend and has a very bad impact on FOSS. If that carries over to the rest of the world, which is seems is has, it will be bad. I have asked on the E dev mailing list for months to please get my phan re-enabled. Never any response... I guess I can create another account. I have provided several bug reports and other things on list, a few that have been fixed. All the bans do is hurt the upstreams, E and Gentoo way more than they hurt me. That also hurts the community and tech as a whole. It makes no sense, but its where things are at globally on many fronts. I am just a victim of our times.

My favorite example of how amazing things happen is Steve Jobbs Polished Rocks. Its likely BS but I consider that what happens in most things. Men/Women, come together conflict, rub against each other, create friction, and produce something great.

Anyway that all aside, back to Wayland! I must have rushed out something with the ebuild. I was mostly applying the patch via /etc/portage/patches/deb-libs/efl/efl.patch rather than have it part of the ebuild. I just did that so you could test it out. Like the duplicate --enable-systemd and --disable-systemd you noticed. Likely just a rush job and I failed. Let me see whats going wrong so the patch will work for you so you can play somewhat with Wayland.

I definitely was able to build EFL using that patch and started something Wayland'ish. Not sure what it was, but it was under Xwayland, it was not X, and I had the UI funkiness you saw. It reverted from my theme to default theme, tiny fonts, other settings were lost. Seemed to have a different configuration for Wayland than X. May also need to mention that upstream. I am not sure if they are aware, as most I think run Wayland. Samsung is only interested in Wayland for Tizen. Plus the whole lets toss X movement... I do not think many E devs flip flop between X and Wayland, if they run Wayland at all. Which most must be on single displays, as EFL Wayland is just now getting some basic multi display support in git. I have yet to be able to test out, But that is another major need I have, dual displays, hot plug, different resolutions, etc.

Kind like tearing down statues etc. Not sure whats going on, but seems its more a society thing, that maybe came from tech, to the rest of the world but is destroying tech. I get X is old this and that, But I feel like all the effort going into Wayland. If that went into X we would be further along. Rather than starting over and reliving a bunch of issues already fixed. Then there is the whole application thing. Even when I can run X, I need other stuff. One of the biggest I depend on daily now is Synergy. Thankfully looks like Synergy is looking to support Wayland and X, but who knows how long it will be till that happens. I have been trying to get synergy to move in IPv6 support for years. Someone else made a patch, I have updated several times. Though that is a bit, regarding IPv6 handling, due to their architecture and having a paid version of synergy with advanced features. But those features I think are bound to X.... Its crazy stufff. I suspect will be many years till Wayland is 100% equal to X. Much less moving forward. I hope it is all worth while. Still seems like a ton of effort that if put into X... Well we know that won't happen so Wayland here we come... somehow someway someday :)

wltjr commented 6 years ago

@kanyck I just added a commit that fixes the build issue. I forgot after the patch to regenerate configure, as the patch updates configure.ac. Thus the old message rather than one saying systemd/elogind was not found. Sorry about that! I just slapped that together. I had nuked the previous ebuild I had locally as i did not commit it, and lost it in some stash pop, or other operation. When remaking I forgot about that regeneration bit... oops. :face_with_head_bandage:

kanyck commented 6 years ago

@wltjr Found time to test it out (sorry for the delay, it's a background project for me). Your fix seems to work fine, but I still have the missing file issue, so I cannot build the efl, even with USE=-sound. Meanwhile still no reply upon my bug report on phab... and I don't feel like enabling pulseaudio just for efl... so I'm stuck again...

wltjr commented 6 years ago

@kanyck they are busy with prep for a release. Not sure if I can poke them to fix the audio issue. I am not sure they are big on supporting non-standard or common stuff, like elogind vs systemd. May take a bit to get that fixed or something. I believe they are switching to Meson, so if its build system related, it may get fixed then. Otherwise I will see if I can figure out a solution time permitting.