[07:45] it apears that rather than asking for a target with dbus... we ask to start a service... will have to try this tomorrow. So there is a dbus message/method to start a target... will try start exit.service with the isolate mode. [07:48] hmm actually a target is a unit, so I should also try startunit exit target as well. [07:51] thing is xfce4-session should be sending this for logout with the same timing as shutdown or reboot. That is do whatever cleanup first. However that is the one thing missing amongst the dbus calls to systemd by the logout part of things. [07:59] hmm yeah seems only targets are: AllowIsolate=yes [08:00] so, it seems everything is documented.... but the documentation is both convoluted... and contains no reminders [08:06] So the docummentation that tells you the command line call to get to a target in no way reminds one that a target is a unit. [15:43] Eickmeyer[m]: I think I will have to install xubuntu to see if it has the same systemd mess that we have. [15:44] It seems that the systemd unit: xfce4-session.service is never started... and therefore is not being used. [15:45] so does xubuntu use it? have they worked around it? 9and therefore Studio's is also a workaround) [15:47] There is a systemd --user default.target which is where systemd stops. [15:49] on the systemd --system side default.target is a simlink to the system runlevel (2 or 5.... aka mutli-user or graphical-session. but on the user side default if an actual file because there is only one option... I think. [15:52] Hmmm, maybe not. If default was a simlink to graphical-session.target, a terminal login from a vt (c-a-F1) or ssh would also try to start xorg? [15:53] except those logins don't even show getting to default. [15:56] OvenWerks: Of course they're using the same systemd. They get their packages from the exact same location. [15:56] Oh, you mean the mess. my bad. [15:57] * Eickmeyer[m] 's reading comprehension sucks in the morning [15:57] bluesabre could answer those questions. [16:22] Eickmeyer[m]: the files being in the same place doesn't mean that much, the install of a default settings package could run a systemctl set default. [16:23] Though the fact that everything seems to work would indicate to me they don't. [16:23] OvenWerks: I didn't mean configuration in my first line there. I was talking about the systemd packages specifically. [16:24] So, I take it we need to shuffle some stuff around. [16:24] Eickmeyer[m]: I am guessing that systemd is not well understood outside of the RH community... [16:25] Or the gnome community. [16:25] That is it may be that none of the debian/buntu flavours have it really right. [16:26] From Lanny's comments yesterday, I don't think gnome has it exactly right either [16:28] Eickmeyer[m]: one of the things we do need to do is make sure to remove autojack.desktop from the /etc/xdg/autostart directory. [16:28] when we install the new systemd based -controls. [16:29] Is that a postinstall thing? [16:30] Yesterday that was messing me up that when I installed the autobuild version, it did not remove that file. Now I did modify it, so that may be why... [16:30] I guess I need to reinstall and test. [17:03] Eickmeyer[m]: i'm late to the discussion [17:04] but SystemD can be pain [17:04] teward: :) [17:04] That can be a postinstall or preinstall thing. Not hard. if (exists) rm /etc/xdg/autostart/autojack.desktop [17:05] teward: What we're noticing is that xdg is doing away with autostart in /etc/xdg/autostart as well as in ~/.config/autostart, which is the rationalle for needing a user-started systemd service. [17:05] teward: I was working from the presumtion that the DE and session setup was sane [17:07] or at least working the way it looked it should, but it does not. [17:14] teward: Basically what we're finding is that autojack isn't being stopped when the user logs out, so if a second account or the same user logs back in, it spawns a second autojack, locking out the second login or account from using audio. [17:16] The session doesn't shutdown correctly. The session should set the systemd --user target to exit, but it just quits [17:17] This is because, even though there is a systemd service to start xfce... it is never run and when it stops systemd does not know. [17:18] OvenWerks: Xubuntu uses a xubuntu-session.target [17:18] Eickmeyer[m]: ok [17:18] That means we have no target [17:19] Yep. [17:19] OvenWerks: https://paste.ubuntu.com/p/vXZBrRPWy5/ [17:19] Eickmeyer[m]: I think then that I need to install xubuntu to see what the differences are. We may need to reimport the xubuntu session stuff. [17:19] That's /usr/lib/systemd/user/xubuntu-session.target [17:20] I've cloned their xubuntu-default-settings, so it shouldn't be that hard. [17:20] Ok, are you sure it actually runs that though [17:21] graphical-session.target in Studio is not being run. [17:21] That I don't know. [17:21] bluesabre: ^ [17:21] if it was then everything would work. [17:22] instead of xubuntu-session.target it would run xfce4-session.service [17:22] Well, I suppose I could copy that into ubuntustudio-session.target and yeet it into focal. [17:23] let me try a xubuntu install first... to make sure it does what it should :) [17:23] OK [17:26] I will also need to install kubutu and lubuntu (or whatever it is these days) and check them. I suspect kubuntu works but we need to know. [17:26] As you have a vanilla install somewhere you can test it already :) [17:27] It's lubuntu, LXQt still starts with L. [17:27] Yes, but I've used ubuntustudio-installer on my vanilla. [17:27] that should not make any difference. [17:27] Ok. [17:28] the studio metas should not change the session setup. [17:28] They don't. [17:28] Well, anyhow, I made ubuntustudio-session.target and I'm ready to commit the change, if necessary. [17:29] (it's likely necessary) [17:31] test is simple: boot->login->logout->login run journalctl --user -b and look for default target started or reached and stopping. I think it should start the exit.target too. You can just paste the output if you like. [17:31] I have been staring at enough of them to know what I am looking for :) [17:32] Ok, in that case, brb [17:40] OvenWerks: https://paste.ubuntu.com/p/qF2wmRrGwW/ [17:40] That's the results. [17:41] Rather, complete login/logout/login cycle. [17:42] Reached target Current graphical user session [17:43] we never get there. [17:43] Probably due to the lack of ubuntustudio-session.target [17:44] Try Xubuntu and see what happens. [17:44] There is more to it than that [17:45] Are you still on vanilla? [17:46] anyway, that works right it looks like [17:48] Yes, that's vanilla. [17:48] I'm still on it. [17:48] can you paste ls -l /usr/lib/systemd/usr/ [17:49] and ls -l /etc/systemd/user/ [17:49] https://paste.ubuntu.com/p/ypCpqyF6bD/ [17:50] BTW, Xubuntu does not install that. [17:50] which one is that? [17:51] the first one should be: ls -l /usr/lib/systemd/user/ [17:51] Oh, that was the bottom one. [17:51] ok [17:52] https://paste.ubuntu.com/p/wzrNDd8THX/ [17:52] That's the top one. [17:56] So their session is requesting a higher target than default. [17:56] ls -l /etc/systemd/user/default.target.wants/ [17:57] * OvenWerks actually doesn't like vanilla's systemd setup either [17:58] default.target never gets stopped on a logout [17:59] https://paste.ubuntu.com/p/KmZp2XFkNV/ [18:00] The ubuntu-report.path gets installed by ubuntu-report. [18:01] Ya, those are not what I wanted [18:02] The idea of a lot of those targets is they should be staandard. [18:02] gnome replaces them with a whole pile of their own [18:04] The idea behind the default.target is that any program that uses systemd can bind to that and expect there service to be started and _stopped_ with the session. [18:05] At least they use the graphical-session.target though [18:06] So if everyone uses that, we are ok [18:06] (we don't but should) [18:06] it looks like xubuntu at least intends to. [18:11] Well, anything in /usr/lib/systemd/user should be automatically picked-up. [18:11] * OvenWerks opinion is that a session _should_ hit exit.target on a logout [18:11] no that is not true [18:12] It's not like sysvinit or upstart where everything is scripted. Systemd loads everything in there simultaneously and prioritizes them in order of what needs what. [18:12] yes, but they do need to be enabled [18:12] generally with symlinks [18:13] systemctl --user enable [18:13] creates those symlinks [18:15] Yes, by symlinking what's in /etc/systemd/user to /usr/lib/systemd/user/*. [18:15] yes [18:15] That is how I got studio.service working [18:15] So, if it is in /etc/systemd/user it can be disabled/enabled, but if it's in /usr/lib/systemd/user it is always enabled. [18:15] no [18:16] Do I have that backwards? [18:16] if its in a *.target.wants it is enabled [18:16] the etc directory over rides the usr directory [18:17] It is made for local changes [18:17] ok [18:17] so a package should not put stuff in there. I need see if we can get studio.service to run without puting the symlink in etc [18:18] but it seems we need to fix our startup shutdown first [18:18] I am wandering upstairs to install xubuntu (my wifes ssd is a lot faster) [18:20] ok [18:46] In xubuntu.... it seems broken [18:47] It reaches default.target but nothing beyond that [18:47] it doesnot reach either graphical-session.target or xubuntu-session.target [18:50] Eickmeyer[m]: ^^ [18:50] Yay. /s [18:50] So, it could be that xfce just doesn't utilize systemd properly. I wonder how Fedora's Xfce spin does it. [18:51] So just adding a ubuntustudio.target will not fix things [18:51] I wonder how vanila does it. Certainly not by the systemd docs. [18:52] Might be hardcoded in gnome. [18:52] :( [18:52] bad [18:52] But, honestly, I don't know. [18:53] Laney: You around? [18:54] The proper way according to the docs would be to put a symlink in /etc/systemd/user/default.target from /usr/lib/systemd/user/graphical-session.target [18:55] Well, we might have to do things the old xdg way until it's officially deprecated, which it isn't right now. Every DE still uses it. [18:56] /lib/systemd/system$ ls -l default.target [18:56] lrwxrwxrwx 1 root root 16 Jan 30 10:29 default.target -> graphical.target [18:57] This is the way the system does it [18:57] the user side should be the same [18:58] graphical.target usually only refers to the DM, not the DE. [18:59] Yes, because that is where system gets to [18:59] Then user should be session.target [18:59] in the -user case default should point to grphical-session.target, [19:01] /lib/systemd/user is not a symlink in my case. Appears to be its own file. [19:02] Rather, default.target in /lib/systemd/user [19:02] https://paste.ubuntu.com/p/wnpyyp8BCC/ [19:02] systemd still ends at default target. To get it to end up at graphical-session.target means graphical-session.target needs to be symlinked there. [19:03] yes mine is a file not a synlink too. [19:03] graphical-session.target is also not a symlink there. [19:04] https://paste.ubuntu.com/p/CtxDMPjfVx/ [19:04] graphical-session.target should not be a symlink [19:05] Did StopWhenUnneeded=yes help any? [19:06] I am going to try: sudo ln -s graphical-session.target /etc/systemd/user/default.target [19:07] Well, that file is installed by systemd itself, so be careful. [19:07] no problem... I can always reinstall :) [19:07] reboot [19:08] Well it didn't break anything... [19:11] It didn't do what it is supposed to do though. Reached target Current graphical user followed by Stopped target Current graphical user [19:13] Yeah, didn't think it would. [19:14] Anyway, it proves that xubuntu is not really using systemd for their sessions [19:14] rather logind brings systemd alomng for the ride. [19:16] So, I wonder if there's something we can do with logind. I think that's done via loginctl. [19:18] I have something else to try. [19:19] (link xubuntu-session.target to default [19:21] uh oh, it seems my link was wrong [19:21] try again [19:25] it appears when doing ln -s with sudo, ./ is not translated to PWD [19:25] reboot [19:28] still not right. So now try xubuntu-session target [19:30] reboot again [19:31] session does come up. [19:31] Hmmm... [19:32] interesting. current graphical user stayed around longer and more things did get started. [19:35] Ah, it seems that xfce4-session.service which is started by (or in preparation for) xubuntu-session.target fails with: Only console users are allowed to run the X server [19:36] Someone in #ubuntu-devel mentioned they've been trying to figure out the right way to do this for a year. [19:36] xubuntu-session.target BindsTo=xfce4-session.service [19:37] xfce4-session.service runs: ExecStart=/usr/bin/startxfce4 [19:38] .../usr/bin/startxfce4: says: Only console users are allowed to run the X server [19:38] Might be worth joining #systemd [19:39] Eickmeyer[m]: we have two things to think about... I am not ready to try fixing systemd for all of ubuntu... [19:40] I agree, but we've gotta figure out what we're missing. [19:40] fixing this for Studio means the problem is still there for studio on top of *flavour [19:40] True. [19:41] We just need to figure out a workaround for the exiting xdg/autostart we have. Like, maybe have autojack kill any other instances of itself (like, setting a PID file somewhere) [19:42] OvenWerks: https://salsa.debian.org/debconf-video-team/ansible/blob/master/roles/xorg/tasks/lightdm.yml#L23 [19:43] That's a current solution "that depends on us tweaking lightdm" [19:43] Very hacky. [19:45] In other words, lightdm starts xfce directly and shouldnt [19:45] Yes. It should be making a systemd call, but it doesn't. [19:46] sdm ? [19:46] I don't know about sddm. I'd try it on Kubuntu. [19:46] Or Lubuntu, since they both use sddm. [19:46] Ok, I will try installing kde [19:46] I expect kde is more likely to get it right as they have a bigger team. [19:47] Also they are the only flavour besides Studio who have a correct menu config. [19:47] Possibly. But, there's no reason why one can't have sddm and run any other desktop session. sddm didn't start life as a KDE project. [19:47] back downstairs to DL [19:48] no but if anyone uses it right, I would expect kde [19:48] LXQt honors the correct menu config. [19:48] not unless they have changed it [19:49] LXDE doesn't honor it, LXQt does. [19:49] Ah. [19:49] Lubuntu moved to LXQt starting in 18.10. [19:49] good [19:49] Have you tried it? [19:49] Yes. It's very good. [19:50] I may try that too [19:50] I am thinking of going studio on top of K for 2004, but I don't know yet. [20:19] OvenWerks: https://superuser.com/questions/759759/writing-a-service-that-depends-on-xorg [20:19] (Writing a service that depends on Xorg) [20:39] ya Im all over [20:42] 👍️ Yeah, it's not just us having the problem. [20:43] The thing is to find someone who has it right and see how that works :) [20:44] I notice that xfce4-session-manager has systemd dbus calls for all logout options (reboot, halt, power off, etc) except for just logout. [20:45] It would be easy to add such a command even if different from the rest because it is on the session bus instead of the system bus. [22:09] OvenWerks: Any luck with either K or L? [22:10] I havent got there yet... just relaxing I have 1/2 hour till I pick up my Yf [22:17] No worries. I was just curious. [22:17] I've got just under an hour until I pick up my son, sooner if a delievery gets dropped-off. [22:18] And it came sooner, so there's that. [23:37] lubuntu is the same as xubuntu/Studio [23:54] Wonderful.