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: Syncthingtray started before tray #3416

Open
2 tasks done
budimanjojo opened this issue Nov 15, 2022 · 18 comments · May be fixed by #6290
Open
2 tasks done

bug: Syncthingtray started before tray #3416

budimanjojo opened this issue Nov 15, 2022 · 18 comments · May be fixed by #6290
Assignees
Labels
bug pinned Prevent marking as stale triage Issues or feature request that have not been triaged yet

Comments

@budimanjojo
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

Related ref: #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 budimanjojo added bug triage Issues or feature request that have not been triaged yet labels Nov 15, 2022
@exzombie
Copy link
Contributor

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

@budimanjojo
Copy link
Author

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

budimanjojo added a commit to budimanjojo/nix-config that referenced this issue Nov 24, 2022
@stale
Copy link

stale bot commented Feb 17, 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 17, 2023
@liff
Copy link
Contributor

liff commented Jul 27, 2023

Not stale, I encountered the exact same problem.

@stale stale bot removed the status: stale label Jul 27, 2023
@liff
Copy link
Contributor

liff commented Jul 27, 2023

Related upstream issue: Alexays/Waybar#1090.

@stale
Copy link

stale bot commented Oct 28, 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 Oct 28, 2023
@brianmay
Copy link

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.

@stale stale bot removed the status: stale label Oct 29, 2023
Copy link

stale bot commented Jan 27, 2024

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 27, 2024
@exzombie
Copy link
Contributor

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.

@Protarios
Copy link

Protarios commented Mar 11, 2024

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.

@stale stale bot removed the status: stale label Mar 11, 2024
@TeChn4K
Copy link

TeChn4K commented Apr 25, 2024

Not stale please

Copy link

stale bot commented Jul 26, 2024

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 Jul 26, 2024
@brianmay
Copy link

brianmay commented Aug 8, 2024

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.

@stale stale bot removed the status: stale label Aug 8, 2024
@KucharczykL
Copy link
Contributor

My kludge that actually works is adding this to my config:

 home-manager.users.lukas.systemd.user.services.syncthingtray = {
      Service.ExecStart = lib.mkForce "${pkgs.syncthingtray}/bin/syncthingtray --wait";
    };

Perhaps it should be changed it https://github.com/nix-community/home-manager/blob/master/tests/modules/services/syncthing/linux/tray.nix?

@sumnerevans sumnerevans added the pinned Prevent marking as stale label Jan 8, 2025
@sumnerevans
Copy link
Member

PRs welcome. Probably just need to edit this:

ExecStart = "${pkgs.syncthingtray-minimal}/bin/syncthingtray";
, but not sure.

@Jdogzz Jdogzz linked a pull request Jan 8, 2025 that will close this issue
6 tasks
@brianmay
Copy link

brianmay commented Jan 8, 2025

In the first message the reporter said that adding --wait didn't help. But that was in 2022. Maybe different now in 2025?

@brianmay
Copy link

brianmay commented Jan 8, 2025

Will test and report back here.

@brianmay
Copy link

brianmay commented Jan 9, 2025

Early days, but --wait does seem to work for me right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pinned Prevent marking as stale triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants