Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nixos/doc/manual/release-notes/rl-1909.xml
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@
</listitem>
<listitem>
<para>
<option>services.xserver.desktopManager.xterm</option> is now disabled by default if <literal>stateVersion</literal> is 19.09 or higher.
Previously the xterm desktopManager was enabled when xserver was enabled, but it isn't useful for all people so it didn't make sense to
have any desktopManager enabled default.
<option>services.xserver.desktopManager.xterm</option> is now replaced by <option>services.xserver.desktopManager.xsession</option>.
Previously the xterm desktopManager was enabled when xserver was enabled, but it isn't useful for everyone and was confusing to new users.
<option>services.xserver.desktopManager.xsession</option> defaults to showing the user an error message describing how to configure a working X session.
</para>
</listitem>
<listitem>
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/x11/desktop-managers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ in
imports = [
./none.nix ./xterm.nix ./xfce.nix ./xfce4-14.nix ./plasma5.nix ./lumina.nix
./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix ./maxx.nix
./mate.nix ./pantheon.nix ./surf-display.nix
./mate.nix ./pantheon.nix ./surf-display.nix ./xsession.nix
];

options = {
Expand Down
33 changes: 33 additions & 0 deletions nixos/modules/services/x11/desktop-managers/xsession.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:

with lib;

let

cfg = config.services.xserver.desktopManager.xsession;

in

{
options = {

services.xserver.desktopManager.xsession.enable = mkOption {
type = types.bool;
default = true;
description = "Enable ~/.xsession as a desktop manager.";
};

};

config = mkIf cfg.enable {

services.xserver.desktopManager.session = singleton
{ name = "xsession";
start = ''
${pkgs.gnome3.zenity}/bin/zenity --error --text 'The user must provide a ~/.xsession file containing session startup commands.' --no-wrap
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this program, would it bring in some undesirable deps for certain users?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I wanted to use xdialog but that was seemingly not packaged. If you know of another similar package I'm all ears.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use xmessage (though with a far less readable error message).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's xmessage but it's kinda ugly. Looking.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, looks like I commented that before refreshing 🤣

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems xdialog also uses gtk so I'm not sure it matters much.

Copy link
Copy Markdown
Member

@samueldr samueldr Sep 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like I was thinking about xmessage when I said xdialog. I do agree this require a change to not bring gnome3 into scope.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, being pretty is not a desired outcome. The outcome is to ensure that people relying on xsession have a solution, while at least showing something to other users explaining what's going on.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's stick with zenity then (unless anyone have another good option).
I don't want to sacrifice readability.

'';
};

};

}
2 changes: 1 addition & 1 deletion nixos/modules/services/x11/desktop-managers/xterm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ in

services.xserver.desktopManager.xterm.enable = mkOption {
type = types.bool;
default = (versionOlder config.system.stateVersion "19.09");
default = false;
description = "Enable a xterm terminal as a desktop manager.";
};

Expand Down