sync /dev/stderr: invalid argument
michaelKurowski opened this issue ยท 24 comments
I'm getting
Could not set wallpaper: sync /dev/stderr: invalid argument
while attempting to set a wallpaper.
sway version 1.0-rc1-170-g076257a9 (Mar 11 2019, branch 'master')
wayland 1.17.0-1
Thanks for reporting! I'll try to reproduce the issue.
Was setwallpaper
called from within .config/sway/config
or on the command line?
Added two calls to Sync()
before calling Exit
. Please test if the master branch now works for you.
It was being called from command line. I'll check if current master works within next 2 days.
Great, thanks for testing.
Ok so I'm at commit c7f5b94, and I still get the same error while seting wallpaper.
I am unable to reproduce the issue.
What are the steps to reproduce this?
Am I correct in assuming that you start sway, then launch a terminal emulator (which one?) and then run something like:
setwallpaper /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png
Then the wallpaper changes, and then you get the error message?
It could be the terminal emulator, since the error is related to /dev/stderr
.
Versions
- Could you please try with sway 1.0? (
sway --version
sayssway version 1.0
here). - What does
go --version
say? - Which distro are you on?
Thanks!
I think I found the issue. The error message may appear if setwallpaper
can not find a method for changing the wallpaper, and if feh
is also not installed.
If you tell me which desktop environment or window manager are you using, I will add support for it.
Please confirm that the error is gone in latest master of wallutils.
I've got the latest sway
sway version 1.0
uname -r
-> 5.0.4-arch1-1-ARCH
I use sway on wayland
go version go1.12.1 linux/amd64
The issue remains
Checking for the latest master
Ok it now outputs Could not set wallpaper: Found no working method for setting the desktop wallpaper
, but isn't sway supported?
Thanks for testing. Sway is supported, but /usr/bin/swaymsg
must be installed.
What is the output from which swaymsg
on your system?
which swaymsg
-> /usr/bin/swaymsg
Also, is one of these true on your system?
- The
SWAYSOCK
environment variable is set or GDMSESSION
contains the wordsway
orXDG_SESSION_DESKTOP
contains the wordsway
orXDG_CURRENT_DESKTOP
contains the wordsway
?
Also
swaymsg -v
-> swaymsg version 1.0
What does env | grep -i sway
say?
echo $SWAYSOCK
->/run/user/1000/sway-ipc.1000.913.sock
echo $GDMSESSION
outputs nothingecho $XDG_SESSION_DESKTOP
outputs nothingecho $XDG_CURRENT_DESKTOP
outputs nothingenv | grep -i sway
->
I3SOCK=/run/user/1000/sway-ipc.1000.913.sock SWAYSOCK=/run/user/1000/sway-ipc.1000.913.sock
Thanks.
I'm baffled and mystified by this. If SWAYSOCK
is defined and sway
and swaymsg
exists, I don't see why it fails to run swaymsg
to set the desktop wallpaper.
Here is the relevant code: https://github.com/xyproto/wallutils/blob/master/sway.go#L19
I'm also using Sway, btw, and it seems to work here.
Found the issue! Fix coming up in 3..2...
Please try with the latest master.
Works! Thank you, dude!
I changed:
hasE("SWAYSOCK") && (containsE("GDMSESSION", "sway") || containsE("XDG_SESSION_DESKTOP", "sway") || containsE("XDG_CURRENT_DESKTOP", "sway"))
to
hasE("SWAYSOCK") || (containsE("GDMSESSION", "sway") || containsE("XDG_SESSION_DESKTOP", "sway") || containsE("XDG_CURRENT_DESKTOP", "sway"))
Since having SWAYSOCK set should be good enough indication that sway is running.
I assume you are not launching sway from any particular desktop manager, like gdm
.
Thanks for testing!
I just run it from terminal after logging in