dwmblocks-async icon indicating copy to clipboard operation
dwmblocks-async copied to clipboard

issue starting dwmblocks after rewrite

Open 2084x opened this issue 1 year ago • 9 comments

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!

2084x avatar Nov 23 '23 05:11 2084x

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.

UtkarshVerma avatar Nov 24 '23 00:11 UtkarshVerma

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.

2084x avatar Nov 27 '23 01:11 2084x

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

UtkarshVerma avatar Jan 04 '24 01:01 UtkarshVerma

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 :)

2084x avatar Jan 14 '24 21:01 2084x

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

UtkarshVerma avatar Jan 15 '24 03:01 UtkarshVerma

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

2084x avatar Jan 15 '24 04:01 2084x

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.

UtkarshVerma avatar Jan 16 '24 09:01 UtkarshVerma

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.

DasHammett avatar Apr 19 '24 08:04 DasHammett