Skip to content

Investigate using upstream desktop session files #39871

@jtojnar

Description

@jtojnar

GDM distinguishes wayland sessions by them being in wayland-sessions directory, so if we want to support those, we need abandon the flat desktops derivation (af03c20c548a6836e5cc62f3431a4f905f7b564b). GDM_SESSIONS_DIR variable will not be enough either, we would need to add GDM_WAYLAND_SESSIONS_DIR, or even better, load the session files from XDG_DATA_DIRS. I tried that but it picked up session files as well. Perhaps we should get rid of our xsession code and just use the upstream files.

We are doing some extra things but they could be moved to pam or removed completely, see the following conversation from irc.gnome.org#gdm

jtojnar  I still need to figure out why the upstream session files do not work though
halfline yea you'd think the session file would just have Exec=gnome-session in it or whatever
         so as long as PATH was right 
jtojnar  at the moment we execute this monstrosity https://paste.gnome.org/pf4v67irc
         would starting GDM with the variables work, or is the user session launched in a different environment like the greeter?
halfline woah that's quite a script.  yea user session doesn't get the GDM's environment
         you could use pam_env or ~/.config/environment.d/foo.conf to adjust user environment
         well maybe prefix it with a number
         see man environment.d
         or of course you've got a big script
         so you could set environment variables in it
jtojnar  and I suppose running GNOME with a different WM (XMonad) will not work either
halfline as you already do i guess
         no, GNOME is gnome-shell really
         you can't really have gnome without gnome-shell
         but you can tweak gnome-shell with extensions
         there is an xmonad like extension for gnome-shell i think
         (i mean you could run bits of gnome with xmonad but things won't work right, like screen locking etc
jtojnar  I thin some of our users are running XMonad with GNOME Shell
         but I am not sure how that works
halfline sounds unpossible ! 
         </ralph wiggum>
         well i guess yo ucould have two screens 0.0 and 0.1
         and run gnome-shell on 0.0
         and run xmonad on 0.1
         but you souldn't be able to move windows between the two screens
         s/souldn't/wouldn/
jtojnar  apparently, they just mean GNOME services, not the whole shell https://wiki.haskell.org/Xmonad/Using_xmonad_in_Gnome#Gnome3
         or flashback (but we don't have that packaged)
         what is supposed to run xdg-user-dirs-update?
halfline it ships an autostart file
jtojnar  and I suppose pulseaudio can be socket activated
halfline yea that's what upstream pulse recommends these days in fact
jtojnar  not sure what https://paste.gnome.org/pf4v67irc#line-31 is supposed to do
         and launching dbus session (line 45)  will gnome-session take care of
         xrdb-merge probably too
         (line 60)
         what about letting systemd know, graphical-target is on (line 89)?
         maybe using presession hook?
halfline line 31 is restarting the scrip with the output connected to the systemd journal
         to make sure its logged properly i suppose
         line 45 should indeed be handled by gdm before that runs
         or by gnome-session after that runs
         but it's harmless since it won't run because of the test on line 44
         i don't think we do xrdb -merge anywhere these days
         it's affected start up time in the past since it invokes the c preprocessor
         and it's only used by really old applications like xterm
         and some versions of emacs
         you're just trying to clean the script up i guess

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: enhancementAdd something new or improve an existing system.6.topic: freedesktopInteroperability and shared base technology for X, Wayland and others6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions