nixos/gnome3: add GNOME Flashback sessions option#53695
Conversation
|
I'm not totally sure about the organization. Maybe |
9fc5304 to
6d66fb1
Compare
e26a011 to
4842da7
Compare
|
Done, please take a look |
There was a problem hiding this comment.
Maybe add an option for extra arguments like the acceleration disablement.
There was a problem hiding this comment.
It works for me without it and it's not a documented gnome-session flag so I think we should add it if someone needs it.
There was a problem hiding this comment.
Here is a (commit adding this flag](https://gitlab.gnome.org/GNOME/gnome-flashback/commit/39dbfd09d4a7e16d5ca41319a62f173b8c79ca79) and a relevant bug.
4842da7 to
6f18572
Compare
|
Hmm on my desktop it doesn't work yet because |
|
That should go to preFixup = ''
gappsWrapperArgs+=(
# Session file requirements (for finding desktop files)
--prefix XDG_DATA_DIRS : "${gnome-panel}/share"
)
'';would do. But that is pretty pointless use of I suggest that you just add the |
6f18572 to
f25a7c0
Compare
|
OK, please take a look. |
f25a7c0 to
1552624
Compare
There was a problem hiding this comment.
Using lib.writeScript would allow us to avoid the need to escape this.
There was a problem hiding this comment.
How would we put $out into it with writeScript?
There was a problem hiding this comment.
It produces output which can be copied or linked.
There was a problem hiding this comment.
I know but we want to add $out/share into XDG_DATA_DIRS, but we can't use $out in a writeScript.
There was a problem hiding this comment.
let
sessionScript = lib.writeScript ...;
in stdenv.mkDerivation {
buildCommand = ''
…
mkdir -p $out/libexec
cp ${sessionScript} $out/libexec/gnome-flashback-${wmName}
…
'';
}
There was a problem hiding this comment.
Again, I understand that. The question is how you would do the following in the writeScript given that $out is not available:
export XDG_DATA_DIRS=$out/share:...
There was a problem hiding this comment.
Hmm, sorry, you are right. I was thinking about passing a placeholder but those do not really work with writeScript, I think.
1552624 to
f143ca7
Compare
|
I got it working with |
f143ca7 to
869245c
Compare
|
I tried running { pkgs, config, ... }: {
services.xserver = {
displayManager.gdm = {
enable = true;
debug = true;
};
desktopManager.gnome3 = {
enable = true;
debug = true;
flashback.enableMetacity = true;
};
};
}in a VM and found two issues:
|
|
It also might be nice to be enable gnome-flashback without gnome-shell. Maybe we could move most of the |
preFixup = ''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${gnome-menus}/share:${gnome-flashback}/share"
--prefix XDG_CONFIG_DIRS : "${gnome-menus}/etc/xdg:${gnome-flashback}/etc/xdg"
)
'';seems to fix it. |
|
I'm working on packaging |
869245c to
8759716
Compare
|
OK I got it working with |
There was a problem hiding this comment.
You can use PKG_CONFIG_DBUS_1_SESSION_BUS_SERVICES_DIR = "${placeholder "out"}/share/dbus-1/services"; in the expression.
There was a problem hiding this comment.
I don't understand what that's for, I want to set the path directly instead of using the sed hack.
There was a problem hiding this comment.
The sed hack will not do anything on Nix, as we do not use /usr/share prefix. Instead, we can override the path returned by pkg-config --variable session_bus_services_dir dbus-1 using the aforementioned environment variable, avoiding the need to patch the configure script.
There was a problem hiding this comment.
The pkgconfig + sed hack is introduced by the Ubuntu patch that adds the dbus service. As you said it doesn't work, so I just replace it with the correct path directly. I don't see why changing what pkg-config returns would help.
There was a problem hiding this comment.
I don't understand why pkg-config needs to be involved at all. This is the original patch:
There was a problem hiding this comment.
Well, the sed will not bother us with the environment variable set:
$ env PKG_CONFIG_DBUS_1_SESSION_BUS_SERVICES_DIR='${placeholder "out"}/share/dbus-1/services' pkg-config --variable session_bus_services_dir dbus-1 | sed -e 's,/usr/share,${datarootdir},g'
${placeholder "out"}/share/dbus-1/servicesThere was a problem hiding this comment.
OK, in that case isn't it best to patch in the correct solution you described? I've pushed that now.
There was a problem hiding this comment.
That would work too, though I would prefer to minimize the number of patches. It is messy enough as is, and there are much more patches than other distros have:
https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/gnome-screensaver
https://salsa.debian.org/gnome-team/gnome-screensaver/tree/debian/master/debian/patches
There was a problem hiding this comment.
I guess we might want to switch to Arch’s patchset, as it is much closer to our philosophy. With Ubuntu, it is hard to tell which patches are Ubuntu specific, only needed due to patches of some other component (24 looks like that).
There was a problem hiding this comment.
24 is also in the Arch patches: https://git.archlinux.org/svntogit/community.git/tree/trunk/use-screensaver-background.patch?h=packages/gnome-screensaver
The enabled Ubuntu patches all seem to be bugfixes not present in the other distros, I think it would be a good idea to have them. I think if we want to really get it right we should support xscreensaver since this package is old and deprecated, but let's do that in another PR.
|
Creating a DBus interface for |
8759716 to
c5cd572
Compare
|
Let's just do what upstream does with |
c5cd572 to
cca2643
Compare
|
By the way, do we care about running Flashback without having GNOME Shell installed? |
cca2643 to
b25095b
Compare
I guess it could be useful, but I'd like to merge this first since it works now and separating the two would be quite a big change. If there's demand for it we can make another PR. |
|
Works for me, thanks for your work. |
Motivation for this change
This allows you to enable GNOME Flashback sessions with a custom window manager.
Things done
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)nix path-info -Sbefore and after)