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

nixos: Define XCURSOR_PATH environment variable. #24005

Merged
merged 1 commit into from Apr 30, 2017

Conversation

ambrop72
Copy link
Contributor

In the absence of XCURSOR_PATH, the function XcursorLibraryPath
in libXcursor will return a hardcoded value unsuitable for NixOS.
Some desktops as well as display managers in NixOS currently do
set XCURSOR_PATH, but there are combinations where neither does
(e.g. SDDM+XFCE), resulting in no cursor themes being available.

The new definition if XCURSOR_PATH is effectively the same as what
KDE's startkde currently does. The pre-existing definitions of (which can
be found by grepping nixpkgs for XCURSOR_PATH) can probably be
removed then.

Fixes issue #21442.

Note this is applicable for 16.09 and 17.03 as well.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

In the absence of XCURSOR_PATH, the function XcursorLibraryPath
in libXcursor will return a hardcoded value unsuitable for NixOS.
Some desktops as well as display managers in NixOS currently do
set XCURSOR_PATH, but there are combinations where neither does
(e.g. SDDM+XFCE), resulting in no cursor themes being available.

The new definition if XCURSOR_PATH is effectively the same as what
KDE's startkde currently does.

Fixes issue NixOS#21442.
@mention-bot
Copy link

@ambrop72, thanks for your PR! By analyzing the history of the files in this pull request, we identified @nbp, @oxij and @edolstra to be potential reviewers.

@@ -20,6 +20,7 @@ in
{ NIXPKGS_CONFIG = "/etc/nix/nixpkgs-config.nix";
PAGER = mkDefault "less -R";
EDITOR = mkDefault "nano";
XCURSOR_PATH = "$HOME/.icons";
Copy link
Member

Choose a reason for hiding this comment

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

This seems a little out of place at the very top level. Many of us don't even use a graphical system. All my NixOS boxes are headless EC2 instances. This doesn't really hurt anything, but it probably belongs in a different module?

@@ -42,6 +43,7 @@ in
GTK_PATH = [ "/lib/gtk-2.0" "/lib/gtk-3.0" ];
XDG_CONFIG_DIRS = [ "/etc/xdg" ];
XDG_DATA_DIRS = [ "/share" ];
XCURSOR_PATH = [ "/share/icons" ];
MOZ_PLUGIN_PATH = [ "/lib/mozilla/plugins" ];
Copy link
Member

Choose a reason for hiding this comment

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

Then again, I guess we stick all sorts of random mozilla and KDE stuff in here too... so perhaps this isn't the place to draw the line 😦

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well yes, that was my thinking too. There is already a TODO somewhere here that much of it is out of place. Probably it would be better if all desktops startup scripts use the desktop-specific environment definitions from a common place (or display managers?) . But I can't myself work on refactoring this.

@noisecrew
Copy link

In only WM desktop setup. I can't change the mouse theme.

@7c6f434c 7c6f434c merged commit 6b31de4 into NixOS:master Apr 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants