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

Background command gets appended to custom Xsession with no option to disable it #32548

Open
Slabity opened this issue Dec 10, 2017 · 3 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@Slabity
Copy link
Contributor

Slabity commented Dec 10, 2017

Issue description

Custom sessions added to xservices.xserver.desktopManager.session will have a command added to them that checks for $HOME/.background-image and applies it as the wallpaper using feh.

This breaks configurations that attempt to set the wallpaper in other ways. For example, my custom session looks like the following:

services.xserver.desktopManager.session = [
    {
        name = "custom";
        start = ''                                                                                                                                  
            # Set background                                                                                                                        
            ${pkgs.feh}/bin/feh --bg-scale ${./background.jpg}                                                                                      
 
            # Load custom Xresources                                                                                                                
            ${pkgs.xlibs.xrdb}/bin/xrdb -load ${./Xresources}                                                                                                                                                                                          
        '';
    }
];

However, the actual Xsession case looks like this:

# Start the desktop manager.                                                                                                                                 
case "$desktopManager" in
  (custom)
  # Set background                                                                                                                                           
/nix/store/mpvyhf3jgakzrdi55pyvkmdyv3rwaix7-feh-2.21/bin/feh --bg-scale /nix/store/q7q5zcmwxklg6wfhfmybkmvb0jczimbj-background.jpg

# Load custom Xresources                                                                                                                                     
/nix/store/namx115zb80hvmcybp6cr85ydqpl6l43-xrdb-1.1.0/bin/xrdb -load /nix/store/4nw6izywdgq20g0cqlzgcasmgcg67705-Xresources

if [ -e $HOME/.background-image ]; then
  /nix/store/mpvyhf3jgakzrdi55pyvkmdyv3rwaix7-feh-2.21/bin/feh --bg-scale  $HOME/.background-image
else
  # Use a solid black background as fallback                                                                                                                 
  /nix/store/7g7cyycaiymfs3ff96dczds2hpn0algg-xsetroot-1.1.0/bin/xsetroot -solid black
fi

This breaks any configuration that attempts to set the wallpaper themselves, or even configurations that expect the background to be already set by the display manager.

I don't mind having an option that sets the wallpaper, but I'd prefer it to be optional (and not enabled by default).

Steps to reproduce

  1. Add a custom session to desktopManager.session (or some other method of setting the wallpaper).
  2. Background is black (unless you have a .background-image file).

Technical details

Affects the unstable branch.

@srhb
Copy link
Contributor

srhb commented Dec 12, 2017

I'm not sure you're supposed to actually set that option directly, but if you do, try settings bgSupport = true.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Dec 15, 2017

I think you are supposed to set xserver.displayManager.sessionCommands instead. At least that's what I'm currently doing to set a background.
Anyway we should add an option to change .background-image to something else.

@stale
Copy link

stale bot commented Jun 5, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

3 participants