cuth / unsplash-wallpaper

Use an image from unsplash.com as your background image from a simple command.
MIT License
266 stars 24 forks source link

Failure to set downloaded image as wallpaper in a Desbian Stretch install #25

Closed ghost closed 6 years ago

ghost commented 6 years ago

Evening.

In a unmodified installation of your application, I'm getting the following error after downloading an image: ✗ Command failed: which -a gsettings; which -a setroot; which -a pcmanfm; which -a feh; which -a nitrogen; which -a xfconf-query; which -a gconftool-2; which -a dcop; which -a dconf; which -a qdbus

xcafebabe commented 6 years ago

It seems is related with this line https://github.com/sindresorhus/wallpaper/blob/master/lib/linux.js#L112 in wallpaper package (promise is expecting always a success).

ghost commented 6 years ago

@xcafebabe How could we go about solving this? I've also have this application installed on another machine (a Subgraph, which is Debian based) and use it daily without any problems by running a cronjob. Maybe it is a missing dependency issue?

Thanks for your input.

xcafebabe commented 6 years ago

@hThoreau replace this line https://github.com/sindresorhus/wallpaper/blob/master/lib/linux.js#L110 with const whichCmd = `which -a ${names.join('; which -a ')} || true`; in wallpaper module dependency.

With previous change I don't get this error anymore but the background does not change :(. Need more research about this issue. (Using Arch Linux with Gnome 3)

ghost commented 6 years ago

Hi, I've used the npm i -g unsplash-wallpaper command and it updated a couple of files which I can't remember which ones they were. Since then, it's working as expected. I'll close this issue, then.