-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
nixos/slim: reintroduce #75389
nixos/slim: reintroduce #75389
Conversation
@@ -148,13 +148,6 @@ | |||
Now, all bash code is held to the same high standard, and the rather complex stateful manipulation of the options can be discarded. | |||
</para> | |||
</listitem> | |||
<listitem> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention instead that slim
is now your slim-ng
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Release notes should not be undone
The main issue with SLIM is that it does not integrate well with modern desktops like GNOME, Plasma or Sway. In particular:
It is misleading when a software with limited and frozen feature set is advertised as an alternative to modern maintained DMs. In order for SLIM to get back to tree, it should be de-emphasized in the documentation, and users should be warned about its state of development and supported features. Though, to be honest, LightDM module is not on par with SDDM and GDM at the moment either (see e.g. #56342). |
@@ -39,7 +39,7 @@ | |||
can select an alternative one by picking one of the following lines: | |||
<programlisting> | |||
<xref linkend="opt-services.xserver.displayManager.sddm.enable"/> = true; | |||
<xref linkend="opt-services.xserver.displayManager.gdm.enable"/> = true; | |||
<xref linkend="opt-services.xserver.displayManager.slim.enable"/> = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<xref linkend="opt-services.xserver.displayManager.slim.enable"/> = true; | |
<xref linkend="opt-services.xserver.displayManager.gdm.enable"/> = true; | |
<xref linkend="opt-services.xserver.displayManager.slim.enable"/> = true; # limited integration |
@@ -146,7 +146,7 @@ xlink:href="https://nixos.org/nixpkgs/manual/#sec-package-naming"> | |||
/>), and to extend | |||
it in each backend module | |||
(<xref | |||
linkend='ex-option-declaration-eot-backend-gdm' />, | |||
linkend='ex-option-declaration-eot-backend-slim' />, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linkend='ex-option-declaration-eot-backend-slim' />, | |
linkend='ex-option-declaration-eot-backend-gdm' />, | |
<xref | |
linkend='ex-option-declaration-eot-backend-slim' />, |
@@ -167,11 +167,11 @@ services.xserver.displayManager.enable = mkOption { | |||
};</screen> | |||
</example> | |||
|
|||
<example xml:id='ex-option-declaration-eot-backend-gdm'> | |||
<title>Extending <literal>services.xserver.displayManager.enable</literal> in the <literal>gdm</literal> module</title> | |||
<example xml:id='ex-option-declaration-eot-backend-slim'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better use fully-featured DM here:
<example xml:id='ex-option-declaration-eot-backend-slim'> | |
<example xml:id='ex-option-declaration-eot-backend-gdm'> |
<example xml:id='ex-option-declaration-eot-backend-gdm'> | ||
<title>Extending <literal>services.xserver.displayManager.enable</literal> in the <literal>gdm</literal> module</title> | ||
<example xml:id='ex-option-declaration-eot-backend-slim'> | ||
<title>Extending <literal>services.xserver.displayManager.enable</literal> in the <literal>slim</literal> module</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<title>Extending <literal>services.xserver.displayManager.enable</literal> in the <literal>slim</literal> module</title> | |
<title>Extending <literal>services.xserver.displayManager.enable</literal> in the <literal>gdm</literal> module</title> |
<screen> | ||
services.xserver.displayManager.enable = mkOption { | ||
type = with types; nullOr (enum [ "gdm" ]); | ||
type = with types; nullOr (enum [ "slim" ]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type = with types; nullOr (enum [ "slim" ]); | |
type = with types; nullOr (enum [ "gdm" ]); |
src = fetchFromGitHub { | ||
owner = "oxij"; | ||
repo = pname; | ||
rev = "b6d77d41eeb796d3788ecab2d02e616c858661e1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use a tag here?
|
||
postPatch = '' | ||
substituteInPlace CMakeLists.txt \ | ||
--replace /lib $out/lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aargh, why does not the build script use GNUInstallDirs
CMake module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patch is ugly too. The build system should work in a really native way if it's literally a "For NixOS" package. GNUInstallDirs
would be the way to go for that.
(though, not very fond of CMake)
|
||
cmakeFlags = [ "-DUSE_PAM=1" ]; | ||
|
||
enableParallelBuilding = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMake builds in parallel by default.
enableParallelBuilding = true; | ||
|
||
buildInputs = | ||
[ cmake pkgconfig libjpeg libpng fontconfig freetype |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build platform dependencies like cmake
and pkg-config
should go to nativeBuildInputs
Mybe mention instead that `slim` is now your `slim-ng`
What for? It is a drop-in replacement.
@jtojnar
* It is missing the ability to load session files from `$XDG_DATA_DIRS`, or some other way of loading desktop files from more than a single `sessiondir`. While we are currently linking upstream session files into a single tree, `$out/share/xsessions` and `$out/share/wayland-sessions` will always be different directories (session type is determined from the directory name).
This would very easy to implement, assuming this is ever required. But since Wayland support is unlikely (because pretty much everything will need to be rewritten) I don't really see a problem.
* Wayland sessions are not supported.
Yes. Wayland support is unlikely. Unless there exists a small library that would allow to reimplement the rendering code for both X11 and Wayland in a single breath.
(Hm. Sounds like SDL. Rewriting it for SDL sounds doable and maybe even enjoyable, so maybe. Not soon, thought, I have other plans for quite awhile.)
* Desktop environments are moving towards using [systemd for starting sessions](https://blogs.gnome.org/laney/2018/06/26/starting-sessions-with-systemd/), and without upstream, adding support would fall on us.
Looks fairly easy to implement, thought I don't particularly like the idea. IMHO, if you want to run stuff with systemd-user you can just plug it into a *.desktop file or whatever. Why should DM even care about it? Sound like another not-invented-here-so-systemd-will-have-reinvent-this-one-too thing to me.
It is misleading when a software with limited and frozen feature set is advertised as an alternative to modern maintained DMs. In order for SLIM to get back to tree, it should be de-emphasized in the documentation, and users should be warned about its state of development and supported features.
Sure. Will fix.
|
@jtojnar I am sure, that most of slim (or slim-ng) users don't use major DEs, and use it with simple WMs (icewm/xmonad/qtile/etc). It can be mentioned in docs as recomendation to choose other one for GNOME, etc. |
@oxij This package shouldn't even be called Also, what about:
I'd also want to emphasize the importance of xdg spec compliance. And the biggest issue is wayland, it can't start wayland sessions. So I'm seeing this being blocked on some code changes. I mentioned how if a community member forked and continued the project we'd be in good hands. |
nixos/tests/slim.nix
Outdated
startAll; | ||
$machine->waitForText(qr/Username:/); | ||
$machine->sendChars("${user.name}\n"); | ||
$machine->waitForText(qr/Password:/); | ||
$machine->sendChars("${user.password}\n"); | ||
|
||
$machine->waitForFile('${user.home}/.Xauthority'); | ||
$machine->succeed('xauth merge ${user.home}/.Xauthority'); | ||
$machine->waitForWindow('^IceWM '); | ||
|
||
# Make sure SLiM doesn't create a log file | ||
$machine->fail('test -e /var/log/slim.log'); | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we port this to the python driver? #72828
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just be replacing make-test.nix
with make-test-python.nix
above and using:
start_all()
machine.wait_for_text("Username:")
machine.send_chars("${user.name}\n")
machine.wait_for_text("Password:")
machine.send_chars("${user.password}\n")
machine.wait_for_file("${user.home}/.Xauthority")
machine.succeed("xauth merge ${user.home}/.Xauthority")
machine.wait_for_window(r"^IceWM ")
# Make sure SLiM doesn't create a log file
machine.fail("test -e /var/log/slim.log")
buildInputs = | ||
[ cmake pkgconfig libjpeg libpng fontconfig freetype | ||
pam dbus | ||
xorg.libX11 xorg.libXext xorg.libXrandr xorg.libXrender xorg.libXmu xorg.libXft makeWrapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what has makeWrapper been used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if makeWrapper
is used it should be in nativeBuildInputs
as well.
Can slim-ng support |
Technically It's a different software. One should know it's getting your fork and not the original slim.
Is there a policy on this topic? For example in 34cc444 compton has been (more or less) silently replaced by a fork. Imho even if by the same author this should be mentioned in the release notes and maybe the attribute name should change as well. |
In that particular example, I don't think it should even have been aliased. An alias could be used when two identities were created for the same thing, old and new. A good example was gnome-mpv was renamed to celluloid, but it's the same code. In that example you want to help out with migraton, so you create a |
However, sometimes in the cases like with forks, the new maintainer doesn't re-identify this software. Things become historically confusing, and the "new" source will proliferate in distributions but it's fundamentally different. It's not as bad because it's usually 1:1 compatible, but as a packager, I'd request the maintainer to re-identify the software to avoid this. So to make on topic with slim, we shouldn't call this slim because we're not talking about the project without a developer who also proclaimed it abandoned, and with various compatibility issues. |
> @@ -39,7 +39,7 @@
can select an alternative one by picking one of the following lines:
<programlisting>
<xref linkend="opt-services.xserver.displayManager.sddm.enable"/> = true;
-<xref linkend="opt-services.xserver.displayManager.gdm.enable"/> = true;
+<xref linkend="opt-services.xserver.displayManager.slim.enable"/> = true;
```suggestion
<xref linkend="opt-services.xserver.displayManager.gdm.enable"/> = true;
<xref linkend="opt-services.xserver.displayManager.slim.enable"/> = true; # limited integration
```
Done.
> @@ -146,7 +146,7 @@ xlink:href="https://nixos.org/nixpkgs/manual/#sec-package-naming">
/>), and to extend
it in each backend module
(<xref
- linkend='ex-option-declaration-eot-backend-gdm' />,
+ linkend='ex-option-declaration-eot-backend-slim' />,
```suggestion
linkend='ex-option-declaration-eot-backend-gdm' />,
<xref
linkend='ex-option-declaration-eot-backend-slim' />,
```
> @@ -167,11 +167,11 @@ services.xserver.displayManager.enable = mkOption {
};</screen>
</example>
- <example xml:id='ex-option-declaration-eot-backend-gdm'>
- <title>Extending <literal>services.xserver.displayManager.enable</literal> in the <literal>gdm</literal> module</title>
+ <example xml:id='ex-option-declaration-eot-backend-slim'>
Better use fully-featured DM here:
```suggestion
<example xml:id='ex-option-declaration-eot-backend-gdm'>
```
> @@ -167,11 +167,11 @@ services.xserver.displayManager.enable = mkOption {
};</screen>
</example>
- <example xml:id='ex-option-declaration-eot-backend-gdm'>
- <title>Extending <literal>services.xserver.displayManager.enable</literal> in the <literal>gdm</literal> module</title>
+ <example xml:id='ex-option-declaration-eot-backend-slim'>
+ <title>Extending <literal>services.xserver.displayManager.enable</literal> in the <literal>slim</literal> module</title>
```suggestion
<title>Extending <literal>services.xserver.displayManager.enable</literal> in the <literal>gdm</literal> module</title>
```
> <screen>
services.xserver.displayManager.enable = mkOption {
- type = with types; nullOr (enum [ "gdm" ]);
+ type = with types; nullOr (enum [ "slim" ]);
```suggestion
type = with types; nullOr (enum [ "gdm" ]);
```
Basically, you want me to edit examples in `doc/manual/development/option-declarations.xml`. I think this a) should be outside of the scope of this PR, b) makes no sense, these are examples for module developers, not `configuration.nix` examples.
> @@ -261,6 +261,7 @@ in rec {
inherit require;
virtualisation.memorySize = 1024;
services.xserver.enable = true;
+ services.xserver.displayManager.slim.enable = false;
IMHO, we should keep the default DM in tests.
> @@ -248,6 +248,7 @@ in rec {
inherit require;
virtualisation.memorySize = 1024;
services.xserver.enable = true;
+ services.xserver.displayManager.slim.enable = false;
Same here.
Done.
> @@ -1,9 +1,9 @@
# This module declares the options to define a *display manager*, the
-# program responsible for handling X logins (such as LightDM, GDM, or SDDM).
-# The display manager allows the user to select a *session
-# type*. When the user logs in, the display manager starts the
+# program responsible for handling X logins (such as xdm, gdb, or
```suggestion
# program responsible for handling X logins (such as LightDM, GDM, SDDM, or
```
Done.
> @@ -321,14 +321,15 @@ in
execCmd = mkOption {
type = types.str;
example = literalExample ''
- "''${pkgs.lightdm}/bin/lightdm"
+ "''${pkgs.slim}/bin/slim"
Let’s keep it on the down low.
```suggestion
"''${pkgs.lightdm}/bin/lightdm"
```
> '';
description = "Command to start the display manager.";
};
environment = mkOption {
type = types.attrsOf types.unspecified;
default = {};
+ example = { SLIM_CFGFILE = "/etc/slim.conf"; };
I do not think it is good idea to include it in the example, as it will conflict with the SLiM module when used.
Done.
> @@ -0,0 +1,42 @@
+{ stdenv, fetchFromGitHub, fetchpatch, cmake, pkgconfig, xorg, libjpeg, libpng
All of those done.
|
* the bug in the screen locker iwamatsu/slim#4
I think this should be closed by 48d25b6969c1f36fe6b505f7eb308cb1771d9d2b of slim-ng, but at the moment I wouldn't recommend using slimlock anyway, it's very far from what a proper screen locker (like physlock) should be doing.
IMHO, the code there needs a good reorganization before those issues can be fixed in a sane manner (e.g., currently slimlock copy-pastes a bunch of code from app.cpp, uhg!).
* issues mentioned by @jtojnar
Those are fixed.
Can we port this to the python driver? #72828
Out of scope of this PR.
Can slim-ng support `default` or soon to be [`sessionDefault`](#53843)?
That needs more research. The cursory look didn't help. Hopefully, this is not blocking?
slim -> slim-ng
I'm not sure what you want here. Renaming the nixos module seems rather strange. Even if slim-ng would diverge wildly from slim I would rather keep the same module and add an option there to select between packages, since they would do essentially the same thing.
Moreover, since, at this moment, slim-ng is just slim with less bugs I would vote against renaming the package attribute too. Why add an alias when you can skip it?
core review
Sure, if somebody wants to do it, feel free. But, in general, the code there is rather messy so don't blame me for something I didn't do, please. With slim-ng v1.3.8 I did my best without, hopefully, breaking anything.
|
ee64265
to
b650ba6
Compare
Porting to the python testing driver is not actually of of scope. |
Looking at some commits it's slowly diverting from slim, and already behaves in slightly different ways.
I will relay it to the person that any design decisions or original code is not to come back and reflect on you directly 😄 |
The desktops mentioned there provide wayland sessions. As X has no future this should be a great concern. |
Updates? Also, is the problem in #4300 still present? |
|
|
This reverts commit 4583e29, reversing changes made to d6fa540. The fact that SLiM is not officially actively maintained is not a good reason to remove it. It works, and, in some instances, like automatic logins, it is the only thing that actually works. See NixOS#46396 and NixOS#30890 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given there is apparently quite the interest, I suppose with the users taking up active maintainership it should be fine to get this back in. Regarding compatibility, is it possible to add a check preventing it from being used with incompatible DE's?
@@ -148,13 +148,6 @@ | |||
Now, all bash code is held to the same high standard, and the rather complex stateful manipulation of the options can be discarded. | |||
</para> | |||
</listitem> | |||
<listitem> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Release notes should not be undone
nixos/tests/slim.nix
Outdated
name = "slim"; | ||
|
||
meta = with pkgs.stdenv.lib.maintainers; { | ||
maintainers = [ aszlig ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
security.pam.services.slimlock = {}; | ||
|
||
environment.systemPackages = [ pkgs.slim ]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add as maintainer
b650ba6
to
d0d47d0
Compare
tests
Done. No idea if it works, though.
@rnhmjoj
Also, is the problem in #4300 still present?
Hm, I use it pretty much the same way as the author there, but I see no such thing here. I'll check carefully later.
@misuzu @bb2020
slimlock
Should be fixed now.
Also xserver.displayManager.setupCommands was not available in the previous version. Maybe we can find a way to implement it now.
Yes, we can implement it now. Will do later.
@FRidh
Regarding compatibility, is it possible to add a check preventing it from being used with incompatible DE's?
Sure, but I don't know which ones are incompatible, I only use xmonad.
Release notes should not be undone
Well, what should I do then? That release note is no longer valid. Should I add another one there saying that it was re-added again or what?
@ ALL
Also renamed the attribute to `slim-ng` and added an alias on popular demand.
|
|
smbclient = samba; # added 2018-04-25 | ||
slim = throw "slim has been removed. Please use a different display-manager"; # added 2019-11-11 | ||
slimThemes = throw "slimThemes has been removed because slim has been also"; # added 2019-11-11 | ||
slim = slim-ng; # added 2019-11-11 | ||
net_snmp = net-snmp; # added 2019-12-21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't correct. An alias is supposed to be a bind to something that's equivalent, and we've already addressed that it isn't anymore.
slim = throw "slim has been removed. Please use the replacement slim-ng or a different display-manager"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that there is a place for slim-ng in NixOS, but IMHO it should be called slim-ng and clearly mention the differences with gdm/sddm in the description of the module
@@ -39,7 +39,7 @@ | |||
can select an alternative one by picking one of the following lines: | |||
<programlisting> | |||
<xref linkend="opt-services.xserver.displayManager.sddm.enable"/> = true; | |||
<xref linkend="opt-services.xserver.displayManager.gdm.enable"/> = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove gdm? That's what most users probably want
@@ -99,7 +99,7 @@ xlink:href="https://nixos.org/nixpkgs/manual/#sec-package-naming"> | |||
<para> | |||
As an example, we will take the case of display managers. There is a central | |||
display manager module for generic display manager options and a module file | |||
per display manager backend (sddm, gdm ...). | |||
per display manager backend (slim, sddm, gdm ...). | |||
</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting slim first makes it seem like the first one users should try, whereas slim is a very leftfield alternative
I marked this as stale due to inactivity. → More info |
git log
Revert "Merge pull request nixos/slim: remove #73251 from worldofpeace/remove-slim"
This reverts commit 4583e29,
reversing changes made to d6fa540.
The fact that SLIM is not officially actively maintained is not a good
reason to remove it. It works, and, in some instances, like automatic
logins, it is the only thing that actually works. See
nixos: xserver.displayManager: use slim for automatic logins #46396 and
display-managers: make lightdm the default #30890 (comment).
slim: switch to slim-ng
... which is a fork maintained by me.
nixos/slim: save some closure space by using the default theme when using autologin
nix-instantiate
environmentThings done
(Tested by applying this patchset on top of NixOS 19.09, and then testing the resulting buiild on a real hardware.)