UtkarshVerma / dwmblocks-async

An efficient, lean, and asynchronous status feed generator for dwm.
GNU General Public License v2.0
216 stars 83 forks source link

issue starting dwmblocks after rewrite #53

Open 2084x opened 8 months ago

2084x commented 8 months ago

Hi there, after you did the rewrite recently, I am having trouble getting dwmblocks to start the way I would like it to.

I run dwmblocks from within dwm.c using this function:

void
runAutostart(void) {
    system("killall -q dwmblocks; dwmblocks &");
}

This is so that dwmblocks can restart alongside dwm when I kill -HUP dwm.

This all worked fine until the rewrite, now dwmblocks won't start at all this way, instead I just get the default "dwm 6.4" text.

If I run dwmblocks from the command line, it will work fine until I kill -HUP dwm, then it freezes. If I start dwmblocks in my xprofile or something, it appears but isn't clickable and will freeze when dwm is sent kill -HUP.

Any idea why this might be happening now? Hope you can help!

UtkarshVerma commented 8 months ago

This shouldn't happen. I tried sending kill -HUP $(pidof dwm) and my dwm restarted without dwmblocks dying. This is most likely an issue in your setup.

2084x commented 8 months ago

it's not just the kill signals, it won't start at all on boot. I have no idea why. nothing has changed on my end, so I'm a bit lost.

oh well I guess I'll stay with the old version for now.

UtkarshVerma commented 6 months ago

Check #56 as it might be related. The rewrite exits when it doesn't find the specified scripts.

2084x commented 6 months ago

I've gone through that issue and tried a whole lot of things like changing ~ to $HOME, sourcing my zprofile in different spots, exporting $PATH before calling dwmblocks etc... none of it made any difference. even when my only block was just calling date, it still would not start.

In the end I've removed my autostart patch from dwm and started dwmblocks from my xprofile. everything works fine that way. all is good now :)

UtkarshVerma commented 6 months ago

To better debug this, save dwm's stderr output to a logfile and then examine it. It may indicate why it could not start dwmblocks.

exec dwm 2>/tmp/dwm.log
2084x commented 6 months ago

ok, so when autostarting with dwm and only using a single block calling date, I get:

$ cat /tmp/dwm.log
error: could not obtain exit status for "date" block
UtkarshVerma commented 6 months ago

That sheds some light on it. Most likely, the system call has something to do here. Will investigate this when I get the time. In the meanwhile, use an older release or simply launch dwmblocks-async from .xinitrc like I do.

DasHammett commented 3 months ago

I can confirm I have the same issue. Starging dwmblocks with the autostart patch fails, but manually launching dwmblocks once dwm is started works as expected.