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

Allow blueman-applet to be controller by systemctl --user #2105

Closed
wants to merge 2 commits into from

Conversation

infirit
Copy link
Contributor

@infirit infirit commented Aug 4, 2023

Not entirely sure how this van be enabled by default but for now just make it possible.

@cschramm
Copy link
Member

cschramm commented Aug 6, 2023

To my understanding that is completely up to distributions, e.g. Debian packages typically enable units on installation while on Arch things need to get enabled by the user after installation.

@infirit
Copy link
Contributor Author

infirit commented Aug 8, 2023

Ok, let me add a changelog entry and then it can be reviewed.

With this change blueman-applet can be controlled with systemctl --user.
Do note the autostart desktop file has priority so distro's will need
to delete/not install it if they want to use this.
@sonarcloud
Copy link

sonarcloud bot commented Aug 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@infirit infirit marked this pull request as ready for review August 8, 2023 20:28
@infirit infirit requested a review from cschramm August 8, 2023 20:28
@infirit infirit enabled auto-merge (rebase) August 8, 2023 20:41
@cschramm
Copy link
Member

cschramm commented Aug 9, 2023

Did you actually get that running?

For me it tries to start after a system reboot but fails loading the icon scheme. The problem looks exactly like the problem folks have with an improperly configured systemd D-Bus activation environment with no DISPLAY set.

When I just re-login, even after restarting my desktop manager, I do not see a start attempt at all, although I'd expect one.

@infirit
Copy link
Contributor Author

infirit commented Aug 9, 2023

I could start and stop it from an existing session. I haven't tried a fresh boot, let me do that and get back to you.

Edit, I think wanted by needs to be WantedBy=graphical-session.target. It should have everything setup while default probably doesn't.

@infirit
Copy link
Contributor Author

infirit commented Aug 9, 2023

I could start and stop it from an existing session. I haven't tried a fresh boot, let me do that and get back to you.

Edit, I think wanted by needs to be WantedBy=graphical-session.target. It should have everything setup while default probably doesn't.

Yup. Just checked it starts fine for me on plasma with WantedBy default.target and graphical-session.target. You are running XFCE right?

@infirit
Copy link
Contributor Author

infirit commented Aug 10, 2023

Can you try adding ExecStartPre=sleep 3 under the unit section?

I'm at work rn so can't test this on xfce but will do later today.

@infirit infirit disabled auto-merge August 10, 2023 20:55
@infirit
Copy link
Contributor Author

infirit commented Aug 11, 2023

Gonna give up on this. Tried several things but it refuses to start at XFCE session start. Once it's started it's fine.

@infirit infirit closed this Aug 12, 2023
@cschramm
Copy link
Member

I'm currently mainly using Cinnamon, with lightdm.

Whatever I tried, systemd always tries to start the unit when I first log in, no matter if I'm in a Desktop session or not. When lightdm is enabled, the unit already gets started when lightdm gets (i.e. before I actually log in). I have no idea why but somehow lightdm seems to open an initial user session for me right away. 🤷‍♂️

systemd does have an autostart mechanism for user applications but that needs to be requested by the desktop via the xdg-desktop-autostart.target. XDG autostart files can then be translated into systemd units with the systemd-xdg-autostart-generator tool.

In the end it seems like XDG autostart is the only universal system to autostart desktop applications.

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.

2 participants