stoeckmann / xwallpaper Goto Github PK
View Code? Open in Web Editor NEWwallpaper setting utility for X
License: ISC License
wallpaper setting utility for X
License: ISC License
info: gentoo, xserver, dwm
everytime i run: "xwallpaper --version" or any other parameters that are valid i get this error: "bad system call"
if anyone thinks he can help please tell me what information should i provide
I built the last xwallpaper release on Ubuntu 18.04, and when I try xwallpaper --zoom picture.jpg
I get failed to parse
(with --debug: failed to parse XPM file
); with PNG I get either that, or a success which doesn't actually change my wallpaper. An example output for this last case:
loading /home/user/Pictures/image.png
output detected: eDP-1, 1920x1080+0+0
(randr) screen dimensions: 1920x1080+0+0
creating pixmap (1920x1080)
composing /home/user/Pictures/image.png for eDP-1 (area 1920x1080+0+0) (mode 6)
xcb image (1920x1080) to eDP-1 (1920x1080+0+0)
put image request parameters:
maximum request length allowed for server (32 bits): 4194303
maximum length for row data: 16777188
length of rows in image: 7680
maximum height to send: 2184
put image (1920x1080+0+0) to eDP-1 (1920x1080+0+0)
I noticed than while configuring the program I got this outputs, even though I think I have all the dependencies:
checking for JPEG... no
checking for SECCOMP... no
Also, with regards to #14 , there is a .deb available at https://launchpad.net/ubuntu/cosmic/amd64/xwallpaper/0.3.0-2ubuntu1 if you want, but it's an old version (0.3).
When I set a wallpaper to be displayed, the wallpaper on the other monitor will be blank. Is there any way?
xwallpaper --output HDMI-1-1 --zoom /path/a.png
Currently (running v0.6.2 though I checked the releases and this doesn't seem to have changed) if you have multiple outputs you cannot set the wallpaper for only one of them without resetting the rest to black. Is it possible (or in the scope of the project) to set wallpapers for a subset of outputs and leave the other wallpapers as they currently are?
External workarounds exist but aren't particularly desirable. e.g. one could write some code to remember what output is set to what wallpaper (and with what settings) then append the unset outputs to the new xwallpaper
call, updating with the new values. I hope there's a more elegant solution available internally.
Distro: Arch Linux
If an image is set to 16-bit, xwallpaper will crash with the following error:
*** stack smashing detected ***: terminated
Bad system call (core dumped)
Converting it to 8-bit with Gimp (Image > Precision > 8 bit integer) or converting it to jpeg makes it work again, but a bug is a bug so here's a report.
On a separate note, interlaced png files produce the following warning message:
libpng warning: Interlace handling should be turned on when using png_read_image
It still sets the wallpaper without issue so it's potentially harmless, but I figured I'd report it anyway.
(also pardon the edits—I misread a closed issue and thought the first half was a duplicate)
Running
$ xwallpaper --zoom .config/wall.png
results in
xwallpaper: failed to set up stage 2 seccomp: Resource busy
xwallpaper seemed to have worked fine for over a month adding that command to the $HOME/.xinitrc file. Running the daily
# xbps-install -Su
seems to have broken it? Searching on google tells me there are no great matches...
Hi,
The new --daemon
option crashes with SIGSYS when compiled with sandboxing support and without DEBUG
defined. The exact crash position is main.c line 540 daemon(0, 0)
, which tries to run the non-whitelisted clone
syscall.
-- Sebastian
This specific subject is split from #37
The xwallpaper daemon, started with xwallpaper --daemon
keeps a single long running connection to the X server. This connection is used to update already existing pixmap atoms or to create new ones when screen resolution changes.
To allow wallpapers (more specifically the atoms used for pseudo transparency) to stay even after xwallpaper is killed, the X server retains the pixmaps even after the X connection to the client is closed. This is also the reason why xwallpaper without daemon mode or other wallpaper setting utilities are able to create a pixmap which still exists after the program execution finishes.
The problem shows up if the xwallpaper daemon still has an open connection. If xwallpaper --clear
or another wallpaper setting utility runs and releases the already existing atom pixmaps, technically the X server closes the connection to the still running xwallpaper daemon. If the connection would be closed, it would release the associated resource.
In the X documentation this is even properly described. The X connection used to set the pixmap should not be used anymore afterwards. The correct operation can be seen in feh
.
Since xwallpaper has a strict stage 2 sandbox, we cannot create a new X connection every time we create a pixmap. Of course the sandbox could be extended but that would mean that connect and other commands are suddenly allowed. Maybe it could be further tightened, which depends on the sandbox technology used, but it sounds like a bad approach IMHO.
Right now I think that it's best to create two X connections when in daemon mode and handling atoms. If the X connection is closed, then we can use the second one to release our resources. If the server was actually closed, the second connection will be closed as well. But in that case we are not leaking resources because the server is shutting down.
Hi, after updating libseccomp to the latest version (2.5.0-1) on Arch Linux, I get the following error when using xwallpaper:
xwallpaper: failed to set up stage 2 seccomp: Device or resource busy
I have not made any other significant modifications to my system which would explain the error, that's why I suspect libseccomp must be the issue here.
How complicated do you think it would be to add this functionality? I find myself trying to add .heic files as wallpapers often
OS : arch linux
xwallpaper version : 0.7.3
after i run xwallpaper --zoom wall.jpg
i get the following error message invalid system call (core dumped)
any idea how to fix it?
Hi,
I can't get Xwallpaper to work. I have the following error:
xwallpaper: failed to parse 1600px-Sunflower_from_Silesia2.jpg
What does this error message mean?
The image works with feh.
Thank you
I've got two monitors with different resolutions and set the background with xwallpaper --daemon --output DP2 --maximize image1.jpg --output HDMI1 --maximize image2.jpg
and so on.
Sometimes my system boots with them having the wrong order, as in screen 1 is on the right. I can just change that, not problem, but as the X output size doesn't change, the xwallpaper demon doesn't redraw the pictures and it ends up looking broken.
So it would be nice if xwallpaper either a) listens to the numbering change or b) just redraws when receiving SIGHUP or something.
I hope I'm missing something, but still struggling with no success to compile xwallpaper with jpeg support.
I see that the libjpg is there:
$ ldconfig -p | grep libjpeg
libjpeg.so.8 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libjpeg.so.8
libjpeg.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libjpeg.so
But yet, when I do ./configure, that happends:
checking whether JPEG support is requested... auto
checking for JPEG... no
Any ideas how to proceed?
The man page explicitly states that this program mainly supports PNG images and optionally JPEG. A look at configure
output indicates support for XPM as well.
As WEBP images are now popping up as a result of image searches, having this format supported as well would be nice, if at all possible.
Some time between 0.6.6 and 0.7.0, xwallpaper started leaking X resources. Not really sure if that's the proper term for it, but it's whatever is tracked by the program xrestop
. Anyway, I have a script that runs xwallpaper every 10 minutes, and over time, the number of connections increases with <unknown>
PID identifiers. Eventually I can't start any more X programs because all X connections are in use. I've isolated the problem to xwallpaper. Version 0.6.6 did not leak resources, but 0.7.0 does.
I'll try to do additional debugging to see if I can isolate the merge where the regression was introduced.
When setting wallpaper using the command xwallpaper --zoom img.jpg
the wallpaper is immediately reset to the wallpaper that was set using the wallpaper settings of Kali.
Is there a fix or workaround that doesn't override the wallpaper set using xwallpaper by DE?
Alternatively, the wallpaper applicator may be disabled in Xfce but I haven't found a way to do it.
I initially came here to ask pretty much the question in #32, which is about getting different images on different monitors - but failing because the other monitor gets black background instead.
From that issue I found #20, leaving me sure I just couldn't get different images on different monitors using xwallpaper.
But then, in #20 (comment), I saw this code:
xwallpaper \
--output "$monitor1" --zoom "$bgLoc/$monitor1" \
--output "$monitor2" --zoom "$bgLoc/$monitor2"
Which made me try to set both monitors at the same time, and it worked just fine. The thing is that I found no information about being able to do it like this. The manpage (I'm on 0.6.5) states ”If multiple contradicting options were given, the last supplied option wins.” - which made me not even consider it a possibility to specify multiple outputs.
So, this issue is a mere suggestion to perhaps clarify this part of the manpage, and other documentation, so nobody else will miss that it's possible to get different images on all monitors - as long as it's done in a single command.
Thanks for a great utility!
Support .jxl image format.
See also: https://jpegxl.info
It fails to render 30 bit color depth.
I am running Ubuntu 20.04 and trying to change my wallpaper using xwallpaper. But it is not able to change my wallpaper though the command runs without an error.
xwallpaper --zoom dracula-red.png
Is there anything I can do?
I love this utility.
It seems that this package is available via apt, but I am having no luck.
https://launchpad.net/ubuntu/cosmic/+package/xwallpaper
Do I need to add a certain PPA? If so, do you know which?
In the below, ~/.config/wallpaper
is a symlink to the JPEG file I have for my wallpaper. If I give it the actual file, it does work.
❯ xwallpaper --debug --center ~/.config/wallpaper
loading /home/atk/.config/wallpaper
failed to parse input as (RGB) JPEG
failed to parse XPM file
xwallpaper: failed to parse /home/atk/.config/wallpaper
Using Arch, xwallpaper 0.6.4, i3-gaps as my WM
Any other info wanted, please let me know :)
[swindles@think420 ~]% xwallpaper --center /home/swindles/.config/wall/astolfo_white.jpg
[swindles@think420 ~]% xwallpaper --center /home/swindles/.config/wall/astolfo_white.jpg --debug
loading /home/swindles/.config/wall/astolfo_white.jpg
output detected: LVDS-1, 1600x900+1920+634
output detected: DP-1, 1920x1080+0+0
(randr) screen dimensions: 3520x1534+0+0
reusing atom pixmap (3520x1534)
composing /home/swindles/.config/wall/astolfo_white.jpg for LVDS-1 (area 1600x900+0+0) (mode 1)
xcb image (1600x900) to LVDS-1 (1600x900+1920+634)
put image request parameters:
maximum request length allowed for server (32 bits): 4194303
maximum length for row data: 16777188
length of rows in image: 6400
maximum height to send: 2621
put image (1600x900+0+0) to LVDS-1 (1600x900+1920+634)
composing /home/swindles/.config/wall/astolfo_white.jpg for DP-1 (area 1920x1080+0+0) (mode 1)
xcb image (1920x1080) to DP-1 (1920x1080+0+0)
put image request parameters:
maximum request length allowed for server (32 bits): 4194303
maximum length for row data: 16777188
length of rows in image: 7680
maximum height to send: 2184
put image (1920x1080+0+0) to DP-1 (1920x1080+0+0)
OS: Artix Linux
DE: KDE Plasma 5
I have two monitors and neither of them change
OS: Arch Linux
WM: dwm
Hello.
I'm not exactly familiar with providing the necessary debugging information to assist you all in helping me with this problem, but I'll provide what I can.
Yesterday when I booted up my computer, my wallpaper script ran normally upon startx, and I could see my wallpaper. Today when I booted my computer this morning, my script failed, and I could not see my background. When I ran the script manually, xwallpaper returned this:
[abbas@archchad ~]$ xwallpaper --zoom .local/share/prophecy_jump_puzzle.jpg
zsh: invalid system call (core dumped) xwallpaper --zoom .local/share/prophecy_jump_puzzle.jpg
[abbas@archchad ~]$
Any help would be appreciated. Pardon me if I'm not providing enough information; I'm just not sure where to look to analyze this problem. Thanks
Hello, I was trying to build your project on my Void Linux install, and I ran into the following issue:
tedm@tedm-void ~/S/xwallpaper> ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory `.'
tedm@tedm-void ~/S/xwallpaper> ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
./configure: 3878: ./configure: Syntax error: word unexpected (expecting ")")
I'm not super sure how to troubleshoot this error, but I thought you might want to know.
Include libxcb-util-dev
and libxcb-image0-dev
as dependencies to build
Hello.
Before I get into the subject, I must say I am not a Linux expert and I might not express myself in the clearest form due to technical ignorance.
I believe I have been able to find out why the configure file could not find the required library for JPEG support. It most probably is an issue exclusive to Ubuntu distributions which uses Ubuntu sourced packages. As per the following bug report: (https://bugs.launchpad.net/ubuntu/+source/libjpeg-turbo/+bug/1056566), the package did not even use to have a pkg-config file. Based on this I decided to look for said file and discovered that it exists but is missing its version and that is likely to be the crux of the problem: the configure script interprets the installed libjpeg as not being of at least version 1.5. Editing the file and adding a version greater than 1.5 solves the problem.
I am aware that this issue does not lie on your project, but with Ubuntu. I am already looking into how I can bring this issue to them in hopes of a fix. But I also believe that it might be of your interest to somehow, if even possible, adapt the configure.ac file so users of Ubuntu based distribution could enjoy xwallpaper fully. And if no possible changes can be done to the file, then maybe a small debugging paragraph on the README.md.
I apologize if raising an issue was not the best way to inform you of this problem.
This works very well, but unfortunately the old background is set when the system is restarted. Any ideas for this?
pywall for example saves this value in $HOME/.cache/wal/wal
.
I can't get xwallpaper to display the file. Instead it runs the initial file from settings/background.
Running Debian Bullseye
$ uname -r
5.19.0-0.deb11.2-amd64
Running on Nvidia GT730 2G 4HDMI
$xwallpaper --center --no-randr --tile moon.png
$ xwallpaper --center --no-randr --tile moon.png --debug
loading moon.png
output detected: HDMI-1, 1920x1080+1920+0
output detected: HDMI-2, 1920x1080+3840+0
output detected: HDMI-3, 1920x1080+0+0
output detected: HDMI-4, 1920x1080+5760+0
(randr) screen dimensions: 7680x1080+0+0
creating pixmap (7680x1080)
tiling moon.png for HDMI-1 (area 1920x1080+0+0)
xcb image (1920x1080) to HDMI-1 (1920x1080+1920+0)
put image request parameters:
maximum request length allowed for server (32 bits): 4194303
maximum length for row data: 16777188
length of rows in image: 7680
maximum height to send: 2184
put image (1920x1080+0+0) to HDMI-1 (1920x1080+1920+0)
tiling moon.png for HDMI-2 (area 1920x1080+0+0)
xcb image (1920x1080) to HDMI-2 (1920x1080+3840+0)
put image request parameters:
maximum request length allowed for server (32 bits): 4194303
maximum length for row data: 16777188
length of rows in image: 7680
maximum height to send: 2184
put image (1920x1080+0+0) to HDMI-2 (1920x1080+3840+0)
tiling moon.png for HDMI-3 (area 1920x1080+0+0)
xcb image (1920x1080) to HDMI-3 (1920x1080+0+0)
put image request parameters:
maximum request length allowed for server (32 bits): 4194303
maximum length for row data: 16777188
length of rows in image: 7680
maximum height to send: 2184
put image (1920x1080+0+0) to HDMI-3 (1920x1080+0+0)
tiling moon.png for HDMI-4 (area 1920x1080+0+0)
xcb image (1920x1080) to HDMI-4 (1920x1080+5760+0)
put image request parameters:
maximum request length allowed for server (32 bits): 4194303
maximum length for row data: 16777188
length of rows in image: 7680
maximum height to send: 2184
put image (1920x1080+0+0) to HDMI-4 (1920x1080+5760+0)
The current exit code for "output not found" is 0.
For example:
$ xwallpaper --output HDMI1 --zoom ~/wall.png
xwallpaper: output HDMI1 not found/disconnected, ignoring
$ echo $?
0
Would it be better if this is changed to exit code 1 instead?
It will save a lot of trouble for scripting, e.g.
$ xwallpaper --output HDMI1 --zoom ~/wall.png || xwallpaper --output HDMI-1-1 --zoom ~/wall.png
Built xwallpaper on the fresh install of centos stream(cloned repo and followed instructions). Got the failed to parse error while attempting to set a wallpaper.
Tried running ./configure
and noticed following:
checking for JPEG... no
although I do have libjpeg-turbo
(libjpeg-turbo-1.5.3-10.el8.x86_64) installed and sxiv can view jpg files perfectly
Can this be possible ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.