Open probonopd opened 1 year ago
I think XDM can.
I'm a noob, but can I ask why you don't fork and use setuid and setgid ?? You could also find free ttys and run with setsid https://unix.stackexchange.com/questions/170063/start-a-process-on-a-different-tty
Would you know how to do that?
After digging inside XDM's source code I think I finally got it, so long as it's okay to copy the idea and not the code: We call fork(), Setup a cleanup client function on the master, From now on, this is inside the slave: call setgid, setlogin, setuid and pass in environment variables from PAM, chdir() into user's home directory, set /dev/null as stdin, duplicate stderr into stdout (meaning they both output to the same place) execve() the session.
Again, can't promise anything but I'll try to make it happen. Apparently setsid() in FreeBSD refers to process groups rather than what it is on Linux so that won't work.
Thanks @StripedSkies.
Again, can't promise anything but I'll try to make it happen.
That'd be great!
How to test what I've done ? I've implemented a prototype I still need some help, But overall it should work (fingers crossed). I currently need help with setting up environment variables (like HOME, PATH, XDG_RUNTIME_DIR) And where to put desktop session files ?
Cool!
How to test what I've done ?
You need to tell the system not to use slim
anymore, but to use LoginWindow instead.
Probably the easiest way (just for testing) is to make a copy of /usr/local/etc/rc.d/slim
named hello
, make the needed changes there, and then change /etc/rc.conf
to have slim_enable="NO"
and hello_enable="YES"
(if you set rcvar=hello_enable
in /usr/local/etc/rc.d/hello
, among other changes).
And where to put desktop session files ?
/usr/local/share/xsessions/hello.desktop
is the place, and this is the content:
[Desktop Entry]
Encoding=UTF-8
Type=XSession
Name=helloDesktop
Exec=/usr/local/bin/start-hello
TryExec=/usr/local/bin/start-hello
Icon=computer-hello
/usr/local/bin/start-hello
can be seen at https://github.com/helloSystem/ISO/blob/experimental/overlays/uzip/hello/files/usr/local/bin/start-hello.
Maybe you can refer to CDE dtlogin which is also Xwindow.
@probonopd I think if there is no progress, maybe qt-lightdm-greeter can rely on.
It runs in lightdm. lightdm has an interesting liblightdm-qt. Maybe we can use that to run our LoginWindow. The question is whether lightdm has any dependencies that we don't want (e.g., PolKit, etc.)
Unfortunately the x11/lightdm package on FreeBSD doesn't include the Qt part (pkg list lightdm
). So it'd need to be packaged first.
So is PCDM more likely, although it is based on qt, it is just possible that it will need to branch.
Password checking is already implemented using PAM.
Still need to implement functionality to actually start the session.
Possible approaches:
login
andxsession
?)Fallbacks