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