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

Help with cargo build with systemd support #76

Open
ulysg opened this issue Nov 21, 2024 · 8 comments
Open

Help with cargo build with systemd support #76

ulysg opened this issue Nov 21, 2024 · 8 comments

Comments

@ulysg
Copy link

ulysg commented Nov 21, 2024

Hey,

I'm trying to add this program to the Fedora Copr, so it's easier to install.

I've recently added the systemd unit in the package, and added the systemd feature to the cargo build. But the xwayland-satellite service fails after a few seconds. If I remove the "Type=notify" from the service, everything works fine.

I'm not sure what I'm doing wrong, if you could help me!

The build uses the last release (v0.5).

Here's the log from systemctl:

xwayland_satellite > Connected to Xwayland on :0
xwayland_process   > The XKEYBOARD keymap compiler (xkbcomp) reports:
xwayland_process   > > Warning:          Unsupported maximum keycode 708, clipping.
xwayland_process   > >                   X11 cannot support keycodes above 255.
xwayland_process   > > Warning:          Could not resolve keysym XF86KbdInputAssistPrevgrou
xwayland_process   > > Warning:          Could not resolve keysym XF86KbdInputAssistNextgrou
xwayland_process   > Errors from xkbcomp are not fatal to the X server
@Supreeeme
Copy link
Owner

What does the unit file look like?

@ulysg
Copy link
Author

ulysg commented Nov 21, 2024

I've used the one from the resources so:

[Unit]
Description=Xwayland outside your Wayland
BindsTo=graphical-session.target
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target

[Service]
Type=notify
NotifyAccess=all
ExecStart=/usr/bin/xwayland-satellite
StandardOutput=journal
Restart=on-failure

[Install]
WantedBy=graphical-session.target

@Supreeeme
Copy link
Owner

Supreeeme commented Nov 21, 2024

I don't know anything about Copr but looking here:
https://copr-dist-git.fedorainfracloud.org/cgit/ulysg/xwayland-satellite/xwayland-satellite.git/tree/xwayland-satellite.spec?h=f41#n30

This needs to be a capital F: %cargo_build -F systemd

@ulysg
Copy link
Author

ulysg commented Nov 21, 2024

Thanks for your quick answer!
I thought of that too, but actually, the -f gets transformed by the macro to --features, and in the build log, the feature is passed to cargo.

@Supreeeme
Copy link
Owner

Hm, I'm not sure then. Perhaps there's some kind of IO error when satellite tries to communicate with systemd - there's no kind of error handling for that currently...

@ulysg
Copy link
Author

ulysg commented Nov 21, 2024

I see, thanks a lot for your help and this awesome tool

@Supreeeme
Copy link
Owner

I just pushed a change to log whether or not the systemd notification was successful, may be useful for you.

@ulysg
Copy link
Author

ulysg commented Nov 22, 2024

I'll look into it, thanks!

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

No branches or pull requests

2 participants