Avoid various systemd dependencies --- data/cosmic.desktop.orig 2024-01-29 00:48:40 UTC +++ data/cosmic.desktop @@ -1,7 +1,7 @@ Commment=This session logs you into Cosmic [Desktop Entry] Name=Cosmic Commment=This session logs you into Cosmic -Exec=/usr/bin/cosmic-service +Exec=cosmic-comp Type=Application DesktopNames=pop:COSMIC X-GDM-SessionRegisters=false \ No newline at end of file --- src/main.rs.orig 2024-09-23 09:13:21 UTC +++ src/main.rs @@ -87,6 +87,11 @@ fn main() -> Result<()> { logger::init_logger()?; info!("Cosmic starting up!"); + // Advise xdg-desktop-portal which *-portals.conf to load + std::env::set_var("XDG_CURRENT_DESKTOP", "COSMIC"); + // Mimic wlroots, used by https://github.com/qt/qtbase/commit/4b4870a12cd9 + std::env::set_var("XDG_SESSION_TYPE", "wayland"); + #[cfg(feature = "profile-with-tracy")] profiling::tracy_client::Client::start(); profiling::register_thread!("Main Thread");