Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GNOME Flashback support #47451

Closed
jtojnar opened this issue Sep 28, 2018 · 13 comments
Closed

Add GNOME Flashback support #47451

jtojnar opened this issue Sep 28, 2018 · 13 comments
Labels
6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 9.needs: module (new) This needs a module to be created

Comments

@jtojnar
Copy link
Member

jtojnar commented Sep 28, 2018

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

@jtojnar jtojnar added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: GNOME GNOME desktop environment and its underlying platform 9.needs: module (new) This needs a module to be created labels Sep 28, 2018
@chpatrick
Copy link
Contributor

chpatrick commented Jan 8, 2019

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?

@jtojnar
Copy link
Member Author

jtojnar commented Jan 8, 2019

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.

@jtojnar
Copy link
Member Author

jtojnar commented Jan 8, 2019

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.

@chpatrick
Copy link
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?

@jtojnar
Copy link
Member Author

jtojnar commented Jan 8, 2019

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.

@chpatrick
Copy link
Contributor

#53695

@jtojnar
Copy link
Member Author

jtojnar commented Jan 10, 2019

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.

@jtojnar
Copy link
Member Author

jtojnar commented Jan 11, 2019

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.

@worldofpeace
Copy link
Contributor

I believe this is fixed.

@jtojnar
Copy link
Member Author

jtojnar commented Aug 26, 2019

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

@jtojnar jtojnar mentioned this issue Aug 26, 2019
10 tasks
@worldofpeace
Copy link
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?

@jtojnar
Copy link
Member Author

jtojnar commented Aug 27, 2019

Done

@JohnRTitor JohnRTitor added this to GNOME Jun 20, 2024
@JohnRTitor JohnRTitor moved this to Done in GNOME Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 9.needs: module (new) This needs a module to be created
Projects
Status: Done
Development

No branches or pull requests

4 participants