Supreeeme / xwayland-satellite

Xwayland outside your Wayland
Mozilla Public License 2.0
210 stars 10 forks source link

Help with cargo build with systemd support #76

Open ulysg opened 4 days ago

ulysg commented 4 days ago

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 commented 4 days ago

What does the unit file look like?

ulysg commented 4 days ago

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 commented 4 days ago

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 commented 4 days ago

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 commented 4 days ago

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 commented 4 days ago

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

Supreeeme commented 4 days ago

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

ulysg commented 4 days ago

I'll look into it, thanks!