Subject: bug#57781: missing wallpaper command

From: Felix <[email-masked]>
Date: Mon, 19 Sep 2022 21:26:02 +0200

Stefan Kangas <[email-masked]> writes:

> Felix <[email-masked]> writes:
>
>> In my private config i prepend the wallpaper-command with "setsid",
>> that way the process isn't attached to emacs and the wallpaper set by
>> wbg or swaybg will stay after closing emacs.
>> This is an Linux specific thing of course.
>
> The command handling is already only relevant for Unix-like systems:
> MS-Windows and Haiku use native APIs.  I'm not yet sure how to best
> handle the above in wallpaper.el, but I'm looking into it.
>
> I guess we could use "setsid", but in that case we might as well use
> "nohup" as that command is mandated to be there by POSIX.  (AFAIU, on
> FreeBSD you'd need to install the "util-linux" package to get setsid.)
>
>> I'm not shure how it works for gnome and plasma, but i would think it
>> makes no difference.
>
> From your testing, it seems like it works without it, right?

I don't really know what i'm doing, but
i found that it works if i replace the start-process call with:

(apply #'call-process
                wallpaper-command
                nil 0 nil
                (mapcar (lambda (arg) (format-spec arg fmt-spec))
                wallpaper-command-args))