home-manager icon indicating copy to clipboard operation
home-manager copied to clipboard

bug: Syncthingtray started before tray

Open budimanjojo opened this issue 2 years ago • 11 comments

Are you following the right branch?

  • [X] My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • [X] I have searched the existing issues

Issue description

Related ref: https://github.com/nix-community/home-manager/pull/2968

I can't get syncthingtray with either i3 or sway. It will work if I restart the service with systemctl --user restart syncthingtray after the system started. This is what I have in my home-manager config:

services.syncthing = {
  enable = true;
  tray.enable = true;
};

If I put services.syncthing.tray.command = "syncthingtray --wait", the tray icon will never show up too which is weird.

Screenshot from 2022-11-15 15-20-37

Maintainer CC

No response

System information

- system: `"x86_64-linux"`
- host os: `Linux 5.15.77, NixOS, 22.11 (Raccoon), 22.11.20221113.fc07622`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.11.0`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

budimanjojo avatar Nov 15 '22 08:11 budimanjojo

I bet this is related to #2878, can you confirm?

exzombie avatar Nov 18 '22 11:11 exzombie

@exzombie Thanks! I don't have theming issue. And I just tried installing pkgs.gnome-icon-theme and sadly the problem persists.

budimanjojo avatar Nov 19 '22 01:11 budimanjojo

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[bot] avatar Feb 17 '23 01:02 stale[bot]

Not stale, I encountered the exact same problem.

liff avatar Jul 27 '23 19:07 liff

Related upstream issue: Alexays/Waybar#1090.

liff avatar Jul 27 '23 20:07 liff

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[bot] avatar Oct 28 '23 17:10 stale[bot]

I have a kludge to fix this:

systemd.user.services.syncthingtray.Service.ExecStart = pkgs.lib.mkForce
    "${pkgs.bash}/bin/bash -c '${pkgs.coreutils}/bin/sleep 5; ${pkgs.syncthingtray-minimal}/bin/syncthingtray'";

I think this is a real issue that needs to be fixed, the problem is going to be getting consensus - particularly with upstream packages - on how to fix it.

brianmay avatar Oct 29 '23 00:10 brianmay

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[bot] avatar Jan 27 '24 07:01 stale[bot]

If people are relying on kludges, it's not fixed yet.

I've recently played around a bit with HM+systemd tray handling. I don't use syncthing myself, so I can't test this service specifically. But looking at its user unit file, everything looks ok. Are you guys using a separate bar/tray application, or the one built into i3/sway? AFAICT, external tray applications will be started before tray.target and syncthingtray will be started after tray.target, so things should work. The problem is that the WM (and it's builtin bar) is started last, after all the systemd services. In that case, the only proper solution (apart from switching to a separate bar application) is to start your tray apps not as a systemd service, but from the WM.

exzombie avatar Jan 27 '24 10:01 exzombie

I have the same issue. I thought it might be related to using a quite old low power computer (Manjaro in Intel NUC 7i3BNH), as it works great on another installation of Manjaro on an up-to-date CPU.

--wait fixes the issue for me, but it seems to be kind of a dirty workaround.

Protarios avatar Mar 11 '24 20:03 Protarios

Not stale please

TeChn4K avatar Apr 25 '24 07:04 TeChn4K

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[bot] avatar Jul 26 '24 08:07 stale[bot]

I tried a different hack. I set services.syncthing.tray.enable to false, then then set wayland.windowManager.sway.startup to [{ command = "${pkgs.syncthingtray-minimal}/bin/syncthingtray"; }]; (and similar for i3).

Unfortunately, it does not work, I get the error from swaythingtray that the tray hasn't started yet.

Which isn't really surprising, but thought I should mention it here.

brianmay avatar Aug 08 '24 00:08 brianmay