Skip to content

Add GNOME Flashback support #47451

Closed
Closed

Description

@jtojnar

We have already packaged GNOME Flashback in #44689, but, we still need a NixOS module to be actually able to run it.

Thanks to upstream sessions, it is much easier now: see https://github.com/jtojnar/nixpkgs/commits/flashback. Though, we might want to allow enabling Flashback independently from gnome3 module. Additionally, the upstream session files, unlike the original packaging effort, do not allow to be easily combined with other window managers like XMonad.

There are also some fixes needed from #44497

Activity

  1. added
    6.topic: nixos
    6.topic: GNOME
    9.needs: module (new)
    on Sep 28, 2018
  2. chpatrick commented on Jan 8, 2019

    @chpatrick
    Contributor

    Hi, I've managed to get Flashback to work with XMonad. It should also work with the default metacity/compiz but I haven't tried it yet. https://gist.github.com/chpatrick/f7e8c30026634d6344924c87c87a08d6

    What do you think is the best way to integrate this?

    The key thing was to set XDG_DATA_DIRS in the executable so that gnome-flashback, gnome-panel and the window manager are available. For some strange reason, gnome-flashback needs to be added twice like this ${gnome3.gnome-flashback}/share:${gnome3.gnome-flashback}/share/gsettings-schemas/gnome-flashback-3.28.0 otherwise its gsettings schemas will not be found (according to strace). Do you know why this might be?

  3. jtojnar commented on Jan 8, 2019

    @jtojnar
    MemberAuthor

    For some strange reason, gnome-flashback needs to be added twice like this ${gnome3.gnome-flashback}/share:${gnome3.gnome-flashback}/share/gsettings-schemas/gnome-flashback-3.28.0 otherwise its gsettings schemas will not be found (according to strace). Do you know why this might be?

    Yes, this is normal. The schemas are looked up in $XDG_DATA_DIRS/glib-2.0/schemas and we move that directory to share/gsettings-schemas/$name to avoid conflicts of gschemas.compiled. Normally, wrapGAppsHook will take care of this.

  4. jtojnar commented on Jan 8, 2019

    @jtojnar
    MemberAuthor

    As for the expression:

    buildDepends

    Those are not necessary, they are not ran during build.

    XDG_DATA_DIRS

    Yeah, wrapGAppsHook to

    will probably do it. Maybe it will even allow to get rid of the rest of the XDG_DATA_DIRS setting in libexec/gnome-flashback-xmonad.

    --disable-acceleration-check

    Maybe add a comment why this is necessary.

    --debug

    should not be necessary, services.xserver.desktopManager.gnome3.debug option should enable it.

    Otherwise it looks good to me and should be fine for a NixOS module.

  5. chpatrick commented on Jan 8, 2019

    @chpatrick
    Contributor

    OK, I added wrapGAppsHook to the gist. Do you have any thoughts as to how to generalize this to different window managers? Also, should the derivation take the session files from gnome-flashback and splice in the given window manager, or should we copy paste them into the derivation?

  6. jtojnar commented on Jan 8, 2019

    @jtojnar
    MemberAuthor

    OK, I added wrapGAppsHook to the gist

    This will work too, though I was thinking about adding it directly to gnome-flashback package.

    Do you have any thoughts as to how to generalize this to different window managers?

    You can always parametrize it like https://gist.github.com/jtojnar/1414b2fe9bbfab6253719e985bf2d3a1 but as you noticed, the desktop files are not very elegant. Maybe it will get better when gnome-session switches to systemd services.

    Also, should the derivation take the session files from gnome-flashback and splice in the given window manager, or should we copy paste them into the derivation?

    Both have some merit, do not really have a preference.

  7. chpatrick commented on Jan 9, 2019

    @chpatrick
    Contributor
  8. jtojnar commented on Jan 10, 2019

    @jtojnar
    MemberAuthor

    We need to take into account that panel applets are not picked up from XDG_DATA_DIRS but from GNOME_PANEL_APPLETS_DIR environment variable (source). We need to do something similar to what MATE is doing.

  9. muktupavels commented on Jan 11, 2019

    @muktupavels
  10. jtojnar commented on Jan 11, 2019

    @jtojnar
    MemberAuthor

    The real directory is PANEL_APPLETS_DIR:

    Yes, I am aware of that. Unfortunately, we cannot use that, since each package on Nix is installed into its own immutable prefix, so we would not be able to add gnome-applets or other packages once gnome-panel was build.

    The only way around it is to patch the program to rely on XDG_DATA_DIRS or other environment variable.

  11. worldofpeace commented on Aug 26, 2019

    @worldofpeace
    Contributor

    I believe this is fixed.

  12. jtojnar commented on Aug 26, 2019

    @jtojnar
    MemberAuthor

    I believe the missing parts are installation of panel applets and removing gnome-shell from gnome-session closure.

  13. worldofpeace commented on Aug 27, 2019

    @worldofpeace
    Contributor

    I believe the missing parts are installation of panel applets and removing gnome-shell from gnome-session closure.

    Could you open issues for those two improvements?

  14. jtojnar commented on Aug 27, 2019

    @jtojnar
    MemberAuthor
  15. moved this to Done in GNOMEon Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    6.topic: GNOME6.topic: nixos9.needs: module (new)

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions