Closed stevensonmt closed 1 year ago
So I think in info.rs
when getting sessions, X11 desktop entries need to be handled differently from Wayland entries. I think something like
fn load_desktop_file<P>(path: P) -> Result<(String, String), Box<dyn Error>>
where
P: AsRef<Path>,
{
let desktop = Ini::load_from_file(path)?;
let section = desktop.section(Some("Desktop Entry")).ok_or("no Desktop Entry section in desktop file")?;
let name = section.get("Name").ok_or("no Name property in desktop file")?;
let exec =
match (section.get("Exec"), path.parent) {
(Ok(exec), Some(Path::new(X_SESSIONS))) =>
format!("xinit ${exec}")
(Ok(exec), _) => exec.to_string()
_ => format!("no Exec property in desktop file")
};
Ok((name.to_string(), exec))
}
I don't think specifying all those other xinit parameters the way qtgreeter does is necessary in most cases.
This is similar to what was discussed in https://github.com/apognu/tuigreet/issues/15. Basically if my command is
startx
and the last line of my.xinitrc
is the window manager exec (leftwm in my case) then it works, but if my command is directlyleftwm
it fails. What is the expected behavior/command for launching an X11 WM?Looking at qtgreet it seems that this is the bit that creates an X11 session correctly:
and
I will take a look at tuigreet's src to see if this can be added.