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

bug: Services not getting started automatically in wayland. #3428

Closed
2 tasks done
niksingh710 opened this issue Nov 22, 2022 · 3 comments
Closed
2 tasks done

bug: Services not getting started automatically in wayland. #3428

niksingh710 opened this issue Nov 22, 2022 · 3 comments
Assignees
Labels
bug status: stale triage Issues or feature request that have not been triaged yet

Comments

@niksingh710
Copy link

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

I have faced it with 2 tools udiskie and swayidle
i have enabled their services and build the system using flake
the build was successfull but the services are not started automatically.

if i run them manually then everything works fine.

on the home manager documentation i found it was mentioned that

Graphical section
Unfortunately, such services will not be started automatically unless you let Home Manager start your X session. That is, you have something like
services.xserver.enable = true

on wayland how?

Maintainer CC

No response

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.0.9, NixOS, 22.11 (Raccoon), 22.11.20221121.af50806`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.0`
 - channels(root): `"nixos-22.05"`
 - channels(niksingh710): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@niksingh710 niksingh710 added bug triage Issues or feature request that have not been triaged yet labels Nov 22, 2022
@stale
Copy link

stale bot commented Feb 20, 2023

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

@stale stale bot added the status: stale label Feb 20, 2023
@martinvonwittich
Copy link

I have the same problem with udiskie. I have it enabled in my home-manager config:

    services.udiskie = {
      enable = true;
    };

To get this to work, I also needed to define the tray.target as suggested in #2064:

    systemd.user.targets.tray = {
      Unit = {
        Description = "Home Manager System Tray";
        Requires = [ "graphical-session-pre.target" ];
      };
    };

The systemd user service starts, but it won't show up in the tray:

Jul 02 13:07:57 desktop systemd[3349]: Started udiskie mount daemon.
Jul 02 13:07:57 desktop udiskie[3435]: Not run within X or Wayland session.
Jul 02 13:07:57 desktop udiskie[3435]: Starting udiskie without tray icon.

Looking up the error message:

martin@desktop ~ % ag -C2 'Not run' /nix/store/z665n8p3h927ihpqn8vn5fgmhkxaylrv-udiskie-2.5.2/
/nix/store/z665n8p3h927ihpqn8vn5fgmhkxaylrv-udiskie-2.5.2/lib/python3.11/site-packages/udiskie/cli.py
397-        if show_tray and not (_in_X or _in_Wayland):
398-            no_tray_support = _(
399:                "Not run within X or Wayland session."
400-                "\nStarting udiskie without tray icon.\n")
401-            logging.getLogger(__name__).error(no_tray_support)

_in_Wayland is defined here:

martin@desktop ~ % ag '^_in_Wayland' /nix/store/z665n8p3h927ihpqn8vn5fgmhkxaylrv-udiskie-2.5.2/lib/python3.11/site-packages/udiskie/depend.py
31:_in_Wayland = bool(os.environ.get('WAYLAND_DISPLAY'))

WAYLAND_DISPLAY indeed does not exist in /proc/<pid>/environ of the udiske process.

Manually restarting udiskie systemctl --user restart udiskie.service temporarily resolves the problem until next login.

@stale stale bot removed the status: stale label Jul 2, 2024
Copy link

stale bot commented Jan 3, 2025

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

@stale stale bot added the status: stale label Jan 3, 2025
@niksingh710 niksingh710 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status: stale triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

5 participants