sboli / twmn

A notification system for tiling window managers
GNU Lesser General Public License v3.0
525 stars 47 forks source link

fail on service start #81

Closed jampow closed 6 years ago

jampow commented 6 years ago

I'm starting the server with systemctl start twmnd and it's failing on initialization, but when I run twmnd on terminal it starts and notify-send 'hello' works fine.

The journalctl -u twmnd command output gave me this output:

Oct 14 11:40:54 archlinux systemd[1]: Started twmn server.
Oct 14 11:40:54 archlinux systemd[1]: twmnd.service: Main process exited, code=exited, status=1/FAILURE                                                                                          
Oct 14 11:40:54 archlinux systemd[1]: twmnd.service: Failed with result 'exit-code'.
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Service RestartSec=100ms expired, scheduling restart.
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Scheduled restart job, restart counter is at 1.
Oct 14 11:40:55 archlinux systemd[1]: Stopped twmn server.
Oct 14 11:40:55 archlinux systemd[1]: Started twmn server.
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Main process exited, code=exited, status=1/FAILURE
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Failed with result 'exit-code'.
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Service RestartSec=100ms expired, scheduling restart.
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Scheduled restart job, restart counter is at 2.
Oct 14 11:40:55 archlinux systemd[1]: Stopped twmn server.
Oct 14 11:40:55 archlinux systemd[1]: Started twmn server.
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Main process exited, code=exited, status=1/FAILURE
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Failed with result 'exit-code'.
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Service RestartSec=100ms expired, scheduling restart.
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Scheduled restart job, restart counter is at 3.
Oct 14 11:40:55 archlinux systemd[1]: Stopped twmn server.
Oct 14 11:40:55 archlinux systemd[1]: Started twmn server.
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Main process exited, code=exited, status=1/FAILURE
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Failed with result 'exit-code'.
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Service RestartSec=100ms expired, scheduling restart.
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Scheduled restart job, restart counter is at 4.
Oct 14 11:40:55 archlinux systemd[1]: Stopped twmn server.
Oct 14 11:40:55 archlinux systemd[1]: Started twmn server.
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Main process exited, code=exited, status=1/FAILURE
Oct 14 11:40:55 archlinux systemd[1]: twmnd.service: Failed with result 'exit-code'.
Oct 14 11:40:56 archlinux systemd[1]: twmnd.service: Service RestartSec=100ms expired, scheduling restart.
Oct 14 11:40:56 archlinux systemd[1]: twmnd.service: Scheduled restart job, restart counter is at 5.
Oct 14 11:40:56 archlinux systemd[1]: Stopped twmn server.
Oct 14 11:40:56 archlinux systemd[1]: twmnd.service: Start request repeated too quickly.
Oct 14 11:40:56 archlinux systemd[1]: twmnd.service: Failed with result 'exit-code'.
Oct 14 11:40:56 archlinux systemd[1]: Failed to start twmn server.

I'm on arch with i3wm. Any idea what can I do to solve this.

lsl commented 6 years ago

Add exec --no-startup-id /usr/bin/twmnd to your .i3/config (or whatever location you use) and disable the systemd service.

jampow commented 6 years ago

Hi @lsl

I worked around it with an exec on ~/.config/i3/config, but I prefered to report it because the service has some problem yet.

sboli commented 6 years ago

Yep. The systemd service file was a suggestion that I accepted but it was never meant to be run as a service since the daemon requires X and needs to be run as the current user.

Deprecating the service.